Abstract:
A binary coding circuit for binary coding the output of a photoelectric conversion element in an optical character reader. A parent signal generating circuit produces a binary coding parent signal and a threshold parent signal in response to the output of the photoelectric conversion element. The binary coding parent signal is applied to a binary coding signal amplifier circuit group inclusive of N amplifier circuits having different amplification factors and different offset levels, while the threshold parent signal is applied to a threshold signal amplifier circuit group having M amplifier circuits also having different amplification factors and different offset levels, N and M being positive integers. The outputs of each of the N and M amplifier circuits are individually compared by a comparison circuit group including L comparison circuits, where L is a positive integer satisfying MAX (M, N)≦L≦MN.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to analog signal binary coding circuits, and more particularly to a binary coding circuit for quantizing the output of a photoelectric conversion element in an optical character reader adapted to optically convert characters or codes into a binary signal having two signal levels corresponding to a background region and a character or code region. 
     The term &#34;character&#34; as used herein is intended to means alphabets and character sets of all languages, numerals, etc. The term &#34;code&#34; as used herein is intended to mean bar codes, etc. 
     Such characters and codes are, in general, printed in black ink on a white printing sheet. The contrast between black and white permits distinguishing the characters and codes from the background. The printing sheet is not always white, however. Nevertheless, even in the case where the characters or codes are printed on colored sheets, the characters or codes can usually be clearly distinguished from the background. 
     Hereinafter, the part of a sheet where a character or code is printed or written will be referred to as &#34;a character region&#34;, and the part of a sheet where nothing is printed or written will be referred to as &#34;a background region&#34;. In addition, characters, numerals and codes will all be referred to merely as &#34;characters&#34;, and a device for optically reading characters on a sheet will be referred to as &#34;an optical character reading unit&#34; or &#34;optical character reader&#34;. 
     In a conventional optical character reader, the surface of a sheet on which characters are written or printed is scanned with a photoelectric conversion element, the outputs of the latter is converted into binary signals corresponding to character and background regions, and the binary signals are utilized to identify the characters. 
     In this operation, the surface of the sheet is irradiated by a light source, and light reflected from the surface of the sheet is applied through a lens system to the photoelectric conversion element, which generates an electrical signal in correspondence to the quantity of light incident thereon. The quantity of light incident on the photoelectric conversion element changes with the characters on the surface of the sheet. Since usually the character region is black while the background region is white, the quantity of light reflected, i.e., the intensity of light incident on the photoelectric conversion element, depends on the presence or absence of characters on the surface of the sheet. 
     Characters on a sheet are not, however, uniform in density, and accordingly, the analog output of the photoelectric converter element scanning the surface of the sheet is not precisely a binary signal; that is, it changes continuously and irregularly. Even in the case of characters printed by type, vertical lines are often different in width from horizontal lines in the character, and different characters have different numbers of strokes. Thus, the output of the photoelectric conversion element changes in multiple analog modes. Furthermore, it changes with time and changes spatially. That is, the output of the photoelectric conversion element is an analog signal which takes not only a maximum value and a minimum value for character and backgroud regions, but also various values therebetween. 
     The simplest method of binary coding such an analog density signal is to compare its signal level with a predetermined threshold level so that an output &#34;1&#34; or &#34;0&#34; is produced according to whether or not the signal level is higher than the threshold level. However, this method sometimes suffers from a difficulty that a character region can sometimes be determined erroneously as a background region, i.e., a character is not completely detected, or a background region detected as a character region, so that lines of a detected characters appear to overlap with one another. Accordingly, identification of characters and codes according to data binary coded by the above-described method is unavoidably in correct. 
     The reason why a character is not completely detected or its lines appear to overlap as described above resides in the use of a fixed threshold level for binary coding. Thus, the above-described method is applicable only to simple characters. 
     In order to overcome the above-described difficulty, a binary coding circuit has been proposed in which the threshold level changes with the output of the photoelectric conversion element. More specifically, the threshold level is so controlled that, when a character of a binary coded image is liable to be deformed because of a large difference in level between the background region and the character region, the binary coded image is made thinner, and when a character of a binary coded image is liable to be partially missed, the binary coded image is made thicker. Therefore, the binary coding circuit can binary code characters with high accuracy even if the characters differ in density to some extent. 
     No one threshold variation is most suitable for every kind and density of characters. However, in practice, since a character identifying section carrying out subsequent processing can identify an input binary coded image which is somewhat deformed in configuration, even if only one threshold level setting reference is provided for the binary coding circuit, the range of character densities is often sufficient for the binary coding circuit to correctly identify the characters. 
     However, it is generally difficult for the conventional binary coding circuit to provide optimum threshold levels for all characters of different densities by analog processing. Especially it is difficult for a binary coding circuit to binary code both extremely thick and dark characters and extremely thin and light characters satisfactorily. Even if it were possible for the circuit to do so, the operation often would be low in stability. Sometimes the best threshold level cannot be obtained, depending on the characteristics of the photoelectric conversion element employed. 
     SUMMARY OF THE INVENTION 
     In view of the foregoing, an object of the invention is to provide a binary coding circuit having a simple circuitry arrangement which can binary code characters in a wide range of densities with high stability. 
     The foregoing object of the invention has been achieved by the provision of a binary coding circuit for binary coding an output of a photoelectric conversion element in an optical character reading unit adapted to optically read characters which, according to the invention, comprises: a parent signal generating circuit receiving an output of the photoelectric conversion element and generating a binary coded parent signal and a threshold parent signal;.a binary coding signal amplifier circuit group to which the binary coded parent signal is applied, the binary coding signal amplifier circuit comprising N amplifier circuits (where N is a positive integer) having different amplification factors and different offset levels; a threshold signal amplifier circuit group to which the threshold parent signal is applied, the threshold signal amplifier circuit group comprising M amplifier circuits (where M is a positive integer) having different amplification factors and different offset levels; and a comparison circuit group comprising L comparison circuits (where L is a positive integer satisfying MAX (M, N)≦L≦MN), in each of which one of the outputs of the amplifier circuits in the binary coding signal amplifier circuit group and one of the outputs of the amplifier circuits in the threshold signal amplifier circuit group are subjected to comparison to provide a binary coded signal. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing the basic arrangement of a binary coding circuit according to the invention; 
     FIG. 2 is an explanatory diagram for a description of character density ranges suitable for binary coded outputs; 
     FIG. 3A is a waveform diagram showing examples of binary coded outputs; 
     FIG. 3B is an explanatory diagram showing examples of images identified with different binary coded outputs; and 
     FIG. 4 is a circuit diagram showing an example of a binary coding circuit of the invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A preferred embodiment of a binary coding circuit of the invention will be described with reference to the drawings. 
     For simplification in description, it is assumed that the output of a photoelectric conversion element increases in level for a black background. That is, for instance, in a signal S 1  to be binary coded (hereinafter referred to as &#34;a binary coding signal S 1  &#34; when applicable) the higher level represents a black background and the lower level a white background. 
     With reference to FIG. 1, a parent signal generating circuit 1 receiving the photoelectric conversion output A of an optical character reading unit outputs a parent signal S to be binary coded and a threshold parent signal H. These parent signals S and H are applied to a binary coding signal amplifier circuit group 2 and a threshold signal amplifier circuit group 3, respectively. The binary coding signal amplifier circuit group 2 includes amplifier circuits 2-i (i=1 through N) which amplify the parent signal S with different amplification factors and offset it with different offset levels to output respective binary coding signals S i . Similarly, the threshold signal amplifier circuit group 3 is composed of amplifier circuits 3-j (j=1 through M) which amplify the threshold parent signal H with different amplification factors and offset it with different offset levels to output respective threshold signals H j . 
     The binary coding signals S i  and the threshold signals H j  are applied to comparison circuits 4-k (k=1 through L) forming a comparison circuit group 4. That is, one of the comparison circuit 4-k receives a respective one of the binary coding signals S i  and one of the threshold signals H j . Therefore, the number of combinations of the binary coding signals S i  and the threshold signals H j  which are applied to the comparison circuits 4-k is MN. The comparison circuits 4-k of the comparison circuit group 4 subject the binary coding signals S 1  and the threshold signals H j  to comparison to output binary coded output B k  (k=1 through L) representing whether or not the signals S i  ar higher than the respective signals H j . Each of the binary coded outputs B k  has a high level when the signal (S i ) is higher than the signal (H j ), thus indicating that the part of a sheet then scanned by the photoelectric conversion element should be determined as black. 
     For instance, in the case of FIG. 1, the output S 1  of the amplifier circuit 2-1 in the binary coding signal amplifier circuit group 2 is applied to first input terminals of the comparison circuits 4-1, 4-2 and 4-3, and the threshold signal outputs H 1 , H 2  and H 3  of the amplifier circuits 3-1, 3-2 and 3-3 are applied to second input terminals of the comparison circuits 4-1, 4-2 and 4-3, respectively. The comparison circuits 4-1, 4-2 and 4-3 compare the binary coding signal S 1  with the threshold signals H 1 , H 2  and H 3  to provide binary coded outputs B 1 , B2 and B3, respectively, as shown in FIG. 3. 
     If the binary coded output B 1  is best as a binary coded circuit output level for a character read by a photoelectric conversion element, then for the binary coded output B 2  the output image has a greater line thickness, and with the binary coded output B 3  the line thickness is so great that the output image cannot be substantially read or identified (see FIGS. 3A and 3B). Therefore, with respect to the densities of the characters to be read, suitable ranges are assigned to the binary coded outputs B k  so that the latter B k  can provide the best image outputs (or the best identification results), as shown in FIG. 2. In the case of FIG. 2, the higher in density a character to be read, the closer to B 1  will be the binary coded output selected (or the lower in density a character to be read, the closer to B L  the binary coded output selected). In this connection, it is preferable that the applicable ranges (the density ranges which can be binary coded with the outputs) of the L binary coded outputs B k  overlap one another, as indicated in FIG. 2. Theoretically, it is unnecessary to overlap the density ranges. However, in practice, the probability of erroneous identification is high in the end portions of each of the applicable density ranges. Therefore, the density ranges are made to overlap with one another for an increase in reliability. 
     An example of a binary coding circuit according to the invention will be described with reference to FIG. 4. 
     The binary coding circuit, as shown in FIG. 4, includes a parent signal generating circuit 1, a binary coding signal amplifier circuit group 2, a threshold signal amplifier circuit group 3, and a comparison circuit group 4. The parent signal generating circuit 1 is composed of a delay circuit 11 and an OR circuit 12. The binary coding signal amplifier circuit group 2 is made up of N amplifier circuits 2-i (i=1 through N). The threshold signal amplifier circuit group 3 includes M amplifier circuits 3-j (j=1 through M). The comparison 
     circuit group 4 includes L comparison circuits 4-k (k=1 through L). 
     The delay circuit 11 includes a first delay line 111 having a delay time of t 1 , and a second delay line 112 having a delay time of t 2 . The signal provided by delaying a photoelectric conversion element output A by t 1  by the delay line 111 is applied as a binary coded parent signal S, to the binary coded signal amplifier circuit group 2. The OR circuit 12 is composed of amplifiers 121 and 122, diodes D 1  and D 2 , and a resistor R 120 . The logical sum of the signal obtained by amplifying the photoelectric conversion element output A with the amplifier 121 and the signal obtained by amplifying the output of the delay circuit 11 with the amplifier 122, which signal is provided by delaying the photoelectric conversion element output A by t 1  +t 2  with the delay lines 111 and 112, is applied, as a threshold parent signal H, to the threshold signal amplifier circuit group 3. 
     In the binary coding signal amplifier circuit group 2, each of the amplifier circuits 2-i is composed of an operational amplifier 20i, resistors R1i, R2i and R3i, and a variable resistor R4i. Similarly, in the threshold signal amplifier circuit group 3, each of the amplifier circuits 3-j includes an operational amplifier 30j, resistors R5j, R6j and R7j, and a variable resistor R8j. The variable resistors R4i and R8j are used to adjust the offset levels, and are connected to a DC constant voltage V EE . 
     The binary coding parent coding parent signal S is applied to the binary coding signal amplifier circuits 2-i. In each of the amplifier circuits 2-i, the binary coding signal S is applied through the resistor R1i to the noninverting input terminal f of the operational amplifier 20i, and the output terminal h of the operational amplifier 20i is connected through the resistor R2i to the inverting input terminal g. The amplification factors π 2i  of the amplifier circuits 2-i for noninverting amplification are as follows: ##EQU1## where Rli is substantially equal to R3i. Thus, the different amplifier circuits 2-i amplify the binary coded parent signal S with different amplification factors and offset it with different offset levels to provide binary coded signals S i  which are applied to the comparison circuit group 4. 
     Similarly, the amplification factors π 3i  of the amplifier circuits 3-j in the threshold signal amplifier circuit group 3 are as follows: ##EQU2## 
     Thus, the different amplifier circuits 3-j amplify the threshold parent signal H with different amplification factors and offset it with different offset levels, to output respective threshold signals H j . The threshold signals H j  are applied to the comparison circuit group 4. The binary coding signal amplifier circuit group 2 or the threshold signal amplifier circuit group 3 may include only one amplifier circuit; that is, M or N may be one (1). 
     The binary coded signals S i  and the threshold signals H j  are applied to comparison circuits 4-k (k=1 through L) in the comparison circuit group 4 in such a manner that each binary coded signal S i  and a respective threshold signal H j  are subjected to comparison in a corresponding, comparison circuit 4-k, which provides a binary coded output B k  only when the binary coding signal S i  is higher than the threshold signal H j . With respect to the densities of the characters to be read, suitable density ranges are assigned to the various binary coded outputs B k  so as to provide the best image outputs (and the best identification results). Selection of the binary coded outputs B k  is effected by a processing circuit (such as an identifying circuit) in a later stage. 
     In the preferred embodiment, in order that, with the binary coded output B 1 , a thick dark character can be satisfactorily binary coded, and, with the binary coded output B L , a thin light character can be satisfactorily binary coded, and with the binary coded outputs B 2  through B L-1  between the outputs B 1  and B L  characters ranked in thickness and in darkness between the above-described two characters can be satisfactorily binary coded, the amplifier circuits 2-i and 3-j should be suitably adjusted in amplification factor and in offset level. 
     The binary coding circuit of the invention, having a simple circuit arrangement, can satisfactorily binary code characters in a wide range of densities, thus markedly improving the reading capacity of an optical character reader (OCR) or a bar code reader (BCR). Furthermore, the binary coding circuit of the invention can be effectively utilized for improving the stability of operation of a hand-held POS (point of sale) terminal, OCR or BCR.