Detecting & decoding QR-codes on curved surfaces

2,908 views
Skip to first unread message

Chris Pudney

unread,
May 13, 2015, 5:37:42 AM5/13/15
to zx...@googlegroups.com
G'day,

I've implemented an ImageJ plug-in that uses ZXing to detect and decode QR-codes in images. It works well but there are pathological cases that occasionally cause ZXing to fail to detect/decode a QR-code.

Such an example is attached where the QR-code is on a curved label.

Interestingly, I can use Barcode Scanner on my smartphone to successfully detect and decode this example when I point my phone at the screen. The on-line detector fails to detect/decode the QR-code when supplied with the example image.

I'm using the following code in my plug-in (ZXing 2.3.0; JRE7u71)

// Set hints.
final Map<DecodeHintType, Object> hints = new EnumMap<DecodeHintType, Object>(DecodeHintType.class);
hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);

// Decode -> results.
results = new QRCodeReader().decode(bitmap, hints);

Is there some additional processing that can be done to improve our chances of detecting and decoding such codes?

Thanks,
Chris.
Curved QR label_cropped.JPG

Chris Pudney

unread,
May 13, 2015, 6:08:10 AM5/13/15
to zx...@googlegroups.com
On Wednesday, 13 May 2015 17:37:42 UTC+8, Chris Pudney wrote:
> I'm using the following code in my plug-in (ZXing 2.3.0; JRE7u71)


Make that ZXing 3.2.0...
Reply all
Reply to author
Forward
0 new messages