Go Down

Topic: Read patterns from paper? (Read 383 times) previous topic - next topic


Hi everyone!

Im am curious to see if it's possible to use an arduino board together with some kind of reader to detect patterns on the back of folded paper.
If you look at the attached image you can see several black blocks aligned in a diagonal shape. Thats the shape I want to detect as an OK pattern, but if these blocks aren't aligned in a diagonal shape, thats bad.
So I was thinking if the technology behind a barcode scanner would work. Either the Laser-scanner type or Linear CCD type.
The folded paper (see picture) will be moving in the direction of the arrow and the red lines that I have painted would simulate the "scanner".
Could either the Laser or the LCCD turn these blocks into this?

How would you do it?

Or will it be a hard struggle against the grey shadow-areas?

Best Regards


It will be on the edge of an Arduino UNO capabilities, but possible.

To solve such problem, you need to have several scan lines in memory in 8 bit greyscale ( 1 byte per pixel) . and search for maxima / minima in that array.

you need to have (I think)  at least 5 scan lines (more is better) of  50 pixels  ==> 250 bytes.
you need so much to detect the contours of the black area (left right top bottom), and to be able to discriminate it from noise single black pixels. After you made these 5 scan lines you can generate  the "0001000000" and  then reuse the scan lines arrays. I would think of using a laser pointer which reflects on white and not on black.

Furthermore by applying threshold you can apply run length encoding on after every single scan line reducing the needed memory.

What kind of performance do you have in mind?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131