one-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · one-dimensional...

13
HAL Id: hal-00805824 https://hal.archives-ouvertes.fr/hal-00805824 Submitted on 29 Mar 2013 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. One-dimensional barcode reading: an information theoretic approach Karim Houni, Wadih Sawaya, Yves Delignon To cite this version: Karim Houni, Wadih Sawaya, Yves Delignon. One-dimensional barcode reading: an information theoretic approach. Applied optics, Optical Society of America, 2008, Vol. 47, Issue 8, pp. (2008) (8), pp.1025-1036. 10.1364/AO.47.001025. hal-00805824

Upload: others

Post on 04-Dec-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

HAL Id: hal-00805824https://hal.archives-ouvertes.fr/hal-00805824

Submitted on 29 Mar 2013

HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, estdestinée au dépôt et à la diffusion de documentsscientifiques de niveau recherche, publiés ou non,émanant des établissements d’enseignement et derecherche français ou étrangers, des laboratoirespublics ou privés.

One-dimensional barcode reading: an informationtheoretic approach

Karim Houni, Wadih Sawaya, Yves Delignon

To cite this version:Karim Houni, Wadih Sawaya, Yves Delignon. One-dimensional barcode reading: an informationtheoretic approach. Applied optics, Optical Society of America, 2008, Vol. 47, Issue 8, pp. (2008) (8),pp.1025-1036. �10.1364/AO.47.001025�. �hal-00805824�

Page 2: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

One-dimensional barcode reading: an information

theoretic approach

Karim Houni,1,* Wadih Sawaya,1 and Yves Delignon2

1Telecom Lille 1, rue G. Marconi, 59650 Villeneuve d’Ascq, France2Groupe des Écoles des Télécommunications, Institut National des Télécommunications, Telecom Lille 1, rue G. Marconi,

59650 Villeneuve d’Ascq, France

*Corresponding author: [email protected]

Received 31 July 2007; revised 6 January 2008; accepted 13 January 2008;posted 23 January 2008 (Doc. ID 85845); published 3 March 2008

In the convergence context of identification technology and information-data transmission, the barcodefound its place as the simplest and the most pervasive solution for new uses, especially within mobilecommerce, bringing youth to this long-lived technology. From a communication theory point of view,a barcode is a singular coding based on a graphical representation of the information to be transmitted.We present an information theoretic approach for 1D image-based barcode reading analysis. With a bar-code facing the camera, distortions and acquisition are modeled as a communication channel. Theperformance of the system is evaluated by means of the average mutual information quantity. Onthe basis of this theoretical criterion for a reliable transmission, we introduce two new measures:the theoretical depth of field and the theoretical resolution. Simulations illustrate the gain of this ap-proach. © 2008 Optical Society of America

OCIS codes: 100.2960, 110.3055.

1. Introduction

Since the beginning of the 1970s, barcodes have beenused for automatic identification and traceability ofconsumer goods and parcel post. Because of its sim-plicity, this technology quickly became inescapable inelectronic data interchange. Nowadays this tendencyhas been strengthened with the development of tagreading and new services such as mobile ticketing.Basically, a barcode conveys binary information

to be decoded by a reading device. Barcode readingtechnologies are thus singular communication sys-tems in which messages are graphically modulatedbefore transmission. In several commercial appli-cations 2D barcodes have progressively become wide-spread. However, 1D barcodes still flood the marketof automatic identification, as they may require onlya simple linear imager as a reader and are more ro-bust to relative misplacement. The scientific litera-

ture has dedicated few works to 1D and 2Dbarcode coding. Pavlidis et al. [1,2] published a studyrelated to information theory fundamentals outlin-ing the process for barcode design using error detect-ing and correcting techniques. Tsi et al.[3] developeda method that allows the calculation of the workingrange in case of a CCD-based reader. Illuminationlevel, image contrast, and the number of pixels permodule — i.e., pixels per image bar width — havebeen presented to be three important limiting factorsfor the working range. From a technical point of view,additional parameters specify the performance ofsuch readers, and wemention as instances resolution(smallest readable bar width), scanning angle, andacceptable skew or pitch rotations. Neither in thescientific literature nor in technical booklets are spe-cifications given concerning the quantity of informa-tion that can be transmitted accurately, which is stillthe goal of the system.

Our first objective is to evaluate the average infor-mation quantity that can reliably be recovered by adigital imager reading a barcode. A barcode indeed

0003-6935/08/081025-12$15.00/0© 2008 Optical Society of America

10 March 2008 / Vol. 47, No. 8 / APPLIED OPTICS 1025

Page 3: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

contains an amount of information measured in bitsand graphically mapped. As we are dealing with datatransmission, we consider the problem from a com-munication point of view and model it according tothe Shannon paradigm with a source of information,a channel, and the user of the information. The barwidth, the camera’s optical and electronic settings,and the relative positioning of the barcode and thesensor constitute the principal characteristics ofthe channel. We then address the problem of the in-formation quantity that this channel can transmitaccurately for a given probability distribution of itsinput alphabet. From this point of view, the averagemutual information (AMI) between the input and theoutput of the channel is the commonly accepted mea-sure in bits/barcode or bits/sequence of the amount ofinformation transmitted through the channel.The interest in information theory for optical sys-

tem design and analysis is indeed a growing trend.Without being exhaustive, let us cite the works ofO’Sullivan et al., who proposed a survey [4] on theimage formation problem; in addition Brady andNeifeld published an introductive paper on informa-tion theoretic analysis of optical components [5].More specifically, Wagner and Häusler in [6] andHuck et al. in [7] proposed information theoretic tech-niques for the optimization of image sensors to re-duce redundancy in the acquisition process.In a second phase of this work we evaluate some

performance measures regarding the computedAMI. What are the minimum values required forfactors such as bar width, positioning, noise, impre-cise handling, or relative positioning of the readerand the barcode, in order to totally recover a givenamount of information? From these limits wepropose theoretical values for depth of field andresolution.AMI is not a measure of these performances but a

