OPTICAL READER

Abstract: An optical reader for reading high density dibit encoded data from a data strip comprises an optical detector (13) and a detector (14, 15, DSP) connected to the optical detector (13) and arranged to decode its ouput. The detector includes a row of photosensitive elements arranged to extend transversely across a row of dibits and to form an image of the row of dibits. The decoder (14, 15, DSP) includes a buffer (15) arranged to store the row image. An image transform device detects a skew angle of the strip and transforms the stored image to compensate for the distortion of the image.

Description: OPTICAL READER The present invention relates tc a reader for optically encoded data and in particular to a reader for data encoded using the SOFTSTRIP format. Using the SOFTSTRIP format data is encoded on a carrier such as a strip of paper or card as rows of dibits, each dibit comprising a rectangular region which is divided in two with one half black and the other half white. A white-black combination is used to code for one binary value and a black-white combination used for the other binary value. A series of such rows are printed one after the other along the length of the data strip. A header having a predefined format is printed at the start of the strip. Each row of dibits is bounded by alignment dibits which form respectively a checker-board and rack alignment patterns extending longitudinally down the edge of the strip. To recover data from such a data strip an optical reader is required which translates the variation in light intensity from the dibits into an electrical signal and then decodes the signal appropriately to recover the data. US-A-4692603 discloses one example of an optical reader for data strips. The reader includes a guide which receives and aligns a substrate bearing the data strip. The data strip is fed past a scanning head bearing a number of lenses. The lenses scan across the rev; of dibits to focus light from successive dibits onto a photodetector. If the data strip is tilted with respect to the reader then dibits from different rows may be read in a single scan, causing corruption of the data. To avoid this, this prior art system includes a number of mechanisms to eliminate tilt. On start-up the scanner first moves along the header section of the strip in one direction and then reverses moving back up the strip, while scanning all the time. Logic circuitry is provided to determine from the output of the scanner during this alignment procedure the angle of tilt of the strip. A tilt adjustment motor is then activated to move the strip relative to the reader to correct the tilt. The start-up procedure is then repeated until the strip is satisfactorily aligned. According to the present invention, an optical reader for reading high density dibit encoded data from a data strip comprising an optical detector and a decoder connected to the optical detector and arranged to decode the output from the optical detector is characterised in that the optical detector includes a row of photo sensitive elements arranged to extend transversely across a row of dibits and to form an image of the row of dibits and in that decoder includes buffer means arranged to store the image, and image transform means arranged to detect a skew angle of the reader relative to the strip and to transform the image stored in the buffer means to compensate for the distortion of the image in accordance with the skew angle. The present invention provides an optical reader with many advantages over the prior art systems. By using a detector capable of imaging an entire row of dibits at a time it removes the need to physically scan the row. As a result the reader of the present invention is markedly more simple both mechanically and optically with consequent savings in cost and advantages in terms of reliability. A further important advantage of the present invention is that means are provided to correct for any distortion in the image resulting from tilting of the data strip. It is therefore not necessary with the reader of the present invention to provide a guide to hoid the strip in a predetermined orientation with respect to the reader nor to provide a tilt adjustment mechanism to shift the strip with respect to the reader. The relative insensitivity of the reader of the present invention to the alignment of the strip makes it particularly suitable for use as a hand-held device. Preferably the optical detector comprises a CCD array. Preferably the image transform means include a one-dimensional image resampling sequencer arranged to receive image data from the buffer means and to apply to the image data a transform: x = V Q + Au ^^ where (u,v) are the lateral and longitudinal coordinates respectively of the raw image data held in the buffer and x is the lateral coordinate of the coordinate system of the transformed image. To correct for the skew in the image data it is necessary to carry out a transform on the two-dimensional input image. However since in practice the required transform is a pure shear parallel to the y-axis only one of the two dimensions is mapped in non-trivial way. The transform as a whole may be termed a "l 3 -. - dimensional" transform and is carried out using a single one-dimensional image re-sampling sequencer. Preferably the transform means are arranged to determine an appropriate initial value for the transform co-efficient A by detecting a first appearance of the data strip header in the imaged row, counting the number of scans between the first detection of the header and the first subsequent scan which completely crosses the header. Preferably the decoder means are arranged during the reading of data to detect transitions in the alignment dibits bounding the transformed row images, and when a transition is detected in one only of the dibits to add a predetermined correction δ -t-o the transform coefficient A and to resample and transform the current row. The speed of the image sampling and transform process s such that once an initial value for the transform coefficient A has been set in accordance with the detected skew angle any subsequent variation in the skew angle can be detected and corrected by a simple feedback mechanism without in general requiring the recalculation from scratch of the skew angle and transform coefficient. Preferably the reader is a hand-held device arranged to be moved along a data strip with the CCD array in contact with the strip, the reader including a source of light offset from the CCD array and arranged to illuminate the region of contact between the CCD array and the data strip. Preferably the reader includes an A/D converter arranged to digitise signals from the CCD array and to provide an output for the buffer means, the reader being arranged to detect a black reference output by the CCD array and to set a reference voltage for the A/D converter in accordance with the output level of -he CCD arra . An optical reader in accordance with the present invention will now be described in detail with reference to the figures of the accompanying drawings in which: Figure 1 is a first example of a data strip; Figure 2 is a second example of a data strip Figure 3 is a perspective view a first example of an optical reader in accordance with the present invention ? Figure 4 is a perspective view of a second example of an optical reader in accordance with this invention; Figure 5 is a block diagram of such a reader; Figures 6a and 6b show an A/D converter used in the present invention and the output of an CCD array respectively: Figure 7 shows a skewed row image; Figure 8 is a circuit diagram of a scanner; Figure 9 is a circuit diagram of a digital signal processor; Figure 10 is a circuit diagram of an image buffer and Figure 11 is a circuit diagram of a controller; and Figure 12 is a diagram shoving the arrangement of components in a reader. Figure 1 shows a typical example of a SOFTSTRIP and Figure 2 shows an enlarged detailed from the head of such a strip. The features of the strip of particular significance for the present invention are the header portion 1, the black reference strip 2 which runs along the edge of the strip and the alignment dibits 3, 4 which bound the edges of the dibit rows forming checker board and rack patterns respectively. SOFTSTRIP datastrips are described in further detail in the above cited US Patent and also in US Patents numbers 4,754,127 4,782,221 and 4,728,783. The format for encoding data is defined in the publication "field specifications" published by Cauzin Systems Inc. Waterbury, Conneticut, U.S.A. SOFTSTRIP is a trademark of Cauzin Systems Inc.. In this preferred example the reader is hand held and in use is moved along a data strip printed en a substrate formed of card, paper or plastic with a reading head in contact with the substrate. As shown in Figure 12, the region of contact between the reader and the substrate is illuminated by a lamp 1. An optical system 2 comprising prisms and an objective lense focuses the image of the strip on a CCD sensor array. The output of the CCD sensor array 13 is digitised by an A/D converter 14 and then applied to an image buffer than 15. As shown in Figure 5 the output from the CCD sensor may be applied directly to the A/D converter or indirectly via a sample/hold amplifier 16. The black reference level for the video samples is held by the sample/hold amplifier 16 to provide the reference voltage for the A/D converter during the current line scan. This obviates the need for any DC offset adjustment or compensation for thermally induced drift during operation. The form- of the circuit shown in Figure 5a is appropriate to a single-output CCD sensor. For dual-output odd/even types 2 sample/hold amplifiers are used, and the reference and input ports of the A/D converter are electronically switched to the appropriate forth for each sample. Using typical CCD sensors an exposure time of one mS is required. At 400 characters per inch resolution this equates to a maximum scan rate of 2.5 inch per second, but this scan rate may be increased if lower density strips are used. The image buffer 16 is formed by a Figure 1 MB DRAM. The output from the DRAM is applied to a digital signal processor DSP and from there to the image resampling sequencer which carries out the necessary transforms to correct for the skew angle of the strip with respect to the CCD sensors. The TRW TMC2301 Image resampling Sequencer is used to control the geometric transformation needed to deskew the raw image. The device executes a general second-order transform, (u, v) f ^ (x,y) but since the required transform is a pure shear parallel to the y-axis, a much-simplified description will suffice. In the case where ail second derivatives are zero, the TMC2301 performs the linear transform, x = Xo + Au + Bv, where A = dx/du, B = dx/dv Normally, the TMC2301 is used in pairs, with one device handling the row transformation x(u,v) and the ether handling the column transformation y(u,v). However, we can take advantage of the specific nature of the required transform to eliminate one device. The required transform is, x = u y = Vo + Au We can program a single device in row mode to perform, x = Vo + Au Then, writing X = u Y ≡ x, we have,, X = u Y = vo»-+ Au as required. Since this technique to eliminate one device relies on the fact that only one of the two dimensions is mapped in a non-trivial way, we term it a 'l -dimensional' transform. Initial coarse determination of image skew is made by starting with zero skew angle and counting the number cf scans between first detecting a part of the strip header and the first scan which completely crosses it. This gives the tangent of the skew angle directly, as required for programming the TMC2301. Subsequent tracking of skew is maintained by examining the odd/even markers at the beginning and end of each strip data line and classifying them as changed/unchanged/unreadable. Whenever the marker at one end of the line changes before the other, it indicates a potential error in skew angle. Very small changes are regarded as noise and ignored; otherwise, the transform, coefficients are adjusted by a small amount and the line resampled. This is repeated until either synchronisation is achieved or a rate-of-change-of-skew limit is reached. In the latter case, it is assumed that the line markers are damaged and skew is restored to its previous value. However, it may actually be the case that the strip has not been scanned cleanly, and the image is indeed discontinuous at the current point. This situation will not be detected until the line data is decoded. Scan lines are decoded by measuring the distance between successive positive and negative peaks in the rate of change of signal intensity, that is black/white and white/black transition. Because of the way strip data is encoded, valid transitions must be separated by exactly one or two unit distances. To compensate for black or white areas spreading during printing, a compensation factor is added or subtracted depending on the average black/white ratio (a valid strip has almost exactly 50% black/white ratio). Below,a threshold, very narrow regions are considered as noise and ignored. It is then possible to classify the width of a black or white cell as valid (1 or 2 units) , invalid wide or invalid narrow. If all cells in a line are valid, the line is decoded and the parity bits checked; if some cells are invalid, the parity may be used to estimate their correct value, but at the expense of error-detection. Each scan line is given a score, depending on whether it needed reconstruction, its parity checks, and other quality-related features. When the data line odd/even markers change, indicating that scans are now for a new data line, the data from the scan line with the best score (or the middle one if more than one scan line has the highest score) is output as the decoded value of the last data line. As standard, if any data line cannot be reliably decoded, the strip is rejected, but the minimum acceptable score may be varied to allow 'best-guess' data through. Certain systematic errors in the printing of SOFTSTRIPS leads to predictable and reversable damage to the strip. When reading fails, the image is examined for signs of such known distortions and an inverse transfcrmatior. is applied to the decoding parameters. Subsequent-reading may then decode even a badly misprinted strip. All decoding and communications parameters are stored in non-volatile RAM 17 and are adaptably varied to match the conditions in which the reader is used. Thus the reader retains the ability automatically to detect and decode all variations in strip density but first-read rate is improved in the more common case that all strips being read have the same characteristics.

