trouble decoding code 39 on some images

119 views
Skip to first unread message

Andrew Z

unread,
Jul 8, 2014, 1:26:57 PM7/8/14
to zx...@googlegroups.com
All of my barcodes are Code 39. They are generated and printed in a similar way, but sometimes the software doesn't detect any barcode.

I am test using the online scanner
http://zxing.org/w/decode.jspx

Here is a sample file that was scanned at 200dpi. It was never compressed with a lossy compression like JPG.

http://katana.oooninja.com/tmp/barcode0009b.png

Thank you in advance

Andrew

Bas Vijfwinkel

unread,
Jul 8, 2014, 11:48:59 PM7/8/14
to zx...@googlegroups.com
Most of the barcode decoders can't decode it for some reason.
This one was able to decode it :
http://www.datasymbol.com/barcode-recognition-sdk/barcode-reader/online-barcode-decoder.html.
It seems to be the resolution of the image / barcode that is not sufficient for
proper detection of the barcode.
Some of the black line are just a grey blur.
I presume the decoder from Datasymbol has a much more precise detector or maybe uses a more efficient way to detect the black-white changes and relate them to the correct encoding.
Could you maybe just try to take a picture of the barcode itself and feed that to the decoder? If that solves the problem then the resolution of the entire image might be what is causing the problem.

Andrew Z

unread,
Jul 11, 2014, 11:29:36 AM7/11/14
to zx...@googlegroups.com

I made a new scan at a higher resolution (300DPI). Now zxing (online app) does not decode the barcode from the whole image, but zbarimg.exe works. After I manually crop to just the barcode and text beneath it, zxing decodes it.

Is there a way to avoid manual cropping? I'm looking for a reliable, automated system.


Best regards
Andrew

Sean Owen

unread,
Jul 11, 2014, 4:07:20 PM7/11/14
to zx...@googlegroups.com
You should use TRY_HARDER mode and try different binarizers. It will always be beneficial to crop away the regions that definitely do not have a barcode.

Andrew Z

unread,
Jul 14, 2014, 11:17:39 AM7/14/14
to zx...@googlegroups.com
On Friday, July 11, 2014 2:07:20 PM UTC-6, Sean Owen wrote:
> You should use TRY_HARDER mode and try different binarizers. It will always be beneficial to crop away the regions that definitely do not have a barcode.

Thank you, Sean.

I don't see these options on the web interface. Is there a demo to try these options online or on Windows without building zxing from source?


Andrew

Sean Owen

unread,
Jul 14, 2014, 1:27:00 PM7/14/14
to zx...@googlegroups.com
These are options you use in the Java source code, I mean. No it's not an option on the web. There is a "CommandLineRunner" with these options, although you compile the java source (or grab the .jar from Maven) to be able to run it.
Reply all
Reply to author
Forward
0 new messages