theoretical criterion needed to evaluate them. Theseperformances are theoretical in the sense that theycould be achieved under an infinitely hard hypoth-esis. Other criterion could be used to quantify them,such as visual acuity or digital imaging require-ments. In [3] three factors are judiciously presentedto evaluate the working range and resolution. Allthese factors have aminimum required value regard-ing complexity of the signal processing circuitry anddecoding ability. The criteria in that case are prag-matic and related to technology advances and detec-tion algorithm sophistication, whereas the AMIcriterion is theoretical and disregards complexityand decoding delays. Moreover, among all the criterianoted above, only AMI is based on information,which is the object and goal of the system.In digital transmission, error probability is a qual-

ity measure evaluated under optimal detectioncriteria and for a given barcode design. Like AMI,it is based on information, but in terms of acceptableloss of information bits in the transmission—detection process. Computation of the error probabil-ity requires knowledge of the coding design and is

intractable for channels with memory, so it is usuallyrepresented by its upper and lower bounds. AMI inreturn does not consider how the mapping of infor-mation to a graphical representation is realized.For these reasons we prefer AMI to the error prob-ability criterion, as it is not limited to a particularcode design and opens up the way to new code designmotivated by the challenge of filling in the gapbetween the actually achieved performances andthe theoretically possible ones.

The outline of this paper is as follows: in Section 2distortions, including blur coming from both the freepositioning of the barcode and the optical character-istics of the reader, are detailed. Section 3 is devotedto AMI. A stochastic model of the captured linear im-age is first developed. This model takes into accountall the characteristics described earlier in Section 2.Then an algorithm based on the Monte Carlo methodand the algorithm of [15] (the BCJR algorithm) pro-posed for the estimation of AMI. Section 4 showsthe relevance of AMI, theoretical depth of field,and theoretical resolution through realistic examplesof linear imagers. Influences of both the optical blockcharacteristics and the free positioning of the bar-code are also studied. Section 5 concludes this paper.

2. System Description and Distortions

The barcode is a graphical mapping of n independentbinary symbols into n black or white ω width barsdisplayed on a white plane denoted Π. By conven-tion, black and white bars, respectively, carry thesymbols 0 and 1 with probability 0.5. The rightand left sides of the white background are consideredstart and end bars. They are indexed as 0 and nþ 1

[Fig. 1(a)]. The barcode is randomly oriented andlocated in front of a camera characterized by its focallength f , an aperture with specific shape (commonlycircular or square), and a sensor located on a planeΠ0. We deal in this paper with a linear imager as thesensor with a row of N square pixels of side length ρ.In the image plane each bar is represented by Nm

pixels. The Euclidean 3D space—denoted e—towhich the barcode and the camera belong is specified

by the Cartesian coordinate system RðO; x!; y!; z!Þ.Oand~z are, respectively, the optical center and the op-tical axis of the linear imager. The sensor plane Π0 isorthogonal to the optical axis and is centered onO0 ¼ ð0; 0;ZcÞ. The barcode is arbitrarily moved,giving it six degrees of freedom, three translationsand three rotations (ψ ;ϕ; θ) (Fig. 2). To each positioncorresponds an image projected onto Π0, divided intonþ 2 areas BC0

k, k ∈ f0; :::;nþ 1g [Fig. 1(b)]. Finally,we assume that the linear imager reads the entirewidth of the barcode.

A. Image Formation and Distortions

We consider here the image formation process, high-lighting the link between positioning and distortions.Camera characteristics and free positioning of the

1026 APPLIED OPTICS / Vol. 47, No. 8 / 10 March 2008

Page 4: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

barcode induce four principal artifacts in the imageformation process:

• Geometrical distortions,• Radiant flux decay,• Blur,• Spatial nonalignment between projected bar

frontiers and pixel borders.

1. Geometrical Distortions

Perspective projection onΠ0 induces geometrical dis-tortions in the image of a barcode. The distortion isdefined by the mathematical operator Tð⋅Þ such thatto any pointMðu; v;ZÞ belonging toΠ corresponds itsprojected point M0ðu; v;ZcÞ on Π0:

M0ðTðu; v;ZcÞÞ ¼ TðMðx; y; zÞÞ: ð1Þ

The positions of the bars of a barcode projected ontoΠ0 are thus exactly known.

2. Radiant Flux Decay

We refer now to radiometric quantities to measurepower or its distribution radiating to the sensorthrough the optical aperture [8,9]. BCi is an area re-flecting or emitting light, and the radiance XðMÞmeasures the power per unit area per unit solidangle ðWm−2 sr−1Þ leaving a point M in BCi. We con-sider a homogeneous distribution over the surface,that is, XðMÞ ¼ X i∀M ∈ BCi, and perfect diffuse sur-faces (Lambertian surfaces), where the radiance

value is independent of the direction of illumination.The radiated power per unit solid angle ðWsr−1Þemanating from any direction having an angleβ ¼ βðM;Ψ;ϕÞ with the normal to an elementaryarea dS around M is X idS cosðβÞ. The solid angleΓ subtended by the optical aperture of area Sa fromM is

Γ ¼ Sa cosðαMÞ=r2M

with r2M ¼ ‖OM��!

‖2 and αM the angle betweenOM��!

andO~z. For barcode positions in which rM is much largerthan the optical aperture, the elementary area dS il-luminates the thin lens with a total power equal to

ΦðMÞ ≈ X idS cosðβÞSa cosðαMÞ

r2M: ð2Þ

This expression shows that radiated power decayswith 1=r2M and falls as the barcode deviates and/or

is rotated relative to the image plane. For a lenstransmission factor equal to 1, i.e., with no power lossbetween the lens and the sensor plane Π0, the sensorirradiance (Wm−2) at point M0ðu; v;ZcÞ of BC0

