Pages: [1]   Go Down
Author Topic: Read patterns from paper?  (Read 159 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
0001000000
0000100000
0000010000
0000001000
0000000100
0000000010
0000000001

How would you do it?

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

Best Regards
Niclas


* bild.jpg (16.66 KB, 180x478 - viewed 26 times.)
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: