OCR AND BAR CODE READER WITH OPTIMIZED SENSOR

Abstract: In an optical reader for reading alphanumeric and bar code characters, an area array for scanning alphanumeric data and a single photo sensor for scanning bar code data is formed on the same semiconductor chip. Separate proces­ sors are connected to the array and to the single photosensor wherein the single photosensor is reading bar codes and the area array is used for reading alphanumeric data.

Description: FIELD OF INVENTION This invention relates to optical character readers and more particularly to a hand held optical character reader for reading either alphanumeric or bar code format with the same hand held unit with no operator intervention to switch between the reading of the two formats. PRIOR ART Hand held optical readers are well known in the art and ,alpha- numeric readers are described in U.S. patent 4,075,605 and 4,188,687. There are also many patents relating to hand held units for- reading bar code particularly the universal product code (UPC), however there are no hand held readers which read both bar code format and alphanumeric format. With the increasing use of OCR coding in merchandising tags and inventory control it is desirable to have a hand held unit which will read either the bar code or the alphanumeric format without the operator having to switch the unit depending upon which codes to be read. SUMMARY OF THE INVENTION A dual reading hand held optical¯'¯character unit utilizing a scanned array and a separate bar code sensor photosite is used to read either bar code or alphanumeric format. A common lens system is used- for both of the reading sensors. The separate processors are used, one to process alphanumeric data and another to process bar code data. Each processor has an output to a common selector interface so that only one processor output can utilized at a time. This invention relates to hand held optical readers and more particularly to hand held optical character readers which will read either bar code or alphanumeric format without the operator having to switch between the two depending upon which the unit is reading. The present invention may be scanned across either or both of the formats singularly or in combination and the reader will separate the two codes outputing only one information stream. It Is desirable on-ly to r-ld one of the formats at a time; however it is not convenient to have to switch between the two. Therefore the present invention indiscriminately reads either-and outputs the information read. DRAWINGS Figure, la and ib are block diagrams of two different embodiment of a dual reading optical character recognition system. Figure 2 illustrates both alphanumeric and bar code format. Figure 3a is a block diagram of thresholding circuit. Figure 3b is a circuit diagram of a thresholding circuit. Figure 4 illustrates the wave forms of the Video inputs and outputs of the comparator. Figure 5 is a microprocessor for reading the bar code format. Figure 6 is a flowchart of the UPC barcode reading process And Tables 1, 2 and 3 illustrate the black/white decoding patterns for UPC bar code format. PREFERRED EMBODIMENT Illustrated in figures la and 1b are dual reading hand held optical character recognition units. In Figure la a common lens system and common illumination is used for projecting data into the system. A sensing array is modified to contain a separate- photodiode site. The photodiode is rectangular instead of round or -square which gives spa- tial filtering characteristics that will enhanc-e the sensing of bar code images. The tall thin geometry will allow narrow spaces and bars to be sensed and is tolerant of -voids in-bars and extraneous ink spots. An optical coating can be placed over this photodiode to obtain a different spectral, -response than that of the area array. Normally, the area array will respond to- the near IR spectrum so that blind inks can be used in conjunction with OCR printing without causing intereference. The filter for the bar code sensor will attenuate the IR energy and peak the response in the red portion of the visible spectrum to be compatible with the Uniyeral Product Code printing specifications. The combination sensor can be a monolithic device or a hybrid device - made up -of two separate semiconductor chips. In Figure ib the bar code photo device is physically separated;and a mirror or prism is used to reflect onto the photo sensor. Two preamp circuits amplify the outputs of the area array -and the bar code sensor to boost very small currents to optimum signal levels. The OCR video signal goes to signal conditioning circuits, a character recognition circuit and a line edit logic circiut similar to those U.S. patent 4,075,605 and 4,188,687. Since these circuit are adequately described fn these patents they will not be further discussed here. The bar code processor is described as follows: The minimum bar width and space pair represents the highest spatial information frequency. When this pattern is scanned by a sensor a signal frequency is obtained that will be in the range of 1500 Hz for a 30 IPS scan rate. The low pass filter is designed to pass data only up to this frequency; thus improving the signal-tonoise ratio of the signal before it is thresholded. The filter utilized for the low pass function is an active filter which implements a 3-pole, low ripple Chebyshev design. The function of the thresholding circuit¯ is to transform the analog signal that is derived from optically scanning the bar code into a- digital signal level whose 'pulse widths are representative of the widths of the bars in the bar code. The threshold circuit must accommodate a wide range of signal levels and modulation percentages in order to read a high percentage of tags or inventory codes. Because of this, an adaptive reference level must be used in thresholding the analog signal. Figure 3a shows a block diagram of this approach. The circuit to accomplish this function is shown in figure 3b. The dynamic reference voltage is either 0.6 volts less than a positive peak or 0.6 volts greater than the negative peak. The peak values of the analog signal establish new reference levels for each signal swing and a black-to-white or white-to-black output transition occurs when the analog signal decreases from its peak value by 0.6 volts. Pulse widths will be accurate for waveforms that have equal positive and negative slopes and have peak to peak swings of 1.2 volts. or greater. The waveforms shown in figure 4 represent a very poor analog input, but show the reference that would be produced and the resulting digital output. The output pulse widths are equal to the time between analog peaks, or in the case of a flat: top signal, the time between positive to negative for vice -versa) directional changes. The comparator (figure 3a) is biased by the quiescent reference to produce a white output so that as the reader is brought closer to the paper no change in output occurs. The character detection logic is implemented in the form of a 3874 8-bit microprocessor and is illustrçted in figure 5. The- microprocessor looks for black/white transitions on its input port 5-bit 7. The time intervals between black white transitions are then recorded in the microprocessor's memory. When the time between the black white transitions is long (i.e. widest bar width divided by minimum reading speed), the microprocessor then "times out" and goes to process the black white transitions for a valid bar code value. In the case of the UPC code, each set of two black bars and two white bars represents digital character. The relative widths of the black and white determine whisk digital characters. The charts 1, 2 and 3 illustrate the decoding for UPC cháracters. The velocity variations of a hand held device.can be compensated for with this bar code due to the fact that each set of two black bars and two white bars compose 7 modules. For: Tw ¯ Time for white Tb = Time for black Tm = Time for 1/7 module Then: Wwl = Twl/Tm Wbl Tbl/Tm Ww2 = Tw2/Tm Wb2 = Tb2/Tm And: Ww1 + Ww2 + Wbl+Wb2 7 Wmin = 1 Wmax = 4 These characteristics can then be used to decode the black white transitions into decimal characters. The UPC bar code is further protected with stop/start bars, center bars, right and left of center bars and overall parity check characters. These are generally illustrates in table 1. Other black/white bar codes have similar properties and can be decoded by recording the time length of the black/white bars and using appropriate decoding equations. A flow chart of the UPC barcode reading process is shown in figure 6. Step 1. The circuits and registers are initialized by power on clear circuits at initial power turn on. The time for the black and white bars and spaces is recorded in memory during Step 2. If a period of time has passed which is greater than the widest bar or space divided by the lowest expected reader velocity, and no black to white or white to black data transition has occurred, then a time out condition is generated at Step 3. If fewer than 33 transitions of black to white and white to black have occurred at Step 4, then it is impossible for a full UPC barcode to have been read. The process is reinitialized to Step 1. With 33 or more transitions of black to white and white to black it is possible that a valid UPC barcode has been scanned and the process advances to Step 5 where an initial guess of a right to left scan of the reader over the barcode is assumed. At Step 6 the collected data from Step 2 is looked at as groups of 2 bars and two spaces since all valid numbers are so grouped as shown in Table 1. If the number of transitions is greater than 55 then the process assumes a twelve digit long code version the UPC barcode at Step 7 and proceeds to Step 8 where the mask for the four bars is derived by using the equations: WWl+WW2+WB1+Wb2=7 and Wmin = 1 Wmax = 4 The sum of the widths of the two black (Wbx) bars and two white spaces (Wwx) is 7 units and the minimum width is one and the maximum width is four. In Step 9 the character mask or pattern is checked against the odd parity characters of Table 3. If a valid character is found then the decision goes to Step 10 where the first valid odd parity character is compared to the numbers one (1), seven (7) and eight (8). These numbers are excluded since in the 12 digit UPC, the first left hand digit cannot be one, seven or eight. The negative leg of Step 9 and the positive leg of Step 10 will be discussed later as they indicate a good start character for- the 12 digit UPC code has not been derived yet. Step 11 indicates that the first valid left hand odd parity character of the 12 digit UPC code has been found and its place in the input data stream is marked and the next two sets of black and white bars are indexed for the character mask derivation in Step 12. This is the same process as described in Step 8. If this character mask corresponds to a valid odd parity character in Step 13, then this character is stored away and the input stream reindexed to next two sets of black and white bars. If les-s than six characters have been found, then Steps 12 and 13 are repeated by the decision at Step 14. After 6 characters have been found by repeating Steps 12 and 13, the bar code format expects a center bar pattern as shown in Table 1. Step 15 skips over this center bar pattern. Step 16 looks at two more sets of bars and spaces as was done in Step 8. Since the right hand side of the 12 digit UPC code is even parity, Step 17 looks for valid even parity digits from the complement of the odd parity of Table 3. This process continues until six even parity digits are found, thus making a total of 12 character as indicated in Step 18. When the 12th character is found, -a check digit is calculated over the 12 characters in Step 19, and if the check digit calculates properly theright guard bars are validated in Step 20 against the pattern shown in Table 1. When all of these checks, as outlined above, are passed, the digits for the validated bar code data are output in Step 21 to the output selector and interfaced as shown in figure la. The steps as outlined above for Steps 8 through 21 was for a 12 digit UPC barcode reading the data out from left to righty as it appears on the page. The actual scanned direction was compensated for in Steps 5 or 35. Now returning to Step 7 and taking the "no leg", this part of the flow chart is basically for the E version (6 digit) UPC code. At Step 22 if the number of transitions (bars and spaces) is less than 29, then this is insufficient for a valid 6 digit barcode and the process goes to Step 34 to try the opposite direction, if it has not already been tried. At Step 23 the number of transitions is checked to be less than 44. If this test is passed then Step 24 uses a set of two bars and two spaces to derive a character mask as was done in Step 8. Since at the present time only number system zero from Table 2 is used, then this first character must be even parity. This check is done in Step 25. If a valid first left character for the 6 digit UPC barcode is found, the input pointer is backed up three transitions and the left guard bar is checked for the pattern shown in Table 1. This is Step 26 of the process. If the left guard bar is validated then the location of the first valid character is recorded in Step 27. The pointer is moved to the next set of two black and two white bars and the character mask is derived in Step 28 as it was in Step 8. In Step 29 the character mask is compared to Table 3 for a match of the odd or even parity digits. If a match is found, not a reject, character and parity is stored and the process of Step 28 and 29 is repeated until six characters are found in Step 30. When the six characters have been found Step 31 compares the check digit with the character parity shown in Table 2. If this check digit calculation passes, then in Step 32 the right guard bars; as shown in Table 1, are validated. If this validation passes then the data is output in Step 33 as it was in Step 21. This thus completes the successful decode of a six character UPC barcode. Returning to Step 34 which is entered from Steps 20, 22 or 23. These indicate a failure of the decode process in the initial assumed negative direction. Thus in Step 34 if the present. direction is negative, then the positive direction is assumed in Step 35 and the process restarts at Step 6 for another look in the opposite direction. If, in Step 34, the previous direction was positive, that implies Step 35 has already been tried before so the process aborts having not found a valid barcode in either direction. Step 36 is a result of a failure in Steps 9, 10, 25, 26 or 37. In this case if the direction was positive or negative the pointer is moved one bar or space in the previously defined direction and the process tried over again at Step 6. Step 37 is a result of a failure in Steps 13, 29, 31 or 32 In this case the pointer to the input data stream must be replaced to itsprevious origin before the one bar or space adjustment is made in the proper direction. The line edit logic is performed by a 3874 Microprocessor. The digits as determined in the character detection logic are checked as to direction of scan, digit parity, and line parity. In the case of the UPC bar code, the number of black elements (not bars) per digit determine the character parity (000 is left hand bars; even is right hand bars). The line parity is determined by a weighting scheme of the first eleven characters to determine the twelfth character. These checks, coupled with right hand, center, and left hand guard bars are used to provide bar code line data integrity. When the bar code field has passed all of the above tests for data integrity, the data is transferred to the output selector and the interface. Processor 1 may be similar to that described in U.S. patent 4,075,605 and 4,118,687 and is not further described here. The output selecting an interface which is fed by both the alphanumeric and the bar code processors gives priority to an output from processor 1 if there is no output in processor 1 and there is output in processor 2 then the character data output data is from processor 2. In practice there would only be an output from both processors if the units scanned as illustrated figure 2 covering the alphanumeric characters and the bar code otherwise, there would only an output from one of the processors and the decision does not have to be made. While specific examples have been given of a combination bar code/ alphanumeric reader which will read either of the formats without interference from the operator other examples will be apparent to those skilled in the art having seen these specific examples and the attached claims.