i pro-duced by the pointMðx; y;ZoÞ of BCi is approximately

IðM0Þ ≈ X i cosðβÞSa cos αM

r2M

dS

dS0 ;

where dS0 is the image patch of dS centered on M0.Using perspective projection geometry, one can es-tablish the relation between the two elementary sur-faces as

dS

dS0 ¼cos αMcos β

Zo

Zc

�2

;

Fig. 1. Barcode displayed on (a) Π, (b) barcode projected on Π0, and (c) barcode capture.

Fig. 2. Spatial settings and conventions.

10 March 2008 / Vol. 47, No. 8 / APPLIED OPTICS 1027

Page 5: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

where Zo is the coordinate of point M on the O~z axiswith rM ¼ Zo=jcos αMj, which yields

IðM0Þ ¼ X i cos4ðαMÞðSa=Z

2c Þ: ð3Þ

Finally, let us remark that IðM0Þ can be written as

IðM0Þ ¼Xnþ1

j¼0

X j cos4ðαMÞ

Sa

Z2c

1BC0jðM0Þ ð4Þ

with 1BC0jðMÞ ¼ 1 for M0 ∈ BC0

j, 0 elsewhere.

3. Optical Blur

The blur is derived from the laws of both geometricaloptics and Fourier optics. The former establishes therelation of the well-known thin lens formula [3](Fig. 3), expressed for an object point Mðx; y;Zof Þand its focused image point M0ðu; v;ZcÞ as

1

Zc

¼1

f�

1

Zof

: ð5Þ

Π0 has a single corresponding object plane Π placedon Zof , and a misplacement of Π leads to anunfocused image on Π0. In addition, Fourier opticsemphasizes diffraction, which also gives rise to blur[10].Thus, the blurring process is modeled by a global

optical transfer function HBðf u; f vÞ, with f u and f vdenoting spatial frequencies, and its equivalent pointspread function (hB) on the image planeHB is a func-tion of optical aperture shape [10]:

HBðf u; f vÞ ¼ f ðoptical apertureÞ: ð6Þ

The resulting irradiance IBðM0Þ at any point M0 of Π0

is then the 2D convolution of hB with IðM0Þ:

IBðM0Þ ¼ ðI � �hBÞðM

0Þ; ð7Þ

where �� denotes 2D convolution.In classical photography the spread of a light ray is

identified as a blur circle (circle of confusion) on thesensor plane. As long as the blur circle does not ex-ceed a given diameter, the image will appear to be infocus to the human viewer. One can then define amaximum permissible blur circle to ensure thislatter condition according to human eye acuity. Dis-placements around the in-focus position give rise totwo possible values of Zo corresponding to the maxi-

mum permissible blur circle. One position is in frontof the focus point Zof , and another one, which here-after is denoted Zd, beyond it. These two positionsgive rise to a measure well used by photographers,which is the depth-of-field region. As we deal withautomatic processing of barcodes, we omit the eyeresolution criterion and fix the maximum tolerableblur circle to one pixel size, with the resultingdepth-of-field region as the reference.

4. Spatial Nonalignment

Each pixel integrates irradiance values in its area.Because of the random width value ω0 of the pro-jected bar BC0

j, this operation may involve irradiancevalues resulting from one or more projected bars[Fig. 1(b)]. This creates interference between adja-cent data, referred to as spatial nonalignment inter-ference. Spatial nonalignment interference dependson ω0, on pixel size ρ, and on the shift amplitude be-tween the edges of the projected image and the pixel.If the barcode is orthogonal to the O~z axis, we canexpress ω0 simply as a function of the magnificationfactor and width ω of the bar. The number of pixelsNM involved to generate the gray levelGi can then beexpressed as

Nm ¼

Zc

Zo

ω

ρ

þ k; ð8Þ

where ½·� denotes the integer part of a real numberand k is a random variable taking its value fromthe set f1; 2g. When this ratio decreases, the spatialnonalignment artifact becomes the preponderantcause of interference. Nm refers to the number ofpixels per module (the width of a projected bar).

The integration process over a pixel can be mod-eled as a moving average filter with an impulseresponse described as

hIðu; v; zÞ ¼ ð1=ρ2Þ1½�ρ=2;ρ=2�2ðu; vÞδðz� ZcÞ: ð9Þ

The resulting image is then the convolution of hI

with IB obtained in Eq. (7):

IRðM0Þ ¼ ðIB � �hIÞðM

0Þ ¼ ðI � �hB � �hIÞðM0Þ: ð10Þ

IRðM0Þ is then sampled at points fM0

k; k ∈

f1; � � � ;Ngg, denoted fJk; k ∈ f1; � � � ;Ngg, and corre-sponding to the centers of the N pixels of the sensorand regularly spaced by distance ρ.

We aim now at studying the effects of all these dis-tortions on the performances of an identification sys-tem, based on reading a barcode with a linear imager.To quantify these effects we adopt the AMI as a theo-retical measure of achievable performance and as anovel criterion for optical characteristics and layoutparameters.Fig. 3. Image formation diagram.

1028 APPLIED OPTICS / Vol. 47, No. 8 / 10 March 2008

Page 6: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

3. Average Mutual Information

A. Definition

Reading a barcode with a linear imager is an in-stance of a communication system. A sequence ofgray levels Y

0:nþ1¼ ðY0;Y2; :::;Ynþ1Þ is captured as

the received samples through a channel, and the bar-code bars X1:n ¼ ðX1;X2; :::;XnÞ are the transmittedsymbols. In digital communication, AMI is consid-ered a measure of the average information quantitythat flows through a disturbed channel, having ran-dom sequences X1:n and Y0:nþ1 as its input and out-put, respectively. Let us first recall the generaldefinition of AMI [11,12].Let X1:n ¼ ðX1;X2; :::;XnÞ and Y0:nþ1 ¼ ðY0;Y1; :::;

