Archive for January, 2009
Using Zebra for batch processing
As mentioned in my previous post, Zebra, more specifically, zebraimg, the barcode recognition component, is fast and rather accurate. However, the program isn’t really made for batch processing of barcodes. Yes, you can execute zebraimg *.jpg, but the problem is that it is difficult to extract information on which barcodes were successfully recognised, which were ambiguous, and which failed. I initially ran this command to process my barcodes, but ended up having to cross-check the results, which wasted quite a bit of time. I wanted some formatting of results to make it easier to identify problematic barcodes.
A simple script would be able to format the recognition results. Because I am not familiar with shell scripting, I wrote one in PHP instead.
The gist of the script is that it scans the working directory for all JPEGs, runs zebraimg and writes the result to a file. The result is saved in a CSV format with the filename and zero or more recognised barcodes.
Visit to the Singapore Zoo
Before my next post on zebraimg, how about some actual zebras?
This was from my visit to the Singapore Zoo in December. Do check out the rest of the album here, or my dA for selected photos.
Cataloguing my home library
I have many books at home, and I’ve always wanted to keep a catalogue of my books. But because I have so many books, manually typing in ISBNs was out of the question. I wanted a tech solution, preferably free. I explored the possibility of software to recognise barcodes from photos, since it would be easy to snap photos of barcodes of my books.
Being a Windows person, I searched for and tried Windows programs first. The only candidate I found was bcTester. It recognised the first photo, then choked on the second. I tried cropping that, and it recognised it, but then choked on the third. To make it easier, I adjusted my photos to increase the contrast (easily done in batch), but cropping each photo individually would defeat the whole purpose of my “exercise”, and bcTester did not support batch processing either, so I decided to pass.
The next program I tried was Zebra, a *nix open-source project. I spent some time getting the pre-requisites installed, including messing around with some symbolic links, before I managed to successfully compile and run zebraimg. Once I did, zebraimg was just amazing. It zipped through my barcode images and got most correct.

