jgiam.com

Just another WordPress weblog

Archive for January 13th, 2009

Using Zebra for batch processing

without comments

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.

Read the rest of this entry »

Written by Jon G

January 13th, 2009 at 4:10 pm

Posted in Techie Corner

Tagged with