Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Detecting (not decoding!) datamatrix (rectangle) regions in an image

I know that OpenCV doesn't provide any datamatrix decoding. That's ok. I'm currently using zxing to decode datamatrixes and it seems to work well.

However, Sometimes my image may contain two or more datamatrixes. In this case zxing fails because it needs an image with a single datamatrix in it.

Does anyone know how I can detect the datamatrix region? It doesn't have to be perfect as I don't mind false-positives, as long as I also get the rectangle for the actual datamatrix if there is one. I figure that this should be pretty easy with OpenCV since it is essentially trying to find a high-contrast rectangle, but I haven't been able to figure out how to do it...

Any help would be appreciated!