Claims: CLAIMS 1. An optical reader for reading high density dibit encoded data from a data strip comprising an optical detector and a decoder connected to the optical detector and arranged to decode the output from ' the optical detector characterised in that the optical detector includes a row of photo sensitive elements arranged to extend transversely across a row of dibits and to form an image of the row of dibits and in that decoder includes buffer means arranged to store the image, and image transform means arranged to detect a skew angle of the reader relative to the strip and to transform the image stored in the buffer means to compensate for the distortion of the image in accordance with the skew angle. 2. A reader according to claim 1, in which the optical detector comprises a CCD array. 3. A reader according to claim 2 , in which the image transform means include a one-dimensional image resampling sequencer arranged to receive image data from the buffer means and to apply to the data a transform: x =v Q + A U where (u,v) are the lateral and longitudinal coordinates respectively of the raw image data held in the buffer and x is the lateral coordinate of the transformed image. 4. A reader according to claim 3 , in which the image transform means are arranged to determine an appropriate initial value for the transform coefficient A by detecting a first appearance of the data strip header in the imaged row, and counting the number of scans between the first detection of the header and the subsequent first scan which completely crosses the header. 5. A reader according to claim 4 or 3 in which the decoder means are arranged during the reading of data to detect transitions in the alignment dibits bounding the transformed row images, and when a transition is detected in one row only to add a predetermined correction delta to the transform coefficient A and to resample and transform the current row. 6. A reader according to any one of the preceding claims, in which the reader includes an A/D converter arranged to digitise signals from the optical detector and to provide an output for the buffer means, the reader being arranged to detect a black reference output by the CCD array and to set a reference voltage for the A/D converter in accordance with the output level of- the CCD array. 7. A reader according to any one of the preceding claims, in which the reader is a hand held device arranged to be moved along a data strip with the CCD array in contact with the strip, the reader including a source of light offset from the region of contact between the reader and the strip and arranged to illuminate the region of contact.

Inventors: RENCONTRE STEPHEN CECIL, RENCONTRE, STEPHEN, CECIL
Applicants: DATASTRIP LTD, KEY STRIP LIMITED
Application year: 1989
Main classification: G06K7
IPC codes: G06K7