Issue 538 in zxing: Barcode scanner does not recognize CODABAR format barcode used for library card

809 views
Skip to first unread message

zx...@googlecode.com

unread,
Sep 1, 2010, 9:40:16 PM9/1/10
to zx...@googlegroups.com
Status: New
Owner: ----

New issue 538 by dfarinet: Barcode scanner does not recognize CODABAR
format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

What steps will reproduce the problem?
1. Tried to scan the barcode directly on my library card - no recognition
2. Using online free barcode generator, recreated my library barcode in a
larger image and tried to scan that on computer screen- still no
recognition of the Codabar barcode
3. tried printing the barcode image in a larger size and scan with Barcode
Scanner, still no recognition of Codabar barcode

What is the expected output? What do you see instead?
Just recognize the codabar barcode so I can store it in a card bank

What version of the product are you using? On what operating system?
latest version v3.4, HTC Incredible, Android version Froyo 2.2

Please provide any additional information below.
example of Codabar barcode attached

Attachments:
radTEST.png 1016 bytes

zx...@googlecode.com

unread,
Sep 2, 2010, 3:46:51 AM9/2/10
to zx...@googlegroups.com
Updates:
Status: NotABug

Comment #1 on issue 538 by sro...@gmail.com: Barcode scanner does not

recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

Codabar is not enabled in Android mostly because it is almost never used
and might hurt performance slightly. I don't know if there's plan to change
that, though it's simple to make a build that also searches for Codabar if
you like, for your own use.

zx...@googlecode.com

unread,
Oct 13, 2010, 12:30:18 PM10/13/10
to zx...@googlegroups.com

Comment #2 on issue 538 by dpavlin: Barcode scanner does not recognize
CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

I needed to do same thing today, so I'm attaching diff which adds CODABAR
to Android.

Hopefully this will save an hour-or-two of poking around to someone who
stumbles upon this issue as I did :-)

Attachments:
zxing-android-codabar-enable.diff 1.2 KB

zx...@googlecode.com

unread,
Oct 13, 2010, 1:25:33 PM10/13/10
to zx...@googlegroups.com

Comment #3 on issue 538 by sro...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

Yup that's it. How well does it work? Then only reason it could be harmful
is if it causes false positive recognition in other scans. Let me know how
it goes for you.

Bas Vijfwinkel

unread,
Oct 14, 2010, 4:49:19 AM10/14/10
to zxing
I added CODABAR support a few months ago for a personal project.
The major problem was the large number of false-positives with other
barcodes.
The decoding itself works pretty fine but there are hardly any limits
or constraints regarding this type.

There is no minimum length (1 character length messages are allowed),
there is no checksum and there is no minimum length for the leading
and trailing whitespace.
All these missing constraints add up to a large number of false
positives for other barcode types and therefore it was decided not to
enable the CODABAR type by default.
If you are planning on using it, just enable it but if you are
planning on scanning various types of barcodes, I would suggest you
add the following 2 constaints :
- minimum leading and trailing whitespace
- minimum number of characters (e.g. minimum of 8 )
Also if you know more about the specific application of the CODABAR
barcodes, check if a checksum character is added
(but as said earlier, this is not part of the CODABAR standard which
was introduced when I was still crwaling around in diapers). =)

Good luck!
Bas Vijfwinkel

On Oct 13, 7:25 pm, zx...@googlecode.com wrote:
> Comment #3 on issue 538 by sro...@gmail.com: Barcode scanner does not  
> recognize CODABAR format barcode used for library cardhttp://code.google.com/p/zxing/issues/detail?id=538

zx...@googlecode.com

unread,
Oct 25, 2010, 9:52:21 AM10/25/10
to zx...@googlegroups.com

Comment #4 on issue 538 by dpavlin: Barcode scanner does not recognize
CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

I'm using zxing on my phone with CODABAR enabled for few weeks now and
haven't seen false positive yet, but I'm mostly testing with CODABAR
barcodes which we have on books in our library.

zx...@googlecode.com

unread,
May 12, 2011, 12:04:22 AM5/12/11
to zx...@googlegroups.com

Comment #5 on issue 538 by harryliu...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

I'm using changes in comment 2, it works perfectly, don't even need to
change core code

zx...@googlecode.com

unread,
May 12, 2011, 12:08:23 AM5/12/11
to zx...@googlegroups.com

Comment #6 on issue 538 by harryliu...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

I'm using changes in comment 2 by dpavlin, it works perfectly, don't even
need to change core code, thanks.

zx...@googlecode.com

unread,
May 25, 2011, 4:53:08 PM5/25/11
to zx...@googlegroups.com

Comment #7 on issue 538 by lmcke...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

Hi, I work for the Contra Costa County Library and we are developing the
ability to check books out using a smart phone. In order to do this, the
phone needs to be able to read our 14 digit codabar barcodes. from reading
the comments above, it looks like the code has already been developed but
may not be included in the current release. Can I ask someone if that is
correct and how I might get you to release the code?

I've see other comments about codabar being problematic because it doesn't
require a check digit. I don't really know much about the standard, but the
barcodes used by most library systems use a 14 digit number with a check
digit. This site gives the information on how the check digit is used for
most library systems: http://www.makebarcode.com/specs/codabar.html


