Unable to decode qr code from picture

Skip to first unread message

Marcin Acewicz

Jul 7, 2017, 5:40:34 AM7/7/17
to zxing
Hello. I have problem with decoding methods. I have to decode some pictures, only this one isn't working: https://imgur.com/uJTkk8t

It is passing the online decoder: https://zxing.org/w/decode.jspx but not my method.

My method code: https://pastebin.com/e4d4QY3r

Im getting com.google.zxing.ChecksumException. Thrown when a barcode was successfully detected and decoded, but was not returned because its checksum feature failed.

So isn't it weird that online decoder by ZXing is working, and methods from ZXing project are not?

Anyone have idea, what can i do ?

Zorawar B.

Jul 7, 2017, 9:42:08 AM7/7/17
to zxing

It was possible to decode the image after making the following changes.
BufferedImageLuminanceSource source = new BufferedImageLuminanceSource(image);
bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source));

I don't know why the above works. That is something Sean can best explain.

One can always look at the source of the online decoder.

"So much source, so less time."

Marcin Acewicz

Jul 7, 2017, 10:27:09 AM7/7/17
to zxing
You are my Hero Zorawar!

Thank you.

Sean Owen

Jul 13, 2017, 6:48:11 PM7/13/17
to zxing
Look at the source of the online decoder. It actually tries all binarizers and TRY_HARDER, that's why.
Reply all
Reply to author
0 new messages