Simple B/W Image Capture and object counting
JBWolf
Posts: 405
Hello,
I have a project and could really use some help getting started.
Goal: count round black dots on white paper.
The white card paper is .5" x 1", the black dots are pretty large... about 3mm.
There are up to 4 rows of 4 dots, dot position is always specific, not random... just the amount of dots is random.
I need the most cost effective way to count these quickly, about two cards per second.
Feeding the cards is already taken care of, I just need a way to count the dots.
I have thought about using photo diodes with a small tube over where the dots are... but this seems a bit complex and really tight for space, not sure how much this would cost.
I found a thread started by PhPi about his PropCAM, but this is much more complex than I need.
I am hoping someone may have a solution already, or a simple & cheap method.
The idea floating around my head right now is to use a super cheap button camera to count them... but I have never interfaced a camera to the prop chip and not sure how to write software to recognize these dots. This may turn out to be much more expensive than photodiodes, not sure yet.
Looking for a place to start
All help is sincerely appreciated!
JB
I have a project and could really use some help getting started.
Goal: count round black dots on white paper.
The white card paper is .5" x 1", the black dots are pretty large... about 3mm.
There are up to 4 rows of 4 dots, dot position is always specific, not random... just the amount of dots is random.
I need the most cost effective way to count these quickly, about two cards per second.
Feeding the cards is already taken care of, I just need a way to count the dots.
I have thought about using photo diodes with a small tube over where the dots are... but this seems a bit complex and really tight for space, not sure how much this would cost.
I found a thread started by PhPi about his PropCAM, but this is much more complex than I need.
I am hoping someone may have a solution already, or a simple & cheap method.
The idea floating around my head right now is to use a super cheap button camera to count them... but I have never interfaced a camera to the prop chip and not sure how to write software to recognize these dots. This may turn out to be much more expensive than photodiodes, not sure yet.
Looking for a place to start
All help is sincerely appreciated!
JB
Comments
Check out the machine vision section of my index. (See signature.)
I've personally used Hanno's method (see Mecanum Wheeled Robot project in project index).
Is your subject stationary or moving on a conveyor of some sort?
-Phil
(GASP!)
Stamp--- 16 inputs, a match made in heaven!
Buck sensors: $1.05 in 10+ qty https://www.solarbotics.com/products/qrd1114/
Edit: Or feed the 16 inputs into a 16 to 4 line encoder, and feed those 4 outputs into your processor of choice.
Once the switch has been activated, the servo starts to retract in prep for feeding the next card.
The loaded card is now stationary and ready for imaging after a few ms delay to allow for settling.
Atleast that is the initial idea...
It would certainly be more efficient to fling them through... but I just figured that would be a bit too much visual processing to determine where one ends and the next starts. I cannot add or subtract any marks on the cards, but I suppose by making the background black and staggering the feed, it is certainly possible to do it this way!
Never considered that.
Erco:
that is very neat, never seen them coupled together. But unless they can differentiate between multiple dots, it would mean I need one for every dot position. I dont know if I can fit 16 in a .5"x1" area. I was originally thinking about an array of small photo resistors with tubes over them pointing on the dot positions with about a 1mm gap, and illuminating the whole card with a single LED. I havent priced them out but I was expecting to find photo diodes on digikey for a few cents each.
Either way, this is progress
The punch creates a heavy indentation into the card, it indents more than the width of the card itself.
I considered a series of levers fine tuned to the height of the card, but I dismissed this idea after considering dust, debree and mechanical wear throwing off counts after a short time.
Cards will be fed in stacks of 100, minimum 100 stacks or more a day. It will be used quite a bit and need to be reliable.
Minor cleaning is expected at times, but daily is not an option.
The cards themselves will be very clean, but the environment will vary.
If you can synchronize multiple line-image captures with the servo feed, the TSL1401-DB could capture sequential slices of the dot pattern as the card is being fed, rather than waiting until it stops. This is the method used by Mike Davey to read characters from the tape in his Propeller-based Turing machine.
-Phil
Thought I was the only one up at these hours hehe
Sorry but a $50 camera is above our budget limits.
We need to make over a dozen of these to make it a viable option
Readin through the card via bright light isnt an option either, has to be a surface read.
These are nice and small. I used a couple to add encoders to my Roboni-I robot.
This might also cost close to the same as just using 16 sensors though, alot more complex too.
Was hoping to use a very cheap $10 camera to do this, that way no moving parts other than feeding.
The budget is <$50 per unit.
I have to find a way to do this under $50/ea... and the prop + basic components has already taken $10.
So I'm left with $40 to use the prop chip for this project.
Only other key factors are maintenance and expected lifetime.
Must not require cleaning/maintenance any more than once every 100,000 cards in a clean environment, and must last 1-year minimum.