2
$\begingroup$

How identify the presence or absence of regular stripes of different colors, but ranging from very very very very light pink to black inside of a scanned image (bitmap 200x200dpi 24-bit). Carry a few examples.

Example 1

enter image description here

Example 2 (the lines are in all the columns except 7 in the second row of the last column)

enter image description here

For now try to identify (using python language) whether or not there is at least 5-10 pixels for the presence of different color from white to each strip, however, does not always work because the scanned image is not of high quality and the strip changes color very similar to color that surrounds it.

Thanks.

$\endgroup$
2
$\begingroup$

My suggestion would be in following step.

  1. If we know that outer shapes (rectangles) are at regular interval - first we should do some sort of segmentation and/or localization.

  2. Remove portions of background which are of no use and each block is identified and processed separately.

  3. Now if you are expecting lines only horizontally, you can traverse vertically and create scan lines from top-to-bottom. If the region has no dark separations - the scan lines will appear straight albeit with noise. If it crosses the dark line the intensity in the scan line will drop. This will tell the position of dark strip in the block.

  4. A set of 4 - 5 scan lines (or more) will provide a good co-relating answer.

| improve this answer | |
$\endgroup$
  • $\begingroup$ About point 1 Ok. About point 2 how can I remove background, i don't know the effective colors. Point 3 I expect only horizontal lines and I did not understand very well ^ ^ $\endgroup$ – originof Jan 20 '12 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.