Claims: What is Claimed: 1. In an optical reader for reading alphanumeric and bar code characters including scanning means comprising; an area array of photo sensors for scanning alphanumeric data, a single photo sensor for scanning bar code data, a first processor connected to said area array for recognizing and reading alphanumeric data, a second processor connected to said single photo sensor for recognizing and reading bar code data and an output selector connected to both said first and second processors for outputting data from only one of said processors at a time. 2. This optical reader according to claim 1 wherein said single photo sensor is a selected one of the photo sensor in said area arrray. 30 The optical reader according to claim 1 wherein said single photo sensor has an optical filter coating to give the single photo sensor an optical response different from the optical response of the area array. 4. The optical reader according to claim 3 wherein the area array responds to the near infrared spectrum and the single photo sensor responds to the red portion of the visible spectrum. 5. A photo sensor device for reading both alphanumeric data and barcode data comprising an area array of photo sensor for reading the alphanumeric data and a single photo sensor for reading the bar code data. 6. The device according to claim 5 wherein the single photo sensor is a selected one of the photo sensors of the area array.

Inventors: MCWATERS, LYNN D., SANNER, MEDFORD D.
Applicants: RECOGNITION EQUIPMENT INCORPORATED
Application year: 1982
Main classification: G06K7
IPC codes: G06K9, G06K7