Reading Barcodes Etched on Shiny Surfaces Using Basic Image Processing

I recently came across a research paper by Timothy Ensminger and Paul Poppe regarding the issue of reading etched barcodes on shiny surfaces that was quite intriguing.

Barcodes are often used to track containers that hold hazardous waste. Often times, these barcodes are etched onto a stainless steel container using a pulsed laser or acid etching process. Because of the reflective nature of stainless steal, laser-based scanners do not function well when reading the barcodes and image processing solutions are highly sought after.

In order to better read etched barcodes, the researchers worked on automating the process, using a digital video camera. By creating a software algorithm that can locate barcodes in an image and decode them, it is hoped that etched barcodes will be able to be read more easily.

Since most containers use Code 39, the researched developed a Matlab script that could decode it. Then, they augmented the code by segmenting the images and performing a PCA routine to determine the location of the barcodes. From there, the script could be applied to photographs taken in different lighting conditions, with different depths of field, adapting the code to work with as many images as possible.

After much trial and error, Ensminger and Poppe identified that the threshold value for the images would identify approximately 25% of the pixels as the foreground. Once the image had reached its threshold, it was necessary to identify the region of the image that contained the barcode. By comparing height/width ratios of regions large enough to possibly contain the barcode, they were able to pick the section whose ratio was closest to the actual barcode. Then, they projected a line through the middle of the barcode and matched the pattern of bars and spaces to a database of code values.

After a series of tests, the researchers concluded that, given further development, they could write a code robust enough to more successfully read etched barcodes on shiny surfaces…something that does not currently exist today.

While their study is still considered preliminary research, they hope it will lead to better solutions for the future.