Barcode scanner performance on Android using ZXing

383 views
Skip to first unread message

CS JSI

unread,
May 15, 2013, 6:32:53 AM5/15/13
to codenameone...@googlegroups.com
Hi all,

I have a strange problem. I have successfully compiled demo "KitchenSink" and run it on Android phone. I noticed that barcode scanning (1D, EAN-13) from KitchenSink uses ZXing BarcodeScanner, which is expected. While trying to scan a code from a rounded surface (bottle) I noticed that all it did was constant auto-focusing (in-out) and occasionally scanned/returned the wrong number. This would be all ok, if running ZXing as standalone application (not through KichenSink) would not return a proper number "instantly" (one-, maybe two-time in-out auto-focus is needed) every time. I could repeat these two "scenarios" all day long. So, it is working ok on ZXing as standalone and it is not working "through" KitchenSink. Scanning from flat surfaces works ok in both scenarios. I tried this with ZXing 4.3.1 and just released 4.3.2 version with the same result. At first glance, it seams that "CodenameOne" approach triggers "less accurate" recognition procedure than ZXing BarcodeScanner application by default.

Any explanation or even better a solution?

Regards.
CS

Shai Almog

unread,
May 15, 2013, 12:53:47 PM5/15/13
to codenameone...@googlegroups.com, computer.s...@gmail.com
Hi,
is this with a generic ZXing or with one where you specify the EAN-13 type only?

CS JSI

unread,
May 16, 2013, 7:49:15 AM5/16/13
to codenameone...@googlegroups.com
Generic. Downloaded/updated from Google Play Store.
Since you mentioned it, I just tried only "1D barcodes" selection in ZXing settings, but it did not make any difference.

Regards,
CS

Shai Almog

unread,
May 16, 2013, 2:46:55 PM5/16/13
to codenameone...@googlegroups.com, computer.s...@gmail.com
If you didn't customize anything in the UI then it should be 100% identical since we just invoke the intent to call ZXing and an external ZXing application installed on your Android device does the work. If it was any other platform than Android this would be different but on Android its mostly up to the application installed.
The reason I asked earlier is that it is possible to pass "hints" to the external app that allow it to narrow down the code type.

CS JSI

unread,
May 17, 2013, 7:54:56 AM5/17/13
to codenameone...@googlegroups.com
Hmmm..., it is maybe 100% identical, but the result is not.
I have made a short video, so one can see it in action.
http://cs.ijs.si/applications/edietetik/

You can see that standalone ZXing quickly returns the correct number every time, while through KitchenSink it returns incorrect numbers (different every time ... even though this is not clearly seen, but it can be noticed by the length of returned number, which is much shorter than it should be).

Just to make sure I will reinstall the the ZXing BarcodeScanner, but I am 99.99% sure I did not change anything (since I installed it just for this occasion).

Regards,
CS


Shai Almog

unread,
May 17, 2013, 11:03:56 AM5/17/13
to codenameone...@googlegroups.com, computer.s...@gmail.com
I just tested this and got good performance. Not exactly sure how I can help since we don't really do anything, its all zxing.
Reply all
Reply to author
Forward
0 new messages