Archive for the ‘Research’ Category

Little comparison of barcode recognition components

Monday, November 10th, 2008

to get a little impression on the recognition quality of our barcode library (called Project Bamby) we decided to compare the recognition rate of several publicly available commercial and non-commercial barcode recognition tools/libraries.

For evaluation we’ve chosen 30 different sample images with variable recognition difficulty and tested wheter the different components are able to locate and decode the barcode.
These images can be viewed by clicking on the image number on the left side of the table below.

To save space we denote the different components with letters from A to K whereas

Image A B C D E F G H I J
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

And finally a small chart that shows an overall recognition rate comparison including false positives.

The results may be a little bit biased towards Project Bamby as some of the pictures we used to compare are the same used while developing. Therefore this library may have a little advantage (although we cannot imagine very different images that may not be recognized).

Thresholding for fun and profit!

Monday, November 10th, 2008

Thresholding is one of the vital steps in many preprocessing scenarios. The idea is to distinguish between foreground and background pixels to extract information. The big problem is to decide a threshold for each pixel without losing information or introducing noise. We have tested a couple of thresholding methods for our project within the spatial domain. We tested thresholding algorithms that were proposed within the domain of character recognition.

Local Thresholding

Local Threshdolding is a class of thresholding algorithms that calculate a single threshold for every pixel within an image. The advantage is that uneven illumination can be handled better than within a global thresholding algorithm. The idea is that a certain pixel threshold is calculated in respect of the pixel statistics surrounding the pixel of interest.  The boundary is usually called a local window.

One problem when using local thresholding is to find a good size for this local window. It should span 1-2 characters within OCR applications to be efficient. This is not so easy with barcode recognition. As we do not know (and do not want) the scaling of the image, and hence the barcode size, we can not guarantee that the local window spans foreground and background pixels. Because the pixel thresholds are calculated in respect of the statistics of surrounding pixels, light barcode pixels might be classified as background pixels if the local windows is too small (covering only foreground (barcode) pixels). This results in a hole within the barcode line, which certainly is not wanted.

Global Thresholding

Global thresholding algorithms calculate a common thresholding value for every pixel within the image. Uneven illumination can introduce noise and false pixel classifications. Images of bad quality (through glare or blur) introduce some unwanted effects as well. So global binarization algorithms do not seem to be a very good idea on the first impression (related to barcode localization). But what if we use the binarization to classify between edge and none edge pixels? This of course involves some way of edge detection (like using the sobel operator). Or course the edge detection operator might be fooled by glare. But it will only detect the edges of the glarred spot and introduce a much smaller error. The thresholding then does not classify between foreground or background pixels, but between edge and non edge pixels.

Summary

Local thresholding can handle bad quality images better than Global thresholding but it’s tough to decide a good local window size. If the window is too small barcode pixels might get lost, if the window is too big the algorithm speed decreases as well as the threshold qualities. A good tradeoff is to use global thresholding on a preprocessed images to classify between edge and non-edge pixels.

Local Binarization 1

Local Binarization on grayalue Image

Local Binarization 2

Local Binarization on grayvalue Image

Global Binarization of Edge Image

Global Binarization on Edge Image

Barcodes here, Barcodes there …

Monday, November 3rd, 2008

… Barcodes everywhere.

Sorry about the long gap since the last post, summer break and a new very interesseting research project took some of the spare time. I hope i will be able to give some more info about the Robot Kinematics as well as some Java3D Gotchas (and annoying library issues) soon :)

As mentioned before, our current (almost done) research project is about Barcode Localization and Decoding. We developed a very stable localization method using classical image processing methods as well as applied statistics. Our decoding uses a very robust method for line classification using paramterizable non-linear membership functions.

We plan to improve to optimize the code further and run a study comparing the effectiveness of public available barcode recognition software. Later we will cover some topics of interest relating to the development of this methods.

A few Screenshots of the current version:

Decoded Image without Localization Visualization Decoded Image with Localization Information
Decoded Barcode without Localization Visualization Decoded Image with Localization Information

Project Sputnik

Monday, July 14th, 2008

Here is a video preview of Project Sputnik, a research project facing with 3D robot simulation and inverse kinematics in Java. An article covering more details will be available soon.