Zxing unable to read code-128 barcode. Help

766 views
Skip to first unread message

Enye Dela Cruz

unread,
Oct 19, 2017, 12:18:01 AM10/19/17
to zxing
Hello! I need help on using Zxing, we have these code 128 barcodes that can't read by Zxing, these barcodes are printed on cards, any modification or adjustment for this? I am using the default zxing library. Thank you!
IMG_6557.JPG

Lachezar Dobrev

unread,
Oct 19, 2017, 9:53:49 AM10/19/17
to Enye Dela Cruz, zxing
Contrast is too low. White is just above 50%. There is also contrast
gradient. There is also some discolouration in the right part of the
image possibly due to CCD in low light conditions.
I used GIMP and performed the Colours - Auto - Enhance Contrast, and
scaled the image down to a smaller manageable size, and voilà: the
image scanned correctly.

2017-10-19 7:18 GMT+03:00 Enye Dela Cruz <playh...@gmail.com>:
> Hello! I need help on using Zxing, we have these code 128 barcodes that can't read by Zxing, these barcodes are printed on cards, any modification or adjustment for this? I am using the default zxing library. Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups "zxing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
IMG_6557-auto-small.JPG
Message has been deleted

Enye Dela Cruz

unread,
Oct 23, 2017, 4:21:23 AM10/23/17
to zxing
The answer might be answering the problem on the image on how it is captured by the camera, but I am scanning a barcode already printed on a card, it might not be possible to capture and edit a photo and scan every barcode on every printed card, is there any modifications on the actual scanning and not unto the image because maybe it is just dimmed on how it is captured by my phone.

Lachezar Dobrev

unread,
Oct 23, 2017, 4:59:30 AM10/23/17
to Enye Dela Cruz, zxing
Hm. I am not sure I follow you.
Are you referring to the ZXing Application, and not the ZXing Library?
If you're referring to the Application, than it should work as is.
What you can do to enhance the readability is:
- turn on the flash (there is an option in the settings)
- disable all other formats, leave only '1D Industrial' enabled (settings)
- scan from further away (counter-intuitive, but works)


2017-10-23 7:33 GMT+03:00 Enye Dela Cruz <playh...@gmail.com>:
> The answer might be answering the problem on the image on how it is captured by the camera, but I am scanning a barcode already printed on a card, it might not be possible to capture and edit a photo and scan every barcode on every printed card, is there any modifications on the actual scanning and not unto the image because maybe it is just dimmed on how it is captured by my phone.
>

Enye Dela Cruz

unread,
Oct 23, 2017, 5:33:31 AM10/23/17
to zxing
Hi Lachezar Dobrev, Thank you for responding to me, I imported the latest zxing library, no modifications yet, so I am having all files necessary, I imported it and everything is working fine it responds and resulted accurate barcodes except with the barcodes we really needed, I uploaded a sample card from scan so that theres no problem with any lighting with the shot.

So I am using zxing to my android application.
Scanning barcode for "printed cards" already.

Thank you Lachezar Dobrev!

SKM_C224e17102200160-page-001.jpg
Reply all
Reply to author
Forward
0 new messages