Issue 1490 in zxing: Java core and javaSE - can't decode certain simple QR codes made by zxing itself

34 views
Skip to first unread message

zx...@googlecode.com

unread,
Jan 23, 2013, 4:38:33 AM1/23/13
to zx...@googlegroups.com
Status: New
Owner: ----

New issue 1490 by dmitry.m...@mind.com: Java core and javaSE - can't decode
certain simple QR codes made by zxing itself
http://code.google.com/p/zxing/issues/detail?id=1490

public static void main(String[] args) throws WriterException,
NotFoundException
{
MultiFormatWriter writer = new MultiFormatWriter();
MultiFormatReader reader = new MultiFormatReader();

BufferedImage image =
MatrixToImageWriter.toBufferedImage(writer.encode("95",
BarcodeFormat.QR_CODE, 320, 240));
LuminanceSource source = new BufferedImageLuminanceSource(image);
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
System.out.println(reader.decode(bitmap).getText());
}

zx...@googlecode.com

unread,
Jan 23, 2013, 4:40:13 AM1/23/13
to zx...@googlegroups.com

Comment #1 on issue 1490 by dmitry.m...@mind.com: Java core and javaSE -
can't decode certain simple QR codes made by zxing itself
http://code.google.com/p/zxing/issues/detail?id=1490

Using maven dependencies:
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>2.1</version>
</dependency>

Fails only for certain numbers:
95
125
167
195
251
271
315
354

and so on, but can decode other numbers!

zx...@googlecode.com

unread,
Jan 23, 2013, 4:42:34 AM1/23/13
to zx...@googlegroups.com

Comment #2 on issue 1490 by dmitry.m...@mind.com: Java core and javaSE -
can't decode certain simple QR codes made by zxing itself
http://code.google.com/p/zxing/issues/detail?id=1490

Also - tested using barcode scanner android app - it can decode 95 barcode
image produced by zxing. Perhaps bug is already fixed somewhere else?

zx...@googlecode.com

unread,
Jan 23, 2013, 5:10:40 AM1/23/13
to zx...@googlegroups.com
Updates:
Status: NotABug

Comment #3 on issue 1490 by srowen: Java core and javaSE - can't decode
certain simple QR codes made by zxing itself
http://code.google.com/p/zxing/issues/detail?id=1490

You need PURE_BARCODE mode. In a pure image you are going to have false
positive detections of features easily, that don't happen in a photo. It's
optimized for photos.

Reply all
Reply to author
Forward
0 new messages