• No results found

Chapter 4 Bayesian Approach to Bar Code Denoising

4.1.1 Background

Barcodes are everywhere in our daily life and are used for in identification for almost all business areas. For example, in supermarkets, most grocery items carry a simple barcode known as the Universal Product Code (UPC). One can check out by simply scanning the UPCs in front of a laser scanner at an automatic machine. In the UPC-A symbology, a (one dimensional) barcode consists of a series of of black bars and white spaces above a sequence of 12 numerical digits. There is one-to-one correspondence between these digits and the sequence of black bars and white spaces, and both uniquely determine a barcode. Figure 4.1 presents a typical example of UPC-A barcode. For a detailed description of various barcode symbologies, we refer the interested reader to [183]. In practice, depending on how a barcode is scanned, the barcode signal can be noisy and blurred due to distance, vibrations, etc. Thus a natural question arises: how to reconstruct the original barcode from a noisy signal?

A one dimensional barcode is modelled as a binary functionu : [−1,1]→ {±1}. The signal recoded by a scanner is usually modelled as

f =Gσ∗u+n (4.1)

where∗ denotes the convolution operator on[−1,1], Gσ is a centred Gaussian kernel of

varianceσ Gσ(x) = 1 √ 2πσe −x2 2σ2.

Figure 4.1: An example of UPC-A barcode [131]. More precisely, Gσ∗u(x) = Z 1 −1 Gσ(x−y)u(y)dy.

The functionnrepresents the random noise. Figure 4.2 provides examples of clean and noisy signals. The Gaussian convolution models the process of blurring. The matter in question becomes an inverse problem of recovering the unknownugiven the dataf. The mathematical formulation of above barcode inverse problem was firstly set up by Esedoglu [88], where he established the uniqueness of solutions of the inverse problem in the ab- sence of noise. He also analysed a series of minimisation problems based on total varia- tion regularisation and proposed a phase field based numerical algorithm for solving the minimisation problem. The barcode problem can be viewed as a special signal/image pro- cessing problem where the signal/image in question is piecewise constant. Hence many image restoration methods can in principle be applied to the barcode problem. Below we briefly review some important previous work on image reconstruction with emphasis on their applications in barcode problems. Generally speaking, most methods discussed in the literature can be classified into two categories: variational and Bayesian.

Total Variation regularisation.The total variation (TV) regularisation method was firstly proposed by Rudin, Osher and Fatemi (ROF) [202] for solving image denoising prob- lems. In the ROF model, the standard Tikhonov regulariser, involving theL2-norm of the gradient, is replaced by the TV-norm, that is theL1-norm of the gradient. This simple re- placements leads to a remarkable improvement in image enhancement, since the TV-based regularisation does not impose strong smoothness constraints and thereby promotes high contrast edges. In the last two decades, TV-based methods have produced enormous impact in modern image processing [40,49,50] and a broad range of areas of applied mathematics including compressive sensing [193,203] and sparse representation [51,206,212]. In the context of barcode reconstruction, Esedoglu firstly proposed a blind deconvolution method- ology based on the TV-regularisation and considered the minimisation problem of the form

-1 -0.5 0 0.5 1 -1.5 -1 -0.5 0 0.5 1 1.5 -1 -0.5 0 0.5 1 -3 -2 -1 0 1 2 3 -1 -0.5 0 0.5 1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8

Figure 4.2: Top left: original barcode signal. Top right: clean binary signal. Bottom left: observed signal with additive noise only. Bottom right: observed signal with blurring and additive noise.

inf

u∈BV((−1,1);{−1,1})

kukT V +λkGσ∗u−fkL2. (4.2)

where total variation semi-normkukT V =

R

|∇u|andλis a weighted constant. The ex- istence of the minimisers of the problem (4.2) and other relevant minimisation problems is established in [88]. Recently, the same variational problem (withσ known a priori) is analysed by Choksi et. al. in [53] and [54] where the authors present sufficient conditions such that the variational problem has a unique minimiser and is given by the original bar code signal.

Phase Field Approach.The phase field method, also known as the diffuse interface method, is usually used as an approximation technique to TV-regularisation and is amenable to numerical computations; see [29, 37, 64]. The idea is to relax the problem (4.2) by replacing the total variational semi-norm by the Ginzburg-Landau functional defined in

(2.3). This leads to the variational problem inf u∈H1 Z ε 2|∇u(x)| 2+ 1 εV(u(x))dx+λkGσ∗u−fkL2. (4.3)

withV a double well potential taking minimisers {±1}andε > 0. Since the functional of (4.3) is smooth functional inu, the minimisation can be implemented by many numer- ical algorithms, for example the gradient descent method. The parameter εcontrols the thickness of a diffuse interface separating two constant phases{u=±1}. It can be shown by the standardΓ-convergence theory that a minimiser of (4.3) converges to a minimiser of (4.2) asε ↓ 0. Esedoglu and Santosa [89] even derived explicit error bounds for the phase field approximation under some conditions on the blurring widthσ, the noise level and the parameterε. The paper [29] introduced and analysed a convergent iterative scheme for solving the phase field based models for binary recovery.

Beside the approaches discussed above, the Mumford-Shah [174] regularisation and level set methods [37,179] are another two important methods that have been commonly used in image processing and geometry inversion. We refer to [37,123,150,151,204,218,

223] for more details.

Bayesian Approach. The application of Bayesian inference in image restoration has a long history; see early work in [122,175]. The monograph [230] provides an excel- lent survey of Bayesian image analysis from a mathematical perspective. In the context of the restoration of blocky images, Calvetti and Somersalo [41, 42] proposed a unified hi- erarchical Bayesian framework for the purpose of edge-preserving, and they showed how to obtain classical regularisation methods, including the TV-regularisation, from the MAP estimators by careful choices of hyperpriors. However, the models considered in their pa- pers are in discretised form and thus finite dimensional. Helin and Lassas [118] adopted a Bayesian approach for linear inverse problems based on hierarchical Gaussian models and they showed convergence of the MAP estimator to the minimiser of the Mumford-Shah functional as the discretisation parameter tends to infinity. In the recent unpublished note [86], the authors put forward a Bayesian method for recovering piecewise constant signals. With a particular choice of a noise-level-dependent non-Gaussian prior, they show that the resulting MAP estimation is connected to the phase field approach, which in addition is linked to the TV-regularisation in the limit of vanishing noise.