Ynþ1Þ be two sets of random variables. Each X i ð0 ≤

i ≤ nþ 1Þ and each Y i ð0 ≤ i ≤ nþ 1Þ takes its valuesfrom a finite alphabet Ω of symbols and from the setof real numbers IR. The AMI of a pair of random pro-cesses IðX1:n;Y0:nþ1Þ measures the reduction in un-certainty in one of the two sequences when thesecond sequence is given. It can be expressed as

IðX1:n;Y0:nþ1Þ ¼ HðY0:nþ1Þ �HðY0:nþ1jX1:nÞ ð11Þ

with

HðY0:nþ1Þ ¼ �EY½log2ðpðY0:nþ1ÞÞ�; ð12Þ

HðY0:nþ1jX1:nÞ ¼ � EX;Y

½log2ðpðY0:nþ1jX1:n ¼ x1:n;X0

¼ Xnþ1 ¼ 1ÞÞ�: ð13Þ

Here pðY0:nþ1Þ is the probability density of Y0:nþ1),and pðY0:nþ1jX1:n ¼ x1:n;X0 ¼ Xnþ1 ¼ 1Þ is the condi-tional probability density with reference to x1:n (X0

and Xnþ1 are always known to the receiver). In Eq.(12) expectation is processed over the randomsequence Y0:nþ1, while in expression (13) it is doneover the pair of random sequences (X1:n;Y0:nþ1).HðY0:nþ1Þ defines the entropy of Y0:nþ1, which can

be interpreted as the average uncertainty about thisrandom sequence, and HðY0:nþ1=X1:nÞ defines theconditioned entropy of Y0:nþ1 given X1:n , interpretedas the part of uncertainty in Y0:nþ1 that can beresolved when X1:n is known.Uncertainty and information can be regarded as

two equivalent quantities. The information providedby a given realization will fill in the information gap,described as uncertainty. That is why in digital com-munication IðX1:n;Y0:nþ1Þ measures the informationflow through a channel [13].The calculation of AMI requires modeling the

channel on the basis of degradations described inSection 2. This modeling will allow us to calculateall the probabilistic functions needed to expressentropies and thus IðX1:n;Y0:nþ1Þ.

B. Channel Modeling

In order to construct our model, we describe in thefollowing the discrete image formation as a gray-level observation vector ðY0 � � �Ynþ1Þ

T [ð⋅ÞT beingfor transpose] obtained from input data vectorðX0 � � �Xnþ1Þ

T . The sampled gray levels obtainedat points fM0

k; k ∈ f1; � � � ;Ngg are denoted fJk; k ∈

f1; � � � ;Ngg. From Eqs. (4) and (10), we obtain

Jk ¼Xnþ1

j¼0

X jhk;j ð14Þ

with

hk;j ¼ CSa

Z2c

½ðcos αMÞ41BC0jðM0Þ � �ðhI � �hBÞ�M0¼M0

k;

ð15Þ

where C is a scale factor depending on the character-istics of the acquisition system (photosensitivityof the CCD sensor, integrating time, quantum effi-ciency, quantification transmittance function, etc.).We assume, in addition to the reasonable hypothesis,that variations of irradiance in the area of one pixelare negligible. Accordingly, the mean gray level Gi ofthe captured bar BC0

i is the weighted summation

Gi ¼XN

k¼1

gi;kJk; ð16Þ

where gi;k is the normalized area of overlap betweenthe kth cell and BC0

i, 0 ≤ i ≤ nþ 1. Equation (16) canalso be written as

Gi ¼Xnþ1

j¼0

X j

XN

k¼1

gi;khk;j: ð17Þ

In matrix notation, we have

Gðnþ2Þ ¼ AXðnþ2Þ; ð18Þ

where A is the so-called channel matrix and isan ðnþ 2Þ × ðnþ 2Þ matrix with elements Ai;j ¼P

Nk¼1

gi;khk;j, Gðnþ2Þ and Xðnþ2Þ are the vectors

Gðnþ2Þ ¼ ðG0…Gnþ1ÞT ; and X ðnþ2Þ ¼ ðX0…Xnþ1Þ

T .An observed output channel Y i is associated with

each transmitted symbol X i. Y i results from the cap-turedmean gray level, Eq. (18), corrupted by additivenoise disturbances, modeled by a Gaussian white-noise process:

Y i ¼Xnþ1

j¼0

X jAi;j þ Bi: ð19Þ

Let us emphasize that, rewriting Eq. (19), it isstraightforward to show that Y0:nþ1 is a hidden Mar-kov model and that Fi ¼ ðX iþL …X i …X i�L Þ is aMarkov process, L representing the maximum mem-ory length, i.e., Ai;j → 0 for all I and for jj� ij > L.

10 March 2008 / Vol. 47, No. 8 / APPLIED OPTICS 1029

Page 7: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

C. Average Mutual Information Computation

AMI is obtained from computations of both the con-ditional entropyHðY0:nþ1jX1:nÞ and the output entro-py HðY0:nþ1Þ. HðY0:nþ1jX1:nÞ is fully determined bythe entropy of the noise process B0:nþ1[12]:

HðY0:nþ1jX1:nÞ ¼nþ 2

2log2ð2πeσ

2Þ; ð20Þ

where σ2 is the power of Bi. The exact calculation ofthe output entropy HðY0:nþ1Þ (12) is, on the otherhand, intractable. We then resort to the Monte Carlomethod [14] to estimate it, which consists of an em-pirical estimation from an Ns sample fpðy

ðsÞ0:nþ1

Þ; s ∈f1; � � � ;Nsgg:

HðY0:nþ1Þ ¼ �1

Ns

XNs

s¼1

log2ðpðyðsÞ0:nþ1

ÞÞ; ð21Þ

where each realization yðsÞ0:nþ1

