Concep Question: IPad as industrial machine component?
I have a potential application where I want an iPads camera to view an industrial process. Real time images then get processed and a yes/no decision is made. I would then need to output that decision via the lighting cable to a circuit that closes a real world relay to divert a part on a conveyor belt.
Does Pythonista allow real time access to the IPad camera. Can I control the frame rate of the camera?
Does Pythonista allow real time input/output across the lighting cable?
On image processing I'd suggest a Raspberry Pi 2 + a good webcam. You'd be off quite a bit cheaper and could use OpenCV for image processing in Python.
@Bruce42 if you started with the 1620 and missed the S/360 then you've missed a lot.
Hint: I have both sides of a replica S/360 Reference Card in a frame on my home office wall. :-)
Once somebody tried to "threaten" me with having to learn SAS. I said "bring it on; it'd be the 20th programming language I've had to get familiar with." :-)
So older dogs and newer tricks; I'm sure you could hack it. (Pun intended.) :-)
But, like Titus Andronicus, methinks I doth digress too much. :-)
It's good to know I'm not the only old dog out here tinkering with the stuff of young'ings. I've noticed that young guys often miss really cheap and simple upgrades to old machinery. Like wire wrapping up a hard wired TTL Logic replacement for complex relay logic. It shrinks down the physical size of relay logic so that many new functions can be added without increasing the size of the old electrical box. Interfacing denounced input switches and real world output power is the only tricky part and the old relays can be repurposed to do that for many newly added functions. The parts cost for such an upgrade can be very low! I've upgraded several WWII machines so that they compete nicely with newer super expensive industrial ladder logic machines.
I've decided that I'll probably never make a bunch of money with my idea and in keeping with the concept of open source and with the existence of guys like you all; here it is.
It's an industrial worker safety issue. There always seems to be a trade off between worker safety and worker productivity. I've noticed one instance where drastic improvements can be made without that trade off.
You are all probably familiar with the relative new laser line cross hairs that can be added to drill presses for under $20.00. Also appropriate for punch presses and such. The machines they are added to mostly manipulate flat material stock. The laser lines are of a very distinctive color for the given laser. The lines are very straight lines... Until a human hand enters the field of vission. Then the laser lines trace out the top curvature of the hands and/or fingers. So if imagine processing detects anything but 'straight laser lines' machine operation could be prevented. The speed at which a hand enters the field of vision and the time it takes to stop the descent of hand mangling tooling would be crucial. World wide this could save many hands and fingers! It could also increase productivity! While there would be many problems along the way to a commercial version, such as UL lab approval and/or other safety standards one has to start someplace. I'm thinking the proper starting place is with old dogs and new toys.
Here's my Dropbox link to some still photos of a hand under laser cross hairs.
If anybody's interested I would email you copies.
Maybe the computer language or speed of processing is initially not as important as the logic of analyzing individual frames.
More than a distinctive color, a distinctive frequency although a digital camera won't know the difference with only three color sensors.
Sounds like an interesting problem. A filter pass to filter the laser image frequency making it monochrome removing uninteresting things (noise) from the image followed by a Hough transform to find straight lines? The filter pass could probably generate a number indicating how much laser is visible. In fact depending on the actual setup a change in laser illumination might be enough to tell you that the beam is being interfered with. I've sometimes found in situations like this that the problem can be reduced to a simpler algorithm. Us old guys often needed to find "simpler" because "simpler" === "possible" on the underpowered machines we used.
I'd definitely start with lots of real images from realistic scenarios and develop the algorithms on a desktop first. I suspect the algorithm development will be the hardest part. Heck you could probably hire an app developer to convert it to an iPhone app on one of these software job bidding sites, probably for cheaper than you think. Unfortunately there are lots of underemployed programmers out there.
If the level of laser illumination turned out to be enough you might not even need a camera. Just an optical filter that passes only the laser frequency and a photodiode to say how much. Cheap pointer LED lasers (red) are usually 650 nm. They are so common that there are probably standard filters available cheap. Those laser levels at the hardware store probably have them which means someone makes them cheap.
Here's another approach: once the drill starts descending, the workpiece sure better be stationary. So, you could look for any moving objects in the FOV (maybe masking out the drill path itself). Anything moving ==> time to stop. Moving objects are pretty easy to identify by simply differencing images. Illumination would need to such that shadows from the tool don't cause false positives (i.e. illumination from at least a few different directions)
Hmmm, the shut down function could 'or' up multiple algorithms. The motion detection on a wide view could reveal how fast a hand is approaching, if too fast to always avoid a descending tool, shut down. A stationary hand holding the material would be much more common though. Many materials, textiles for example, are punched with a foot operated switch without clamping and both hands are often in danger. Even the operators, who's limbs are in danger, despise safety devices that interfere with their work. I can't count the times that I've seen disabled safety devices. That's what I like about an out of the way camera or a light level detector being the decision maker.