OPTICAL READER

Abstract: An optical reader for reading both bar code and alphanumeric character formats with one single image sensor is disclosed wherein two digital signal processing means for both formats are operated not concurently, but either of them recognized binary pattern of the specific format according to the indications of a switching gate.

Description: 1. Field of the Invention The present invention relates to an optical reader and, more particularly, to a reader for recognizing both alphanumeric characters or figures and bar codes with the same scanner which is equipped with an image sensor having a two dimensional array of photo-electric elements. 2. Prior Art Optical readers are widely used in conjunction with merchandising and accounting systems of department stores, super-markets and, recently, in cargo transportation systems in order to obtain information concerning sales figures, inventories, as well as destinations of products transported. In a system called "Point of Sales", for instance, product information about product species, manufacturing lot and price are described on a merchandising tag in an optically readable form, and the information obtained through a reader is sent to computer system and, thereafter, processed to provide necessary data. The ways of expressing product data is not uniform. For example, in department stores, merchandizing tags for foods and beverages frequently have numerals and bar codes whereas data on clothes are expressed by alphanumerics. Therefore, it has become necessary to install optical readers which are capable of reading both alphanumerics and of recognizing bar code symbols respectively. US Patent 4,402,088 describes a hand held optical reader which will read either bar code or alphanumeric format without an operator having to switch between the two formats depending upon which the unit is reading. Japanese Patent Application No. 13307/77, (Feb. 9, 1977) of Saitoh, published under Publication No. 98733/78 (Aug. 29, 1978), describes a method of reading two formats using the same scanner in entirely the same way as those disclosed in U.S. Patent 4,402,088. According to both of these references, the hand held character reader produces electrical signals representative of data scanned from a document and processes the so-obtained data by two examination means concurrently to produce on output representative either of alphanumeric character or bar code followed by"gating out" one or other of the output of two examination means, but not both of them. In the above cited references there is disclosed a first processing means wherein the binary signals outputted from the photoelectric elements are processed to provide recognisable results in the form of characters,and a second processing means wherein the binary signals are processed concurrently in order to obtain recognisable results in the form of a bar code. The final recognisable results are selected when they are meaningful to an operator. When operating the methods disclosed in the above references, there is high possibility for the conventional optical reader to unnecessarily process signals of a pattern which is neither a character nor a bar code, and this leads to occasional misreading of meaningless stains or spots on the surface of paper. 4. Summary of the Invention According to the present invention there is provided an optical reader capable of recognizing both bar code and alphanumeric character formats by means of one single scanner unit (1) having an image sensor (6) with a two-dimensional array of photoelectric elements. In the optical reader of the present invention, a switching gate (21) determines whether a binary pattern is in bar code form or is in alphanumeric character form and, thereafter processing the binary pattern utilizing character recognition circuits ((10) - (12)) or bar code recognition circuits ((13) (20)). 5. Brief Description of the Drawings The invention will now be described by vay of example, with reference to the accompanying drawings in which: Fig 1 is a block diagram of the optical reader of the present invention; Fig 2 illustrates binary pattern of alphanumeric character "2"; Fig 3 shows partial view of a binary pattern of a bar code format; Fig 4 illustrates a bar code format; Fig 5 shows construction of switching gate (21), and Fig 6 (a) - (d) show signals detected during the process of recognizing bar code format, and Fig 6 (e) - (f) show black and white bars detected after processing. In the following description, the undermentioned items have been assigned the reference numbers indicated, viz.: 1 scanner; 2 human hand; 3 sheet of paper; 4 projection lamp; 5 focusing lens; 6 image sensor; 7 binary circuit; 10 character segmentation circuit; 11 character feature extracting circuit; 12 recognition circuit (1); 13 flag (1); 14 flag (2); 15 reference circuit; 16 counter; 17 standard bar-count memory; 18 bar count normalizing circuit; 19 bar distinction circuit; 20 recognition circuit (2); 21 switching gate; 22 distinction flag; 23 selection gate; 30 photoelectric element; 31 OR Gate; 32 ROM (read only memory), and, 33 register. 6. Description of the Preferred Embodiments Fig. 1 is a block diagram of the optical reader of the present invention. Information expressed on a sheet of paper (3) by alphanumeric character format or bar code format is scanned by a hand held scanner (1) equipped with an image sensor (6) composed of a two dimensional array of photoelectric elements. Light beams from a projection lamp (4) are reflected by both a character or bar code as well as the surface of paper, and a pattern corresponding to the object inforvation is focussed on an image sensor (6) through an optical forming lens (5). The degrees of intensity of the reflected beams vary depending on from where they are reflected and, therefore, the output signals from photoelectric elements of the image sensor (6) can be digitalized according to a threshold level and expressed by binary circuit (7) corresponding to character/bar code and paper background respectively. For instance, character/bar code (black zone) is signaled as "1" and paper background (white zone) is signaled as "0". Flg 2- -illustrates a binary pattern of character format "2" in an image sensor vith two dimensional of n x m pieces of photoelectric elements. The black zone is distinguished from white zone by oblique lines as shown in Figure 2. The binary circuit (7) initiates an output digital signal corresponding to the output of photoelement in the column B1 and line L1. The output signals corresponding to the photo-electric element in column B2 in the same line L1 in the array is digitalized in the same manner. When all of the output signals in line L1 have been digitalized and signaled in the order of B1, B2, ... Bi ... Bn, photoelements in line L2 are digitalized and signaled in the same manner until all photoelements in all lines are processed by the circuit (7). Since the scanning period is far shorter compared with that of the movement of the hand held scanner, a plurality of binary patterns are obtained. Method of recognizing a bar code format is described. As shown in the case of reading a character format, a binary pattern of a bar code format in an image sensor is illustrated in Figure 3. A switching gate (21) determines whether the binary pattern is derived from a character or a set of bar codes in the manner as described below: In Fig 3 photoelectric elements of n x m pieces are aligned two dimensionally consisting of lines L1 - Lm, and columns B1 - Bn and black bars of the format are expressed by oblique lines within the corresponding binary pattern. The photoelement which is located in line Lh and column Bk is utilized for recognizing the presence of a bar code format and switching gate (21) is composed of an OR Gate (31) and a read only memory (ROM) (32) and a register (33). The OR Gate (31) determines logical sum of the binary signals of the black bars in the adjacent successive three columns of Bk - 1, Bk, and Bk + 1 on line Lh for every line of the sensor array. Therefore, logical sum becomes "1" when black bar is present on at least one photoelectric element in the above three columns. According to the procedures of the present invention, a signal corresponding to the logical sum of the binary signals of Bk - 1, Bk, and Bk + 1 in line L1 is utilized as an address signal to ROM (32) together with the content of register (33) where its contents have been cleared each time just before the signal from the first line L1 is outputted. Logical sum signal corresponding to line L2 is outputted as an address signal to ROM (32) together with the contents of the register (33) related to the line L1. Similar procedures are repeated until all of the lines from L1 to Lm have become scanned on the successive three columns of Bk - 1, Bk, and Bk + 1. ROM (32) has a set of registers (33) for determining the necessary status of bar code formats and thus the status of the presently scanned signals of bar code formats are recognized through the output of the registers (33). Determination of whether scanned information on a sheet is expressed by a bar code format or alphanumeric format is judged in the following manner: When, (i) the logical sum in columns Bk - 1, Bk, and Bk + 1 on line L1 is Al and, for line Lm, the logical sum is Am; (ii) the number of successive lines where each of the logical sum is equally "1", is a, and (iii) when the presence of black zone is not indicated by the logical sum of the binary signal on both lines adjacent to the consecutive a lines where the logical sums are the object pattern corresponds to an alphanumeric character format and b I a c (1) where b and c are predetermined positive constant values respectively. When the object pattern is a set of bar code format, then: a 5 d (2) where d is a predetermined positive constant depending on the (vertical) length of bar code format to be scanned, in provisions of either of the logical sums of the binary signals are 1 for the first and last lines of the binary pattern. In the example above, the logical sum is from three columns Bk-l, Bk and Bk+i; however the logical sum may use more columns and perhaps even all of the columns, i.e. B1 through Bn. After the object pattern under scan is determined in terms of its category, the pattern is recognized and identified according to the following methods: A binary pattern of alphanumeric format is illustrated in Fig 2, where corresponding photoelectric elements of an image sensor are shown. In order to determine whether the character is located within sight of the image sensor, the presence of the character pattern is confirmed by means of character segmentation circuit (10). The circuit (10) operates, for instance, in such a manner that when the character position is in a right position so as to produce character signals when binary signal is "O" (white background) in every photoelectric element in column B1, and when signal "1" which is indicative of the presence of a character is detected in at least one column B, then only "0" signals are obtained from the final column B2. As described above, the character segmentation circuit (10) operates only after the switching gate (21) has determined that the scanned object pattern corresponds to an alphanumeric format and outputs signals to the circuit (10). Consequently, the above described position detection is not carried out when the object pattern is determined as one which corresponds to a bar code format. Method of character recognition based on its binary pattern is well known. For instance, US Patent No. 4,180,800 discloses a typical method for extracting character-feature either in line or column segments of the binary pattern followed by trailing a status transition flow diagram according to the order of occurrence of its features. According to the disclosure of the US Patent No. 4,180,800, each segment feature is extracted and classified into "feature code" categories. In the case of the binary pattern in Fig 2, line Lj provides a feature category of "a long horizontal line" while the segment in line Lj + 2 is classified into a feature of "a spot on the right-side marginal segment." The combination of the character features in the order of their occurrence provides final recognition results of alphanumeric format "2" as indicated in Fig 2. A bar code format is also recognized by means of circuits (15) - (20) as shown in Fig 1. As it generally occurs in scanning a character format that scanning of the binary pattern in Fig 3 is also completed within a relatively short period of time (200 micro-seconds) for one full scanning from line L1 to line Lm, a plurality of scanning results are obtained during one passage of an image sensor over a bar code format. Por recognizing a bar code format, either of the number of occurrence of "black" or "white" bar is detected by utilizing selected number of photoelectric elements in a sensor array. The widths of the bars are determined based on the above numbers of occurrence of either of bar during the scan. The method of recognizing a bar code format is described in detail. A bar code format is recognized utilizing a photoelectric element (30), which is located in line Lh on column Bk in the alignment of the elements. In Fig 1, which illustrates preferred embodiments of the present invention, binary circuit (7) outputs a signal to the first colour flag (13) indicating whether the binary signal from the photoelectric element (30) is "0" (white background) or "1" (black bar). When the next signal from the circuit (7) is outputted to the first colour flag (13), the contents of (13) have already been transferred to the second colour flag (14), indicating precedent status of the first colour flag (13). Reference circuit (15) compares the contents of the first colour flag (13) w tose of the second colour flag (14) and counter (16) count the number of times that the contents of the two flags are the same. When two signals are different, and either a white bar or a black bar has passed over the photoelectric element (30), and when detection of width of either of white bar or black bar has been completed, reference circuit (15) outputs signals to normalizing circuit (18) and counter (16) clears its contents. There is high probability of misreading some stains or granules of dust on the surface of a sheet of paper as black bars of a bar code format when they are scanned by conventional optical reader. In the device of the present invention, the contents of counter are cleared only when object binary pattern represents a bar code format and when a switching gate (21) outputs signal to reference circuit (15) thus eliminating any misreading due to noise caused by substances on the paper surface other than actual objects to be read. The present invention also eliminates, or at least considerably reduces, mis-counting the numbers of either black bars or white bars caused by any inconsistency in the scanning velocity of a hand held scanner when passed over the surface of paper. To this end, both "start marks" and stop marks" which are usually afforded to bar code format are detected by the scanner. The above marks are illustrated in Fig 4 and the distance between a start mark and a stop mark is usually predetermined. An image sensor begins to scan bar code format on either of the start mark or stop mark and when the first black bar is detected, the contents of counter (16) is set in standard number memory (17). A bar count normalizing circuit (18) adjusts the number of pulses for a black or a white bar based upon a standard number of pulses taken for a start mark or a stop mark. Thus, a standard black bar pulse count "A" in a memory 17 is compared with an observed pulse count "B" in counter 16 for a black bar or for a white bar and the value "B" is adjusted in accordance with the following equation: Cadj = k x B/A (3) where k is a predetermined positive value, and Cadj is an adjusted pulse count. The output signal of normalizing circuit 18 represents the width of a black or a white bar. The output of normalizing circuit (18) corresponds to the width of either a black bar or a white bar. Bar code distinction circuit (19) distinguishes a black bar from a white bar and detects bar-width by referring both the barwidth signal outputted by the normalizing circuit (18) and the status signal from reference circuit (15). A second recognition circuit (20) recognizes numerals or marks depending on the occurrence of black bars and white bars with references to their width after a series of information concerning a set of bar codes within an area defined by a pair of start mark and stop mark have been received. Fig 6 illustrates signals when bar code format in Fig 4 is scanned by traversing the hand held scanner of Fig 1. Clock time for scanning is shown on line (a) and digital signals outputted by binary circuit (7) are shown in pulse signal form (b). References (c) and (d) show relevant number of signals detected for black bar and white bar respectively. These signals are normalized as illustrated in (e) and (f). As is understood from Fig 6 (e) and Fig 6 (f), both of the first and the second black bars are either a start mark or a stop mark. A figure begins at the first "white bar followed by "black bar" / "white gap / "black bar". The second black bar is used as a stop mark. According to the order of occurrence of above described bars, 8 white bar (having a unit width) a black bar (having four units of width), a white bar (having a unit width) are observed. The recognition results for this bar code format is found to be 9 when above order of occurrence is referred to a predetermined code principles. A selection circuit (23) outputs final recognition results based on information provided by the first recognition circuit (12), the second recognition circuit (20) and decision flag (22). According to the description of the preferred embodiments of the present invention, bar code recognition is performed by utilizing a photoelectric element (30). it will also be readily understood that the same results are obtained by utilizing predetermined number of elements in an array. In Fig 1, which illustrates construction of the optical reader of the present invention, binary circuit (7) is located in a body of a hand held scanner as an element. It is, however, also readily understood that the circuit (7) be installed in processing portion, if such a design is favorable. As described above, the present invention provides an optical reader which is capable of recognizing both alphanumeric and bar code format with one single scanner. An optical reader recognizes either character or bar code format after determining whether the digitalized object pattern is character or bar code and thus enables to read merchandiswe tag with both formats more accurately than conventional reading device.