of Y0:nþ1 is obtained

from Eq. (19) and where X1:n follows a uniform dis-tribution on f0; 1gn and each Bi has a zero mean nor-mal distribution with variance σ2.Using the Markovian property of F−1:nþ1 and be-

cause the original form of the BCJR algorithm[15,16] is subject to numerical limitations, we resorthere to a variant proposed in [17,18]. This variant isbased, unlike classical BCJR, on the observation thatpðykjy0:k�1Þ does not suffer underflow, so that one canestimate output entropy by

HðY0:nþ1Þ ¼ �1

Ns

XNs

s¼1

Xnþ1

k¼0

log2ðpðyðsÞk jy

ðsÞ0:k�1

ÞÞ; ð22Þ

and the conditional probability density functionpðy

ðsÞk jy

ðsÞ0:k�1

Þ is given by the recursion of the twoequations:

pðyðsÞk jy

ðsÞ0:k�1

Þ ¼X

f k�1

X

f k

pðFk�1 ¼ f k�1jyðsÞ0:k�1

Þ

× pðFk ¼ f kjFk�1 ¼ f k�1Þ

× pðyðsÞk jFk ¼ f k;Fk�1 ¼ f k�1Þ; ð23Þ

pðFk ¼ f kjyðsÞ0:kÞ ¼

P

f k�1

PðFk�1 ¼ f k�1jyðsÞ0:kÞPðFk ¼ f kjFk�1 ¼ f k�1Þpðy

ðsÞk jFk ¼ f k;Fk�1 ¼ f k�1Þ

P

f k

P

f k�1

PðFk�1 ¼ f k�1jyðsÞ0:kÞPðFk ¼ f kjFk�1 ¼ f k�1Þpðy

ðsÞk jFk ¼ f k;Fk�1 ¼ f k�1Þ

: ð24Þ

At initialization, yðsÞ�1

is without information aboutF−1 for any s, so that F−1 is uniformly distributed:PðF�1 ¼ f�1jy

ðsÞ�1Þ ¼ 1=2L.

D. Average Mutual Information: Theoretical Criterion forBarcode Identification Performance

Our purpose is to assess AMI variations in the con-text of barcode reading with a 1D camera. As the bar-code is freely positioned in front of the camera,variations of AMI depend on the overall layout, mod-eled in this work as a transmission channel byEq. (19). In this equation the channel appears, beinga memory channel with additive white Gaussiannoise, where spatial interdependencies and radiantenergy decay are summarized in matrix A. Blurand spatial nonalignment are responsible for theinterdependency between neighboring pixels, whileremote positions, rotations, and corresponding geo-metrical image reductions lead to received energydecays.

Let us consider a camera with optical and electro-nic (pixels and noise) settings and a barcode with anarbitrary position and a given bar width. AMI varieswhenever one of these parameters varies. We aimfirst at studying how sensitive AMI is to changesin one of these parameters. We define the rangein which one of the above parameters could varysuch that AMI remains greater than a given value.Other criteria may be adopted, such as a maximalacceptable error probability or achievable decodingcomplexity. Both are practical and pragmatic. Errorprobability depends on barcode design, and decodingcomplexity depends on algorithmic sophisticationand advances in technology. Both are related to a re-quired signal-to-noise ratio (SNR) or to a minimal-noise-level power. The pertinence of AMI is that itis strictly related to the information quantity, whichis specific for the system. In addition, it is a theore-tical criterion that opens the way for new code designto approach theoretical limits. Performance based onthe AMI criterion is independent of the state of theart in technology and could be considered an upperbound or a reference for actual and future work.

AMI is primarily a theoretical measure about theinformation quantity that can be transmitted accu-rately over a channel and for a given probabilitymass distribution at its input. In our context andfor a given linear imager setting (including noise),AMI varies with A as the barcode moves with respect

to the camera. One can then define an allowed regionin space for which AMI remains superior to a fixedvalue. For pragmatic consideration let a barcode with

1030 APPLIED OPTICS / Vol. 47, No. 8 / 10 March 2008

Page 8: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

given information content feed the channel. Forexample, let a barcode of 95 bars with on average76 bits of information content feed the channel. Totransmit all this information accurately, AMI mustbe at least equal to 76 bits/sequence. All points inthe space allowing this AMI will fill this range, whichensures efficient communication.On the other hand, an important result from infor-

mation theory states that noise limits the averageinformation quantity that can be transmitted reli-ably through a channel. For a given matrix A, AMIdecreases as noise power increases. The presenceof noise then has an impact on the allowed regionin space that ensures efficient communication.Regarding the remarks in the preceding two para-

graphs, we present AMI as an objective criterion forthe estimation of what we shall define as the theore-tical depth of field. In traditional photography, thegeometrical computation of depth of field is deter-mined by parameters such as the focal length, theaperture size, and a fixed permissible blur circle.Geometrical computations do not consider noise inexpressing the depth of field, but only blur. We pro-pose a theoretical depth-of-field measure related toAMI that varies according to channel matrix Aand/or noise power. As we shall show, this theoreticalworking region enlarges barcode reading capabilitiesbeyond the usual optical performances inheritedfrom classical photography. In all cases, it spurs re-search to conceive optimal barcode configurationsand optimal detectors.

4. Simulations and Results

We evaluate and plot AMI variations for differentpositioning of the barcode in front of the cameraand for different noise levels. These curves, givingAMI with respect to distance Zo, encompass all thechannel artifacts presented in Section 2. We also plotAMI as a function of SNR in order to emphasize theinfluence of positioning on the channel memory andits effects on the transmissible information quantity.In the following, we consider a linear imager with a

square aperture of 2d side length and focal length f .We define the f -number of the imager as the ratiof =2d. The linear sensor is fixed at distance Zc andis designed as a row of square pixels with side lengthequal to 5 μm. Because of the square aperture, theoptical transfer function HB (Subsection 2.A.3) canbe split into two functions,HG andHD, related to geo-metrical and diffraction blur and defined by [10]

