Patent ID: 6260764
Filing Date: 2001-07-17
Classification: G06K

Abstract:
A method of detecting a bar code on a scan line, comprising the following steps:a) acquiring an analog electric signal representing variations in light intensity along a scan line;b) sampling the analog signal for a predetermined number K of sampling intervals, so as to extract, for each interval, a sample x.sub.k identified by a pair of values (Px.sub.k, Lx.sub.k) representing the position and light intensity of a point of the sampling interval in the scan line; andc) each time comparing each of the samples x.sub.k extracted to the following samples x.sub.k+h, thereby to detect a plurality of zones of substantially constant brightness, said plurality of zones comprising, in succession, a broad initial zone, a plurality of narrow intermediate zones, and a broad final zone;wherein step c) comprises the following steps:c1) finding, among samples x.sub.k, those samples xm.sub.I which represent local maximum and minimum points, or local peaks, of the sampled signal;c2) defining zones Dz.sub.j corresponding to the samples xm.sub.I found, and calculating the size of these zones;c3) comparing the sizes of two successive zones D.sub.zj and Dz.sub.j+1 to find out the aforesaid plurality of zones; andwherein step c1) comprises the following substeps:each time comparing each sample x.sub.k with a predetermined number of successive samples, to check if the sample x.sub.k under consideration is representative of a local maximum (minimum) point of the sampled signal, and if so, classifying sample x.sub.k as a maximum (minimum) point and searching for a successive minimum (maximum) point, but if not so, continuing the search for a maximum (minimum) point;c11) selecting a number NTH of comparative samples from the K samples found during the sampling;c12) comparing samples x.sub.k and x.sub.k+h, where k=1 and h=1, to check if sample x.sub.k is larger (smaller) than sample x.sub.k+h ;c121) if so, iteratively repeating step c12) for h-h+1, until h=NTH; and thereafter,c1211) classifying sample x.sub.k as a maxim um (minimum) point xm.sub.I ;c1212) repeating step c2) for k=k+h in searching for a minimum (maximum) point, until k+h=K; andc122) if not so, iteratively repeating step c12) for k=k+h until k+h=K.