Bas Vijfwinkel

unread,
May 26, 2011, 1:59:07 AM5/26/11
to zxing
Thanks for your suggestion.
The check digit is not part of the official codabar standard and
depending on the
application/vendor various ways of checking the validity of the
codabar barcode have been added.
I don't know what codabar is used for besides libraries so it might be
a good suggestion to add it.

On May 25, 4:53 pm, zx...@googlecode.com wrote:
> Comment #7 on issue 538 by lmcke...@gmail.com: Barcode scanner does not  
> recognize CODABAR format barcode used for library cardhttp://code.google.com/p/zxing/issues/detail?id=538

zx...@googlecode.com

unread,
May 26, 2011, 3:45:48 AM5/26/11
to zx...@googlegroups.com

Comment #8 on issue 538 by sro...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

It is included, but not turned on, since it will result in too many false
positives when scanning other formats. You can write an app that asks it to
scan for only ITF, using Intents.

zx...@googlecode.com

unread,
Jul 13, 2011, 1:23:38 AM7/13/11
to zx...@googlegroups.com

Comment #9 on issue 538 by athom...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

Could a setting be added for users to turn it on, instead of just telling
them to write their own apps?

zx...@googlecode.com

unread,
May 30, 2012, 8:39:12 AM5/30/12
to zx...@googlegroups.com

Comment #10 on issue 538 by geocolum...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

First of all, the codabar format is very dense, so reading it with a camera
is a challenge. The routine in the Java (Android) fork did not work well,
so it was left turned off by default apparently. Also (probably because it
didn't work well), it was not ported over to the Objective-C and CPP
versions. So really, there is no current way to read codabar with ZXing on
iPhone - only on Android. I've tried the routine on Android and it takes a
lot of fiddling with the camera, lighting, position before it finally gets
a read. I too need to read codabar on iPhone, so some custom programming is
going to be required. Note - if you are willing to pay a licensing fee, Red
Laser's SDK claims to read codabar...

zx...@googlecode.com

unread,
May 30, 2012, 10:19:39 AM5/30/12
to zx...@googlegroups.com

Comment #11 on issue 538 by srowen: Barcode scanner does not recognize
CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

The Java version works quite well -- same as any other 1D format. It was
not enabled since Codabar does not have a checksum, and so it's too easy to
read a false positive Codabar barcode. That, and it's not used much.
It wasn't ported just because nobody ported it. RedLaser is a partial port
of zxing, note.

zx...@googlecode.com

unread,
Nov 3, 2012, 4:03:48 PM11/3/12
to zx...@googlegroups.com

Comment #12 on issue 538 by Daniel.Z...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

I _was_ able to scan my library card using Barcode Scanner 4.3.1 for
Android. The format was "CODABAR". Is this now enabled by default?

zx...@googlecode.com

unread,
Nov 3, 2012, 4:43:26 PM11/3/12
to zx...@googlegroups.com

Comment #13 on issue 538 by Daniel.Z...@gmail.com: Barcode scanner does not
recognize CODABAR format barcode used for library card
http://code.google.com/p/zxing/issues/detail?id=538

Yes, codabar is now implemented by default. See:
http://code.google.com/p/zxing/source/detail?r=2158&path=/trunk/android/src/com/google/zxing/client/android/DecodeFormatManager.java

Jeff Brower

unread,
Oct 19, 2015, 9:56:42 AM10/19/15
to zxing, codesite...@google.com, zx...@googlecode.com
Codabar was invented in 1972 for printing by dot-matrix printers and typewriter style impact printers and read back by 1960's technology scanners - there is no way it is too dense when compared to modern barcodes. In fact, this is the main reason it was chosen for our project. It can be easily printed and read back even when printed on the worst of printers and read back on the worst of scanners.

We require Codabar on Android, iOS and Windows phones but it seems to be disabled on iOS by zxing. Is the Apple phone somehow inferior to 1960's technology for scanning?

Is there a way to turn on/off codes that we want to use/ignore - perhaps even to reduce application size - that we could use to turn it back on?

We want to maintain a single unified code base for all 3 phones and we thought we found it with zxing, but not being able to read across all devices seems to be a non-starter for zxing - is there another way to use zxing to accomplish reading both QR and Codabar on all 3 phones?

Bas Vijfwinkel

unread,
Oct 19, 2015, 11:23:08 PM10/19/15
to zxing, codesite...@google.com, zx...@googlecode.com

> We want to maintain a single unified code base for all 3 phones and we thought we found it with zxing, but not being able to read across all devices seems to be a non-starter for zxing - is there another way to use zxing to accomplish reading both QR and Codabar on all 3 phones?

I added Codabar some years ago but during testing we also found out it generates a lot of false positives because it is very similar to other 1D barcodes and does not have any minimum length or checksums build in.
That is why it was disabled, besides the fact that it is not as popular as other types.

If you maintain your own codebase you might consider forking the project and just building it yourself with the codabar settings turned on.

You could also try to send a request to have to iOS version updated so that it works in the same way as Android. Those settings should be similar.


Reply all
Reply to author
Forward
0 new messages