HGðf X ; f YÞ ¼ sin c

8WmðZo;ΔZÞ

ν

f X2f 0

��

1�jf X j

2f 0

��

× sin c

8WmðZo;ΔZÞ

ν

f Y2f 0

��

1�jf Y j

2f 0

��

ð25Þ

where ν is the optical wavelength, f 0 ¼ d=vZc is theoptical cutoff frequency, ΔZ is the shift position withrespect to the focused point set at Zo ¼ Zof , and

WmðZo;ΔZÞ is the shift function, such as

WmðZo;ΔZÞ ¼d2

2

1

Zo

�1

Zo þΔZ

;

HDðf X ; f YÞ ¼ Λ

f X2f 0

Λ

f Y2f 0

; ð26Þ

where Λð⋅Þ is the triangle function.The terms “long-range” (LR) or “short range” (SR)

are used in the following to specify the optical config-uration of the simulated imagers. More precisely,those cameras are

• A LR one with Zof ¼ 300mm, f ¼ 7:6mm,Zc ¼ 7:8 mm, and aperture f =8;

• A compact LR (cLR) one with same Zof ¼300mm but f ¼ 1:492mm, Zc ¼ 1:5mm, and aper-ture f =1:4;

• A SR one with Zof ¼ 45mm and aperture f =8.

These specifications, quite arbitrary although refer-ring to common industrial equipment, were chosen tostudy the effect of blur and spatial nonalignmentseparately.

We simulate a barcode pattern composed of 95 barsof constant width ω set to 1mm. For each bar BCi weconsider a random symbol X i taking its values from abinary set Ω of arbitrary radiance quantities. Noisepower spectral densityNo is set to values that ensurea SNR varying from −10 to 35dB with respect to ra-diance. Common values of an array sensor SNR arebetween 0 and 50dB [19]. Our lower SNR range is setto determine whether, when performance is mea-sured with AMI, efficient transmission remainsachievable with noisier systems.

A. Theoretical Depth of Field

Let Zo be the distance between the center of the bar-code and the thin lens on the ~Oz axis (see Fig. 2). Inthis paragraph we consider cameras with only onepossible focused distance, Zo ¼ Zof . Let Zo vary fromZof to 2Zofand the orientation of BC vary from 0 to0.2π relative to the angle ϕ. We first consider theLR linear imager. The geometrically computed far-extreme point of the depth-of-field region is about380mm. These computations are obtained for a per-missible blur circle diameter equal to a pixel width.AMI variations are plotted with respect to the dis-tance Zo [Fig. 4(a)] and angle ϕ. The mean channelmemory length L for this imager varies from twoto four symbols.

For a low-noise power quantity, AMI losses are lessthan 1% even in a region beyond the classically com-puted depth-of-field region. Conceptually speaking,all information can undeniably be recovered in anoiseless channel after an exact estimate of its ma-trix A, whatever A is, in other words, however largethe blur circle is. This result confirms the need todefine a theoretical depth of field related to an accep-

10 March 2008 / Vol. 47, No. 8 / APPLIED OPTICS 1031

Page 9: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

table loss of AMI. Nevertheless, we note a drastic de-crease of AMI in the case of a noisy channel. As noiseis a limiting factor for AMI, it consequently limits thetheoretical depth-of-field region. For instance, if weconsider a minimum acceptable AMI of 90 bits/sequence, then the far-extreme point of the theoreti-cal depth of field goes beyond 2Zof at No ¼ 10−3, re-duces to 2Zof at No ¼ 10−2, and is confined to about380mm at No ¼ 10−1. For positions in front of Zof

AMI losses are less than 1% for all simulated noisepower quantities; so the theoretical depth of field isequal to the far-extreme point measured on thecurve. In Table 1 we note some theoretical depth-of-field distances measured for different acceptableAMI values for No ¼ 10−1. We sketch in Fig. 4(b) var-iations of the theoretical depth of field as a functionof the SNR Eb=N0, Ebbeing the mean received binaryenergy. Figure 4(b) gives a global view of theoreticaldepth-of-field notion: it depicts the admitted barcodeposition range for a fixed AMI level. Eb is a functionof the integrated irradiance on the image plane; thatis, it encompasses the effects of illumination varia-tion, spatial nonalignment, geometrical distortions,and blur.In the following we study the influence of optical

characteristic changes on the theoretical depth offield. Classical photography rightly states that, withthe same aperture size, reducing the focal length

leads to a greater depth of field and, inversely, thisdepth of field is reduced for focusing at a shorterdistance.

We consider for this purpose the cLR linear imager.As mentioned above, a shorter focal length gives riseto a larger depth-of-field region. The far-extremepoint of the computed standard depth of field is in-deed 4:2m. But for the theoretical depth of fieldwe observe a reverse phenomenon. The mean chan-nel memory length varies from two to six symbols,and for an acceptable AMI of 90 bits/sequence, thefar-extreme point of the theoretical depth of fieldapproaches 2Zof at N0 ¼ 10−3, is reduced to400mm at N0 ¼ 10−2, and is in front of Zof at N0 ¼10−1 [Fig. 5(a)].

Values corresponding to other AMI limits arenoted in Table 1 for N0 ¼ 10−1, and Fig. 5(b) showshow these distances vary as a function of Eb=N0.One can clearly see how this parameter is reducedcompared with the earlier case. This reduction isespecially due to other terms of intersymbol interfer-ence, which are not taken into account when comput-ing the depth of field geometrically. We will see belowthat spatial nonalignment is the principal cause ofthis reduction.

We now consider the optical block focusing on a clo-ser point object Zof ¼ 45mm, introduced above as aSR linear imager. The far-extreme point of the stan-dard depth of field Zd is about 50mm. Simulation re-sults for AMI variations are presented in Fig. 6(a).Fig. 4. (a) LR imager AMI variations regarding Z0. (b) LR theo-

