Tuesday, November 27, 2007

ZXing 1d/2d Barcode decoding source code released



Recently in the New York Times, we placed a small graphic as part of a Google Print Ad. You aren't looking at one of those eye focus games (It's a sailboat! Or a shark!) but a two-dimensional barcode. Those of us who already know what it is pulled out our phones and "clicked" it with the camera, and were connected to the advertiser's web site. "Wha?", you say? See http://www.google.com/printads/barcode. While this kind of thing has been a common sight in Asia for years, this ad is one of many signs that the technology is arriving in Europe and North America.

But Advertising is only part of the story here. Engineering is also involved and we want to improve the quality and availability of barcode reader software available to developers and end users. So today I would like to announce the "ZXing" (from: "zebra crossing") project, an open-source, Java, multi-format 1D/2D barcode reader which can be built into a reader application for Java and Java ME -- and later, Android.

This project began as a 20% project and is not yet complete, so opening it up is a bit of an experiment. It's not yet the Best Barcode Reader Ever, but it's looking pretty good. For now we want to find those those who can make use of and help improve what's here, so that those good ideas are shared to all developers and everybody wins.

Developers can find the ZXing project on Google Code, and we hope you'll join us on our Google Group and tell us about what you like and don't like about the code.

15 comments:

  1. Nice. Are you aware of any OSS code to generate QR codes? I'd be particularly interested in javascript code; but a serverside script would also be quite nice.

    It seems it shouldn't be that hard to implement. Generating grids of white and black blocks should be quite easy in a browser.

    ReplyDelete
  2. I'm not aware of an open-source Java QR Code encoder, no. We have an encoder internally and it's on the to-do list to port that, clean it up, and release it too, but the decoder is a priority at the moment.

    ReplyDelete
  3. Is this for generating the 2d barcode or reading it

    ReplyDelete
  4. This is only for reading barcodes.

    ReplyDelete
  5. I'm unsure why we would need barcode software for 2d bar codes, or even why 2D bar codes are around. Aren't regular bar codes doing the job just well enough?

    ReplyDelete
  6. Ha, that is a fair question. 1D barcodes, meaning UPC or EAN barcodes typically, only encode a string of numbers, typically a product number. Formats like Code 39 or Code 128 can potentially represent text, but their size tends to get unwieldy.

    For whatever reason, formats like QR Code sprang up. They cram more data into a smaller space and add features like error correction. Their size and ability to handle more complex data like URLs and contact information made them useful.

    I suppose I'd say it's because 2D barcode formats are much more suitable for more interesting applications like encoding URLs and contact information.

    ReplyDelete
  7. Another reason for 2D barcodes is that they are easier to scan using a camera. A big problem with 1D barcodes is that the thickness of the bars has meaning. 2D barcodes have two useful features: all blocks are the same size and there is error correction built in if you manage to scan a few blocks wrong.

    ReplyDelete
  8. Hi there,

    I just found your post and got to admit i found it very interesting! A while back I brought some software so that I was able to print out my own barcode labels. The software was not really that good as it would never properly create my barcode labels. In the end I found a British labels company who printed my barcode labels for me at a low cost. It saved me a lot of messing around really!

    ReplyDelete
  9. This comment has been removed by a blog administrator.

    ReplyDelete
  10. 2D barcode scanners can carry a ton more information than a regular 1D.

    mrgs, you would need 2D software to print a 2d barcode.

    As a marketing developer for a barcoding company, I'm really excited to see how this will change advertising.

    ReplyDelete
  11. I want to know about color 2D barcods and reader softwares.who can help me?

    ReplyDelete
  12. daryush: Why not post your question to the discussion group for this project? See http://groups.google.com/group/zxing/

    ReplyDelete
  13. 2d Barcode reader is going to be essential in the every new phone.

    You can use it as the connection interface with your browser:

    "Plugin" to your browser - generate QR Codes from the page links on the fly


    Simply drag and drop javascript bookmarklet to your browser's bookmark panel. You can use it for direct downloading .jad (.cab, .html, ...) file to your phone. No typing, no connecting to the PC, no SMS. If the link which you need exists on the current page, click bookmark button and you will get QRCode in small window, ready for shooting in your ZXing or similar software.

    More info:
    http://wikarski.com/cms/content/generate-qr-code-your-web-page-links

    ReplyDelete
  14. Your information seems to be very helpful for all developers.Thanks.

    ReplyDelete