Noise and Denoising

A clean barcode signal will be a step signal alternating between 0 and 1. In this ideal case, a simple hard threshold can be used. If the signal is greater than 0.5, say, we take it to be 1, 0 if less than 0.5. But this simple analog filter cannot always be used on actual noisy signals. Although this method works very well in many settings, such as grocery store scanners, there are many applications in which this thresholding approach fails. An illustration of this fact is given in a paper by Muniz et. al. (IEEE, 1999). Pharmacies send requests for prescription drugs to a central distribution center. Each request contains three barcodes: one each for the price, patient, and prescription serial number. A distribution center in a metropolitan area may receive 1-5 million request per month, which means 3-15 million barcodes to scan. The requests are often smudged, printed with low-quality dot matrix printers, and contain stray marks from the pharmacist and shipper. One case study of an automated reader in Spain showed that the simple analog filter was able to successfully decipher about half of the barcodes. This is clearly unacceptable and superior denoising methods are needed.

There are three basic types of noise in any signal from a barcode laser scanner:

Speckle noise
Ambient light
Electrical noise
Speckle noise refers to physical defects in the barcode being scanned, such as poor paper quality and smudges or stray marks on the barcode. The ambient light interferes with the signal quality and the effect increases as the distance of the scanner from the barcode increases. The electrical noise are defects inherent in the scanner. Since the laser spot must necessarily have non-zero size, there is a blurring or smoothing of the barcode signal, making it difficult to identify the precise location of the jumps. We model the laser spot with a Gaussian g(x) = a e-(x/w)2, where a is the amplitude and w is the width of the Gaussian. Note w depends on the beam size and a is affected by the ambient light. The constants w should be small enough so that the Gaussian is a fraction of the width of the narrowest bar. Otherwise, the signal will be undecipherable.
We convolve our barcode signal b with our Gaussian to obtain a noisy signal h = b*g. To simulate the other types of noise, we add small random pertubations to the convolved signal: h = b*g + n. The file make_noisy.m produces a noisy signal on a specified barcode signal b, amplitude a, and width w. The call is of the form "h = make_noisy (b, a, w)". This program can be used in conjunction with upc2signal.m to generate test data. By changing the value of w sent to make_noisy.m and the value of the variable noise within the program, we can control the level of noise.
Back to Main Page Next: Signal Denoising Using Otsu's Algorithm on Peak Strengths