retical depth of field for fixed AMI levels.

Fig. 5. (a) cLR imager AMI variations regarding Z0. (b) cLRtheoretical depth of field for fixed AMI levels.

1032 APPLIED OPTICS / Vol. 47, No. 8 / 10 March 2008

Page 10: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

Whereas simulations show that L remains a two-symbol-longmemory, theoretical depth of field valuesfor different acceptable AMI quantities at N0 ¼ 10−1

are in Table 1. Figure 6(b) represents variations ofthis theoretical limit with respect to of Eb=N0. Recal-ling classical photography statements, the ratioZd=Zof diminishes for focusing on closer objects. Aquick comparison with the LR linear imager showsthat this statement does not concord with the resultsobtained with the theoretical depth of field. This isbecause the LR linear imager is limited by otherterms of intersymbol interference, whereas the SRcamera is not. In the subsequent paragraphs we ana-lyze the implications of the use of an autofocus andhow the effects of other sources of distortions affectthe AMI and therefore the theoretical depth of field.

B. Autofocusing Effect on Average Mutual Information

Diffraction, unfocusing, and spatial nonalignmentproduce intersymbol interference that leads to AMI

degradations. Below we measure the effect of autofo-cusing on the system.

Starting with the LR imager, we plot AMI varia-tions by varying the center of the barcode locationZo, considered here the focused point. These varia-tions are reported in Figs. 7(a) and 7(b) with respectto Zo and the SNR Eb=N0, respectively. Figure 7(b)shows different curves, each one corresponding toa different position of the barcode, and so to a differ-ent channel matrixA. When the barcode is parallel tothe sensor plane the light energy spread due to aber-ration is null [i.e.,HGðf x; f yÞ ¼ 1 in Eq. (25)], asΔZ ¼0 for all points in the object plane and WmðZo;ΔZÞ ¼0. Only the diffraction term is present in the global

Table 1. Barcode Positions under AMI Constraint when Facing the Camera ðN0 ¼ 10−1Þ

AMI (bits/sequence)

ZoðmmÞ, LR ZoðmmÞ, cLR ZoðmmÞ, SR

f ¼ 7:6mm;Zof ¼ 300mm f ¼ 1:49mm;Zof ¼ 300mm f ¼ 7:6mm;Zof ¼ 45mm

90 380 280 8080 425 290 8560 480 340 10040 540 380 125

Fig. 6. (a) SR imager AMI variations in Z0. (b) SR theoreticaldepth of field for fixed AMI levels.

Fig. 7. LR AMI variations in the case of normal transmission andautofocus with respect to (a) Z0 (with N0 ¼ 10−1), (b) SNR.

10 March 2008 / Vol. 47, No. 8 / APPLIED OPTICS 1033

Page 11: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

transfer function. Figures 7 show that autofocusslightly enhances (a few bits/sequence) the overallperformances of the LR camera configuration. Wewill see below that for the SR camera autofocus givessubstantial ameliorations.From imprecise handling, the object may be ro-

tated by angle ϕ with respect to the O~y axis. In thiscase, the shift function WmðZo;ΔZÞ is not null for allpoints in the object plane such as ΔZ ≠ 0, and theaberration term remains in the transfer function.In Fig. 7(b) no significant effects on AMI could bemeasured for ϕ ¼ 0:2π.We now emphasize AMI losses caused when spa-

tial nonalignment is the preponderant factor in theintersymbol interference channel. We encounter thissituation when the image bar width is almost equalto the pixel side length, which is the case for a cLRimager. AMI variations after autofocusing areplotted in Fig. 8.Compared with the LR camera, where Zc ¼

7:8mm, the sensor plane position Zc ¼ 1:5mm ofthe cLR camera is approximately one fifth. Thesetwo cameras have the same nominal focused pointZof ¼ 300mm; so the magnification factor ðZc=Zof Þ

is approximately five times smaller for the cLR cam-era. This leads to a smaller projected image BC0. Thebars are therefore captured by fewer pixels, increas-ing the effects of intersymbol interference and thusrendering the communication system more sensitiveto noise. The number of pixels per module Nm

[Eq. (8)] varies from 2 to 1 when moving from Zof

to 2Zof . Figure 8 plots AMI after autofocusing, andit is obvious that focus handling brings no relevantimprovement in AMI. Consequently, spatial nona-lignment appears to be the principal cause of inter-symbol interference. Compared with Fig. 7 of the LRsettings, Fig. 8 shows how degradations due to thesmaller projected image are significant. One canthen classify this cLR camera as a detector-limitedlinear imager from a technological point of view,and it is rather limited to large-size barcode design.

Finally, an autofocus process is also added to theSR camera. The results are presented in Fig. 9,where AMI is much more improved than for LRand cLR. Indeed, autofocus brings a gain of up to20 bits/sequence. In fact, with SR camera settings,spatial nonalignment has a low impact: Nm ≥ 20

within the range [Zo f : 2Zof ]. This is supported by

Fig. 8. cLR AMI variations in the case of normal transmissionand autofocus with respect to (a) Z0 (with N0 ¼ 10−2), (b) SNR.

Fig. 9. SR AMI variations in the case of normal transmission andautofocus with respect to (a) Z0 (with N0 ¼ 10−1), (b) SNR

1034 APPLIED OPTICS / Vol. 47, No. 8 / 10 March 2008

Page 12: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

Fig. 9(b), where AMI curves plotted with respect tothe SNR for all focused positions are approximatelythe same as the curve of the nominal position Zof .This camera is very sensitive to displacements, butonce autofocusing is used, the large magnificationfactor yields a substantial tolerance to free handling.Last, plotting the variations of the fixed focal