Claims: CLAIMS 1. An optical reader capable of recognizing both bar code and alphanumeric character formats by means of a single scanner unit having an image sensor including a two-dimensional array of photoelectric elements, a switching gate, whether an object binary pattern is in bar code or alphanumeric character format, and, thereafter, processing the binary pattern by means of bar code or alphanumeric character recognition circuits. 2. An optical reader for scanning and recognizing alphanumeric character and bar code formats by means of an image sensor with a two dimensional array of photoelectric elements comprising: means for obtaining a pattern of an alphanumeric character or a bar code format within sight of the image sensor; means for providing a binary pattern of a scanned object after digitalizing the output signal of each of the photoelectric elements in the sensor array; means for calculating a logical sum of "black" area in either of line or column segments of the binary pattern in order to detect the number of consecutive lines or columns having at least one photoelectric element detecting the presence of a character or bar code; ; object determination means for determining whether the object of the binary pattern is an alphanumeric character or a bar code based on the detected lumber of consecutive lines or columns having at least one photoelectric element in either of line or column segment; means for selecting one appropriate recognition means for either of a character or bar code according to the results of the determination means; first means for recognizing a character according to a binary pattern; counting means for scanning frequency or scanning cycle time by processing digital signal(s) generated from at least one photoelectric element; ; a second recognizing means for recognizing a bar code by processing both the degree and the order of occurrence of the digital signals outputted from at least one photoelectric element, and, switching gate means for operating either of the first or second recognition means according to the results of object determination means. 3 The optical reader according to clam 1 wherein the second recognition means recognizes a bar code by processing data of both the degree and frequency of scanning the object binary bar code pattern and by classification data on width and colour of the bar in the format, and by the order of occurrence of the colour and width of the bar in the format.

Inventors: SATOH, KOJI
Applicants: SUMITOMO ELECTRIC INDUSTRIES LIMITED
Application year: 1984
Main classification: G06K7
IPC codes: G06K9, G06K7