As described earlier, we model the smoothing effect of the laser spot by convolving our clean barcode signal b with a Gaussian g(x) = a e-(x/w)2 of unknown amplitude a and width w. The idea behind the total variational (TV) approach is to reduce the overall difference between the convolved signal g*b and the given noisy barcode signal h. But to control the "spikiness" of the barcode signal b that we find, we add a second term that measures the total variation of b itself. We define our energy J as follows, with the constants described in the reference table below:
| h | Given barcode signal. May be noisy. |
| g | Gaussian g(x) = a e-(x/w)2 |
| a | Gaussian amplitude. Needs to be determined. |
| w | Gaussian width. Needs to be determined. |
| b | Clean barcode signal. This is what we are trying to find. |
| || ||2 | L2 Norm |
| || ||1 | L1 Norm |
| k | Balancing constant. Determines relative effect of the second term. |
Note this approach could be adapted to work on the derivative signals h' and b', if desired. For computational purposes, we fix a small value epsilon and minimize over b, a, and w. The minimization is

The energy above is calculated in the program J_fun3.m. The value of the constant k should be determined experimentally and should work for a broad range of barcodes. Since the first term gets larger as the size of the signal gets larger and the norm is squared, k should actually depend on N2, where N is the length of the vector b. We found the value k = 0.1 N2 worked well.
Unfortunately, there is no guarantee that the search space will be convex. The plots below show the energy J for various values of a and w. The barcode signal b was a clean UPC signal '0123456789' generated by upc2signal.m. The signal h was the convolution b*g. The value of k was set to zero, since b is fixed so the second term will always be the same. Even without any noise added, the surface plots do not appear convex. Nor are we guaranteed there will be only one local minimum. But we will proceed with the minimization in the next section with the understanding that the local minimum we find may not be the global minimum.


Back to Main Page |
Next: Steepest Descent Minimization |