length version PSFs of the three optical blocks for dif-ferent Zo highlights their very different behaviorrelative to displacement. The curves are plottedin Fig. 10.

C. Theoretical Resolution

We now relate AMI to resolution, which we define asthe minimal bar width needed to recover a specificamount of information. We thus introduce a theore-tical value for this resolution after inspection ofcurves relating AMI to the SNR. Considering, forinstance, an AMI curve at a distance 2Zof , one canmove along its trajectory for different SNR values,which could be obtained by fixing N0 and varyingthe radiated energy. This latter may vary with barwidth ω, and this enables us to draw a direct link be-tween AMI and ω.As an illustration, we consider the LR and cLR

imagers (Fig. 11). To ensure a reliable transmissionof 80 bits over 94 transmitted bars at N0 ¼ 10−2, theminimal required bar width is 0:25mm at Zo ¼ 2Zof

for the LR settings and shifts to 0:5mm and 1:7mm,respectively, at the same positions for the cLR cam-era. The main reason for these stronger require-ments for the cLR is the smaller magnificationfactor within the range of measurements. What isin fact important for AMI performance is to ensurea good signal-to-interference ratio by augmentingthe magnification factor, providing a system morecompatible with higher-density codes. Thus the LRcamera has a higher resolution despite the fact thatit is less robust to displacements, as classical opticssuggests.

5. Conclusion

We have presented a novel method for performanceanalysis of 1D barcode reading with linear imagers.We have demonstrated that standard optics does notyield a measure of the transferable information,especially because it does not take into account noiseand spatial nonalignment of the barcode. As a conse-quence, we have considered barcode displaying –capturing – decoding as a digital communicationsystem.

The depth of field and the resolution have been re-defined according to the objective mathematicalmeasure of the transferable information known asaverage mutual information (AMI). Through the

Fig. 10. Point spread function variations for different Z0 for(a) LR, (b) cLR, and (c) SR optics.

Fig. 11. AMI constrained minimal bar width estimations for(a) LR and (b) cLR imagers.

10 March 2008 / Vol. 47, No. 8 / APPLIED OPTICS 1035

Page 13: One-dimensional barcode reading: an information theoretic … · 2020. 11. 8. · One-dimensional barcode reading: an information theoretic approach Karim Houni,1,* Wadih Sawaya,1

model we have developed, AMI encompassed all thechannel artifact sources (blur, geometrical distor-tions, and noise) so that its estimation draws a directlink between system design and information theory.The performance of common industrial barcode

linear imagers has been analyzed in terms of AMI,theoretical depth of field, and resolution. The AMI-based analysis has also been compared with the stan-dard optical one, and its relevance has been high-lighted for the design of a communication systembased on 1D barcode technology.

References

1. T. Pavlidis, J. Swartz, and Y. P. Wang, “Fundamentals of barcode information theory,” Computer 23(4), 74–86 (1990).

2. T. Pavlidis, J. Swartz, and Y. P. Wang, “Information encodingwith two-dimensional bar codes,” Computer 25(6), 18–28(1992).

3. D. Tsi, E. Marom, J. Katz, and J. Swartz, “System analysis ofCCD-based bar code readers,” Appl. Opt. 32, 3504–3512(1993).

4. J. A. O’Sullivan, R. E. Blahut, and D. L. Snyder, “Information-theoretic image formation,” IEEE Trans. Inf. Theory 44,2094–2123 (1998).

5. D. Brady and M. A. Neifeld, “Information theory in optoelec-tronic systems: introduction to the feature,” Appl. Opt. 39,1679–1680 (2000).

6. C. Wagner and G. Häusler, “Information theoretical optimiza-tion for optical range sensors,” Appl. Opt. 42, 5418–5426(2003)

7. F. O. Huck, C. L. Fales, R. Alter-Gartenberg, S. K. Park, andZ. Rahman, “Information-theoretic assessment of sampledimaging systems,” Opt. Eng. 38, 742–762 (1999).

8. R. E. Jacobson, G. G. Attridge, N. R. Axford, P. Ward, and S. F.Ray, Manual of Photography—Photographic and Digital Ima-

ging, 9th ed. (Focal, 2000).9. D. A. Forsyth and J. Ponce, Computer Vision (Pearson Educa-

tion, 2003).10. J. W. Goodman, Introduction to Fourier Optics, 2nd ed.

(McGraw Hill, 1996).11. R. G. Gallager, Information Theory and Reliable Communica-

tion (Wiley, (1968).12. T. J. Cover, Elements of Information Theory (Wiley, 1991).13. S. Benedetto, E. Biglieri, and V. Castellani, Digital Transmis-

sion Theory (Prentice Hall, 1987).14. M. Mascagni, Lecture notes from Advanced Monte Carlo

Methods I & II: An ETHZ/SAM Course (Florida State Univer-sity and Swiss Federal Institue of Technology, 2005–2006).

15. L. R. Bahl, J. Cocke, F. Jelinek, and J. Raviv, “Optimal decod-ing of linear codes, for minimizing symbol error rate,” IEEETrans. Inf. Theory 20, 284–287 (1974).

16. L. E. Baum, T. Petrie, G. Soules, and N. Weiss, “A maximiza-tion technique occurring in the statistical analysis of probabil-istic functions of Markov chains,” Ann. Math. Stat. 41, 164–171 (1970).

17. C. Berrou and A. Glavieux, “Near optimum error correctingcoding and decoding : turbo codes,” IEEE Trans. Commun.44, (1996).

18. D. Arnold and H.-A. Loeliger, “On the information rate ofbinary-input channels with memory,” in IEEE International

Conference on Communications, 2001. ICC 2001 (IEEE, 2001),pp. 2692–2695.

19. G. C. Holst, CCD Arrays, Cameras and Displays, 2nd ed.(SPIE , 1998).

1036 APPLIED OPTICS / Vol. 47, No. 8 / 10 March 2008