Bar code reading apparatus

Abstract: A bar code reading apparatus includes a scanner (20) , and a measuring circuit (1) for measuring a width of each white bar contained in the bar code and a width of each black bar contained therein and for outputting a measurement signal indicative of the width of the each white or black bar. Further, the apparatus includes first (2), second (4) and third (6) detection circuits. The first detection circuit (2) detects, from the measurement signal, a white bar having a width equal to or greater than a first reference value and outputs a first detection signal indicative of the width of the white bar. The second detection circuit (4) detects, from the measurement signal, a white bar having a width equal to or greater than a second reference value and outputs a second detection signal indicative of the width of the white bar, the second reference being less than the first reference. The third detection circuit (6) detects, from the measurement signal, a black bar having a width equal or greater than a third reference value and outputs a third detection signal indicative of the width of the black bar. A logic circuit (8, 10, 28, 30, 32) receives the first, second and third detection signals and outputs a margin detection signal indicating detection of the margin area on the basis of the first, second and third detection signals.

Description: BACKGROUND OF THE INVENTION The present invention generally relates to a bar code reading apparatus, and more particularly to a bar code reading apparatus capable of precisely reading a bar code even when it is printed on a wrapper or the like with a positional error so that a margin area preceding or following the bar code is less than a predetermined width. Conventionally, a bar code reading apparatus is used in a point-of-sales system. The bar code reading apparatus reads bar codes attached to wrappers of goods or the like. As is known, it is necessary to precisely recognize margin areas provided before and after the bar code and thereby read the bar code without errors. A conventional bar code reading apparatus scans a bar code by a scanner and determines whether a margin area (normally a "white" area) is equal to or greater than a predetermined width (generally equal to seven modules). Such a bar code reading apparatus is disclosed in United States Patent No. 4,074,852. As shown in FIG.1A, there is no problem when the conventional bar code reading apparatus scans a rear margin area which is equal to or greater than a predetermined width W1. It is noted that the last character bar is followed by guard bars, which are followed by the margin area. A low level of the illustrated signal indicates "white", and a high level thereof indicates "black". In contrast, the conventional bar code reading apparatus cannot read bar precisely in a case in which, as shown in FIG.1B, a bar code is printed in a rectangular white area incorrectly with respect to a surrounding black area (margin defining area or black frame) so that a margin area before or after the bar code is less than the predetermined width W1 (in the illustrated case, a rear margin area after the guard bars has a width W2 less than the predetermined width W1). A similar problem may occur in a case in which the front portion or rear portion of the bar code itself is curved, or when a bar code label attached on a wrapper is warped due to the presence a good contained therein. SUMMARY OF THE INVENTION It is a general object of the present invention to provide an improved bar code reading apparatus in which the above-mentioned disadvantages are eliminated. A more specific object of the present invention is to provide a bar code reading apparatus capable of correctly detecting margin areas located before and after the bar code so that the bar code can be read precisely. According to a first aspect of the present invention there is provided a bar code reading apparatus for reading a bar code having a character bar and a guard bar followed by a rear margin area, which apparatus comprises: scanning means for scanning such a bar code and for generating a pulse signal corresponding to the bar code; measuring means connected to the said scanning means for receiving the said pulse signal and operable to employ that signal to produce a series of measurement values corresponding to the pattern of bars across the bar code, each of which measurement values represents the combined width of two consecutive bars in the bar code, one of which bars is black and the other is white, the second of the bars of one measurement value being the first bar of the next measurement value in the series; and margin detection means arranged for processing the said measurement values of the said series and operable to generate a margin detection signal either upon detecting that one of those values is greater than or equal to a predetermined normal rear margin reference value or upon detecting that, for two consecutive measurement values of the said series, the second of those two values is greater than or equal to a predetermined rear black frame reference value and the first of those two values is greater than or equal to a predetermined minimum rear margin reference value that is less than the said normal rear margin reference value. According to a second aspect of the present invention there is provided a bar code reading apparatus for reading a bar code having a front margin area followed by a guard bar and a character bar, which apparatus comprises: scanning means for scanning such a bar code and for generating a pulse signal corresponding to the bar code; measuring means connected to the said scanning means for receiving the said pulse signal and operable to employ that signal to produce a series of measurement values corresponding to the pattern of bars across the bar code, each of which measurement values represents the combined width of two consecutive bars in the bar code, one of which bars is black and the other is white, the second of the bars of one measurement value being the first bar of the next measurement value in the series; and margin detection means arranged for processing the said measurement values of the said series and operable to generate a margin detection signal either upon detecting that one of those values is greater than or equal to a predetermined normal front margin reference value or upon detecting that, for two consecutive measurement values of the said series, the first of those two values is greater than or equal to a predetermined front black frame reference value and the second of those two values is greater than or equal to a predetermined minimum front margin reference value that is less than the said normal front margin reference value. In apparatus embodying the aforesaid first aspect of the present invention, in order to permit detection of the front margin as well, the margin detection means are preferably also operable to generate the said margin detection signal either upon detecting that one of the said measurement values is greater than or equal to a predetermined normal front margin reference value or upon detecting that, for two consecutive measurement values of the said series, the first of those two values is greater than or equal to a predetermined front black frame reference value and the second of those two values is greater than or equal to a predetermined minimum front margin reference value that is less than the said normal front margin reference value. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1A is a diagram illustrating a case in which a conventional bar code apparatus scans a normal rear margin area of a bar code; Fig. 1B is a diagram illustrating a problem of the conventional bar code apparatus caused by an abnormal margin area; Fig. 2 is a block diagram illustrating an outline of a bar code reading apparatus embodying the present invention; Fig. 3 is a waveform diagram illustrating the operation of a bar code reading apparatus embodying the first aspect of the present invention; Fig. 4 is a block diagram illustrating one example of the configuration of a bar code reading apparatus embodying the first aspect of the present invention; Fig. 5 is a block diagram of a bar code reading apparatus according to a preferred embodiment of the first aspect of the present invention; Fig. 6 is a block diagram of a bar code reading apparatus according to a preferred embodiment of the second aspect of the present invention; Fig. 7 is a waveform diagram illustrating the operation of the embodiment shown in Fig. 6; Fig. 8 is a circuit diagram of a circuit which is designed to combine a margin detection signal produced by the embodiment shown in Fig. 5 with a margin detection signal produced by the embodiment shown in Fig. 6; Fig. 9A is a block diagram of a variation of the embodiment shown in Fig. 5; and Fig. 9B is a block diagram of a variation of the embodiment shown in Fig. 6. DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to Fig. 2, there is illustrated a general configuration of a bar code reading apparatus embodying the present invention. The bar code reading apparatus in Fig. 2 includes an interval measuring circuit 1, a first detection circuit 2, a second detection circuit 4, a third decision circuit 6, an AND gate 8 and an OR gate 10. The interval measuring circuit 1 measures an interval between the leading edges of two consecutive pulses of a digital signal applied thereto and generates a measurement value indicative of the measured interval. The interval measuring circuit 1 also measures an interval between the trailing edges of two adjacent pulses thereof and generates a measurement value indicative of the measured interval. Thus, each measurement value generated by the interval measuring circuit 1 represents the sum of the widths (combined width) of two consecutive bars in the bar code, one of which bars is black and the other is white. Such a combined width (measured interval) is frequently called a delta distance. Hereinafter, such measurement values (each representing the sum of the widths of two consecutive white and black or black and white bars) which are output from the interval measuring circuit 1 are also referred to as measured intervals or widths. The first, second and third detection circuits 2, 4 and 6 use a series of the measurement values (measured intervals) T n-1 , T n and T n+1 , where n is an integer. The second bar of one measurement value of this series is the first bar of the next measurement value in the series. For example, as shown in Fig. 3, T n-1 , T n and T n+1 can be regarded as relating to a guard bar, a rear margin area and a margin defining area (a black frame), respectively. In practice, as will be described in detail later, the widths of the guard bar, rear margin area and black frame are each represented by the sum of the widths of two consecutive white and black or black and white bars. The first detection circuit 2 detects two consecutive bars having a combined width equal to or greater than a first reference value (normal margin reference value), which is a preselected multiple of a value equal to one module. For this purpose, the first detection circuit 2 determines whether or not the measured interval T n relating to the margin area and preceding guard bar (it can also be said that T n provides a measure of the width of the white bar constituting the margin area) is equal to or greater than the first reference value. If the margin areas of the bar codes to be scanned have a normal width of seven modules, the first reference value is set equal to or greater than seven modules. It can be seen that in the case of scanning the rear margin of the bar code the measured interval T n-1 corresponds to the sum of the width of the white guard bar and the width of the subsequent black guard bar, i.e. two modules, so that the first reference value is preferably a predetermined multiple of the measured interval T n-1 , i.e. the first reference value is A₁T n-1 , where A₁ is a coefficient. Thus, the first detection circuit 2 determines whether or not the measured interval Tn is equal to or greater than A₁T n-1 . When the normal width of the margin area is equal to seven modules, it is preferable that the coefficient A₁ be equal to or greater than 3.5. That is, the first reference value A₁T n-1 corresponds to a normal width of the margin area. The second detection circuit 4 detects two consecutive bars having a combined width equal to or greater than a second reference value (minimum margin reference value) less than the aforementioned first reference value. For this purpose, the second detection circuit 4 determines whether or not the measured interval Tn is equal or greater than a second reference value. It is preferable that the second reference value be equal to a predetermined multiple of the measured interval T n-1 , i.e. the second reference value is A₂T n-1 , where A₂ is another coefficient, less than the coefficient A₁. When the margin area is normally equal to seven modules in width, it is preferable that the coefficient A₂ be equal to or greater than 1.25 and equal to or less then 3.5. In this case, the second detection circuit 4 detects two consecutive bars (margin area and preceding guard bar) having a combined width between 2.5 times a single module and 7 times a single module. That is, the second detection circuit 4 is intended to determine whether or not the margin area (strictly the margin area and preceding guard bar) has a width equal to or greater than a predetermined minimum margin area width represented by the second reference value (A₂T n-1 ). The third detection circuit 6 detects two consecutive bars (margin area and black frame) having a combined width equal to or greater than a third reference value. For this purpose, the third detection circuit 6 determines whether or not the measured interval T n+1 , which in the case of scanning the rear margin of the bar code relates to the margin area and the margin defining area (black frame), is equal to or greater than a third reference value (black frame reference value). It is preferable that the third reference value be equal to a predetermined multiple of the measured interval T n-1 relating to the guard bar, i.e. the third reference value is A₃T n-1 , where A₃ is a coefficient. In the case of detecting the rear margin the third detection circuit 6 is intended to determine whether or not a black area (black frame) having a sufficient width follows the white area (margin area). When the margin area is normally equal to seven modules in width, it is preferable that the coefficient A₃ be equal to or greater than 3. In this case, the third detection circuit 6 detects two consecutive bars, (margin area and margin defining area) having a combined width equal to or greater than six modules. Thus, in this case the third reference value A₃T n-1 also approximately corresponds to a normal width of the margin area. As will be described in detail later, the first, second and third detection circuits 2, 4 and 6 operate in a similar way when the front margin area is detected. Detection signals from the second and third detection circuits 4 and 6 are supplied to the AND gate 8. Outputs from the first detection circuit 2 and the AND gate 10 are supplied to the OR gate, which outputs a margin detection signal. It is noted that the first detection circuit 2 is based on a conventional margin detection algorithm. Thus, there is a possibility that the first detection circuit 2 does not detect margin areas correctly due to a poor positioning precision in printing the bar code in the white area within the black frame (margin defining area), for example. Even in such a case, in bar code reading apparatus embodying the present invention the second and third detection circuits can correctly detect a margin area having a width less than the predetermined width (equal to seven modules, for example). In the configuration shown in FIG.4 the apparatus includes a first data holding circuit 3 and a second holding circuit 5. The first data holding circuit 3 holds the current measured interval from the interval measuring circuit 1 until a next measured interval is output from the interval measuring circuit 1. An output signal from the first data holding circuit 3 is supplied to the second data holding circuit 5 and the first and second detection circuits 2 and 4. The second holding circuit 5 holds the current measured interval from the first holding circuit 3 until the next data measured interval is output from the first data holding circuit 3. An output signal from the second holding circuit 5 is supplied to the first, second and third detection circuits 2, 4 and 6. With this arrangement of the first and second data holding circuits 3 and 5, the measured intervals T n-1 , T n and T n+1 are supplied to the first, second and third holding circuits 2, 4 and 6 at the same time. FIG.5 is a detailed block diagram of the bar code reading apparatus shown in FIG.4, in which those parts which are the same as those shown in the previous figures are given the same reference numerals. The configuration shown in FIG.5 is directed to precisely detecting a near margin area following the bar code. Referring to FIG.5, a bar code scanner 20 scans a bar code and generates an electrical output signal. A digitizing circuit 21 digitizes the output signal from the bar code scanner 21, and supplies the interval measuring circuit 1 with a digital signal. The interval measuring circuit 1 is made up of a bar width counter 11, a data latch circuit 12 and an adder 13. The bar width counter 11 measures the width of each white/black bar. The data latch circuit 12 latches the current bar width until the width of the next bar is output from the bar width counter 11. The adder 13 adds output signals from the bar width counter 11 and the data latch circuit 12. When the signal from the bar width counter 11 relates to a white bar, the signal from the data latch circuit 12 relates to a black bar preceding the white bar. In contrast, when the signal from the bar width counter 11 relates to a black bar, the signal from the data latch circuit 12 relates to a white bar preceding the black bar. The adder 13 outputs the sum of the width of the white bar (black bar) and the width of the black bar (white bar). The sum output from the adder 13 is a measurement value which corresponds to the aforementioned measured interval. The output signal (measurement value) from the adder 13 is supplied to the first data holding circuit 3 and a comparator 6₁, which is a part of the third detection circuit 6 shown in FIG.4. The first data holding circuit (latch circuit) 3 holds the current measurement value (measured interval) from the adder 13 unit the next measurement value (measured interval) is output therefrom. The output signal from the first data holding circuit 3 is supplied to the second data holding circuit (latch circuit) 5 and comparators 2₂ and 4₂. The second data holding circuit 5 holds the current measurement value (measured interval) (output from the first data holding circuit 3 until the next measurement value is output therefrom. The output signal from the second data holding circuit 5 is supplied to multipliers 2₁ and 4₁. The first detection circuit 2 shown in FIG.4 is composed of the multiplier 2₁ and the comparator 2₂. The second detection circuit 2 shown in FIG.4 is composed of the multiplier 2₁ and the comparator 4₂. The third detection circuit 6 shown in FIG.4 is connected to the multiplier 2₁ and comprises the comparator 6₁. In the configuration shown in FIG.5, the aforementioned constant A₁ is set equal to the constant A₃, and A₁ = A₃ = 3.5. Further, the constant A₂ is set equal to 1.5. The multiplier 2₁ multiplies the measurement value T n (measured interval) by 3.5. The multiplier 4₁ multiplies the measurement value T n-1 (measured interval) by 1.5. An output signal from the multiplier 2₁ is supplied to the comparators 2₂ and 6₁. An output signal from the multiplier 4₁ is supplied to the comparator 4₂. When the adder 13 outputs the measurement value (measured interval) T n+1 , the data holding circuits 3 and 5 output the measurement values (measured intervals) T n and T n-1 , respectively, and the multipliers 2₁ and 4₁ output the normal rear margin and minimum rear margin reference values 3.5T n-1 and 1.5T n-1 , respectively. The comparator 2₂ determines whether or not the measured interval T n is equal to or greater than 3.5T n-1 (Tn ≧ 3.5T n-1 ). The comparator 4₂ determines whether or not the measured interval T n is equal to or greater than 1.5T n-1 (Tn ≧ 1.5Tn). The comparator 6₁ determines whether or not the measured interval T n+1 is equal to or greater than 3.5T n-1 (T n+1 ≧ 3.5T n-1 ). Detection signals from the comparators 4₂ and 6₁ are supplied to the AND gate 8. Output signals 2₂ and the AND gate 8 are supplied to the OR gate 10, which outputs a rear margin detection signal. Referring to FIG.3(A), when T n ≧ 3.5T n-1 , the comparator 2₂ outputs a high-level signal, which passes through the OR gate 10 and is output as the rear margin detection signal. FIG.3(B) illustrates a case where the measured interval T n is less than 3.5T n-1 . In this case, the output of the comparator 2₂ is low. When T n ≧ 1.5T n-1 and T n+1 ≧ 3.5T n-1 , the comparators 4₂ and 6₁ generate high-level outputs. In this case, the AND gate 8 generates a high-level output, which passes through the OR gate 10 and provides the rear margin detection signal. Thus, it is possible to detect a bar code which is printed out of its predetermined position in a white area surrounded by a black margin defining area or which is curved so that the margin area after the bar code is less in width than the predetermined value. A description is given of a second embodiment of the present invention with reference to FIGS.6 and 7, in which those parts which are the same as those shown in FIG.5 are given the same reference numerals. The second embodiment is directed to reliably detecting a front margin area which precedes the bar code. Referring to Figs. 6 and 7, when the measurement value (measured interval) T n-1 , which in the case of scanning the front margin relates to the black frame area (margin defining area) and the margin area, is output from the data holding circuit 5, the measurement value (measured interval) T n+1 which in this case relates to the first guard bar and following white bar is applied to the data holding circuit 3, and the measurement value (measured interval) T n relating to the margin area and first guard bar is output from the data holding circuit 3. The measured interval T n+1 is applied to multipliers 2₃ and 4₃. The multiplier 2₃ multiplies the measured interval T n+1 by 3.5, and the multiplier 4₃ multiplies the measured interval T n+1 by 1.5. An output signal from the multiplier 2₃ is input to comparators 2₄ and 6₂, and an output signal from the multiplier 4₃ is input to a comparator 4₄. Thus, in the Fig. 6 embodiment the first detection circuit 2 shown in Fig. 2 is composed of the multiplier 2₃ and the comparator 2₄. The second detection circuit 4 shown in Fig. 2 is composed of the multiplier 4₃ and the comparator 4₄. The third detection circuit 6 shown in FIG.2 is connected to the multiplier 2₃ and comprises the comparator 6₂. The comparator 2₄ compares the measured interval T n with the multiplied interval (normal front margin reference value) 3.5T n+1 and determines whether Tn ≧ 3.5T n+1 . The comparator 4₄ compares the measured interval Tn with the multiplied interval (minimum front margin reference value))1.5 n+1 and determines whether Tn 1.5T n+1 . The comparator 6₂ compares the measured interval T n-1 with the multiplied interval (black frame reference value - in this example equal to the nornal front margin reference value) 3.5T n+1 and determines whether T n-1 ≧ 3.5 T n+1 . Detection signals from comparators 4₄ and 6₂ are input to an AND gate 28. An OR gate 30 is supplied with an output signal of the AND gate 28 and a detection signal from the comparator 2₄. An output signal from the OR gate 30 is a front margin detection signal. In practical use, it is preferable to use the combination of the configurations shown in FIGS.5 and 6. In this arrangement, an OR gate 32 shown in FIG.8 is used. The OR gate 32 is supplied with the rear margin detection signal from the OR gate 10 and with the front margin detection signal from the OR gate 30. An output signal of the OR gate 32 is a finalized margin detection signal. When the front and back margin areas are each correctly detected, the finalized margin detection signal is output from the OR gate 32 twice. In the configuration shown in FIG.5, the multiplier 2₁ is provided in common to the comparators 2₂ and 6₁. Alternatively, as shown in FIG.9A, it is possible to provide two multipliers 2 1a and 2 1b having different coefficients A₁ and A₃ (and hence different reference values) for the comparators 2₂ and 6₁, respectively. As shown in Fig. 9B, a similar arrangement to that shown in Fig. 9A is applicable to the configuration shown in FIG.6. Two multipliers 2 3a and 2 3b are provided having different coefficients A₁′ and A₃′. The coefficient of the multiplier 4₃ is represented by A₂′. For example, A₁ - A₃ = A₁′ = A₃′, and A₂ = A₂′. The present invention is not limited to the aforementioned embodiments, and variations and modifications may be made without departing from the scope of the present invention as defined in the appended claims.

Claims: Bar code reading apparatus for reading a bar code having a character bar and a guard bar followed by a rear margin area, which apparatus comprises: scanning means (20, 21) for scanning such a bar code and for generating a pulse signal corresponding to the bar code; measuring means (1) connected to the said scanning means for receiving the said pulse signal and operable to employ that signal to produce a series of measurement values (..., T n-1 , T n , T n+1 , ...) corresponding to the pattern of bars across the bar code, each of which measurement values represents the combined width of two consecutive bars in the bar code, one of which bars is black and the other is white, the second of the bars of one measurement value being the first bar of the next measurement value in the series; and margin detection means (2, 3, 4, 5, 6, 8, 10) arranged for processing the said measurement values of the said series and operable to generate a margin detection signal either upon detecting that one of those values (T n ) is greater than or equal to a predetermined normal rear margin reference value (for example 3.5 T n-1 ) or upon detecting that, for two consecutive measurement values (T n , T n+1 ) of the said series, the second (T n+1 ) of those two values is greater than or equal to a predetermined rear black frame reference value (for example 3 T n-1 ) and the first (T n ) of those two values is greater than or equal to a predetermined minimum rear margin reference value (for example 1.25 T n-1 ) that is less than the said normal rear margin reference value. Bar code reading apparatus as claimed in claim 1, wherein the said predetermined rear black frame reference value is equal to the said predetermined normal rear margin reference value. Bar code reading apparatus as claimed in claim 1 or 2, wherein the said margin detection means (2, 3, 4, 5, 6, 8, 10) comprise: first detection means (2) connected operatively to the said measuring means (1) for receiving therefrom the said measurement values and operable to generate a first detection signal upon detecting that one of those values (T n ) is greater than or equal to the said predetermined normal rear margin reference value (for example 3.5 T n-1 ); second detection means (4) also connected operatively to the said measuring means (1) for receiving therefrom the said measurement values and operable to generate a second detection signal upon detecting that one of those values (T n ) is greater than or equal to the said predetermined minimum rear margin reference value (for example 1.25 T n-1 ); third detection means (6) also connected operatively to the said measuring means for receiving therefrom the said measurement values and operable to generate a third detection signal upon detecting that one of those values (T n+1 ) is greater than or equal to the said predetermined rear black frame reference value (for example 3 T n-1 ); and logic means (8, 10) connected to the said first, second and third detection means (2, 4, 6) for receiving therefrom the said first, second and third detection signals and operable to generate the said margin detection signal either in response to the said first detection signal or in response to both the said second detection signal in respect of the said first (T n ) of the said two consecutive measurement values (T n , T n+1 ) and the said third detection signal in respect of the second (T n+1 ) of those two values. Bar code reading apparatus as claimed in claim 3, wherein the said margin detection means (2, 3, 4, 5, 6, 8, 10) further comprise respective first and second holding means (3, 5), each having an input for receiving the said measurement values of the said series sequentially and operable to hold each new measurement value received at the said input, whilst delivering at an output thereof the measurement value previously received at the said input, until the next measurement value of the series is received at the said input; the said measuring means (1) being connected to the said input of the said first holding means (3) and to the said third detection means (6), and the said output of the first holding means (3) being connected to the said input of the said second holding means (5) and to the said first and second detection means (2, 4), such that, when the said second (T n+1 ) of the said two consecutive measurement values is received at the said input of the said first holding means (3) and by the said third detection means (6), the first (T n ) of those two values is delivered from the said output of the first holding means (3) to the said first and second detection means (2, 4) and the measurement value (T n-1 ) that immediately precedes that first value (T n ) is delivered from the said output of the said second holding means (5), that immediately-preceding value (T n-1 ) being employed by the said margin detection means to set the said normal rear margin, minimum rear margin and rear black frame reference values. Bar code reading apparatus as claimed in claim 4, wherein: the said first detection means (2) comprise multiplying means (2 1a ) connected to the said output of the said second holding means (5) for multiplying the said immediately-preceding measurement value (T n-1 ) by a first constant (A₁) to produce the said predetermined normal rear margin reference value (A₁T n-1 ), and comparator means (2₂) for generating the said first detection signal if the said first (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₁T n-1 ); the said second detection means (4) comprise multiplying means (4₁) connected to the said output of the said second holding means (5) for multiplying the said immediately-preceding measurement value (T n-1 ) by a second constant (A₂) to produce the said predetermined minimum rear margin reference value (A₂T n-1 ), and comparator means (4₂) for generating the said second detection signal if the said first (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₂T n-1 ); and the said third detection means (6) comprise multiplying means (2 1b ) connected to the said output of the said second holding means (5) for multiplying the said immediately-preceding measurement value (T n-1 ) by a third constant (A₃) to produce the said predetermined rear black frame reference value (A₃T n-1 ), and comparator means (6₁) for generating the said third detection signal if the said second (T n+1 ) of the said two consecutive measurement values is greater than or equal to that reference value (A₃T n-1 ). Bar code reading apparatus as claimed in claim 4, wherein: the said first detection means (2) comprise multiplying means (2₁) connected to the said output of the said second holding means (5) for multiplying the said immediately-preceding measurement value (T n-1 ) by a first constant (A₁) to produce the said predetermined normal rear margin reference value (A₁T n-1 ), and comparator means (2₂) for generating the said first detection signal if the said first (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₁T n-1 ); the said second detection means (4) comprise multiplying means (4₁) connected to the said output of the said second holding means (5) for multiplying the said immediately-preceding measurement value (T n-1 ) by a second constant (A₂) to produce the said predetermined minimum rear margin reference value (A₂T n-1 ), and comparator means (4₂) for generating the said second detection signal if the said first (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₂T n-1 ); and the said third detection means (6) are connected to the said multiplying means (2₁) of the said first detection means (2) for receiving therefrom the said normal rear margin reference value (A₁T n-1 ) and comprise comparator means (6₁) for generating the said third detection signal if the said second (T n+1 ) of the said two consecutive measurement values is greater than or equal to that reference value (A₁T n-1 ). Bar code reading apparatus for reading a bar code having a front margin area followed by a guard bar and a character bar, which apparatus comprises: scanning means (20, 21) for scanning such a bar code and for generating a pulse signal corresponding to the bar code; measuring means (1) connected to the said scanning means for receiving the said pulse signal and operable to employ that signal to produce a series of measurement values (...., T n-1 , T n , T n+1 , ...) corresponding to the pattern of bars across the bar code, each of which measurement values represents the combined width of two consecutive bars in the bar code, one of which bars is black and the other is white, the second of the bars of one measurement value being the first bar of the next measurement value in the series; and margin detection means (2, 3, 4, 5, 6, 28, 30) arranged for processing the said measurement values of the said series and operable to generate a margin detection signal either upon detecting that one of those values (T n ) is greater than or equal to a predetermined normal front margin reference value (for example 3.5 T n+1 ) or upon detecting that, for two consecutive measurement values (T n-1 , T n ) of the said series, the first (T n-1 ) of those two values is greater than or equal to a predetermined front black frame reference value (for example 3 T n+1 ) and the second (T n ) of those two values is greater than or equal to a predetermined minimum front margin reference value (for example 1.25 T n+1 ) that is less than the said normal front margin reference value. Bar code reading apparatus as claimed in claim 7, wherein the said front black frame reference value is equal to the said normal front margin reference value. Bar code reading apparatus as claimed in claim 7 or 8, wherein the said margin detection means (2, 3, 4, 5, 6, 28, 30) comprise: first detection means (2) connected operatively to the said measuring means (1) for receiving therefrom the said measurement values and operable to generate a first detection signal upon detecting that one of those values (T n ) is greater than or equal to the said predetermined normal front margin reference value (for example 3.5 T n+1 ); second detection means (4) also connected operatively to the said measuring means (1) for receiving therefrom the said measurement values and operable to generate a second detection signal upon detecting that one of those values (T n ) is greater than or equal to the said predetermined minimum front margin reference value (for example 1.25 T n+1 ); third detection means (6) also connected operatively to the said measuring means for receiving therefrom the said measurement values and operable to generate a third detection signal upon detecting that one of those values (T n-1 ) is greater than or equal to the said predetermined front black frame reference value (for example 3 T n+1 ); and logic means (28, 30) connected to the said first, second and third detection means (2, 4, 6) for receiving therefrom the said first, second and third detection signals and operable to generate the said margin detection signal either in response to the said first detection signal or in response to the said second detection signal in respect of the second (T n ) of the said two consecutive measurement values and the said third detection signal in respect of the first (T n-1 ) of those two values. Bar code reading apparatus as claimed in claim 9, wherein the said margin detection means (2, 3, 4, 5, 6, 28, 30) further comprise respective first and second holding means (3, 5), each having an input for receiving the said measurement values of the said series sequentially and operable to hold each new measurement value received at the said input, whilst delivering at an output thereof the measurement value previously received at the said input, until the next measurement value of the series is received at the said input; the said measuring means (1) being connected to the said input of the said first holding means (3), the said output of the first holding means (3) being connected to the said input of the said second holding means (5) and to the said first and second detection means (2, 4), and the said output of the said second holding means (5) being connected to the said third detection means (6), such that, when the measurement value (T n+1 ) that immediately follows the said second (T n ) of the said two consecutive measurement values is received at the said input of the said first holding means (3), that second value (T n ) is delivered from the said output of the first holding means (3) to the said first and second detection means (2, 4) and the first of those two values (T n-1 ) is delivered from the said output of the said second holding means (5) to the said third detection means (5), that immediately-following value (T n+1 ) being employed by the said margin detection means to set the said normal front margin, minimum front margin and front black frame reference values. Bar code reading apparatus as claimed in claim 10, wherein: the said first detection means (2) comprise multiplying means (2 3a ) connected to the said measuring means (1) for multiplying the said immediately-following measurement value (T n+1 ) by a first constant (A₁′) to produce the said predetermined normal front margin reference value (A₁′T n+1 ), and comparator means (2₄) for generating the said first detection signal if the said second (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₁′T n+1 ); the said second detection means (4) comprise multiplying means (4₃) connected to the said measuring means (1) for multiplying the said immediately-following measurement value (T n+1 ) by a second constant (A₂′) to produce the said predetermined minimum front margin reference value (A₂′T n+1 ), and comparator means (44) for generating the said second detection signal if the said second (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₂′T n+1 ); and the said third detection means (6) comprise multiplying means (2 3b ) connected to the said measuring means (1) for multiplying the said immediately-following measurement value (T n+1 ) by a third constant (A₃′) to produce the said predetermined front black frame reference value (A₃′T n+1 ), and comparator means (6₂) for generating the said third detection signal if the said first (T n-1 ) of the said two consecutive measurement values is greater than or equal to that reference value (A₃′T n+1 ). Bar code reading apparatus as claimed in claim 10, wherein: the said first detection means (2) comprise multiplying means (2₃) connected to the said measuring means (1) for multiplying the said immediately-following measurement value (T n+1 ) by a first constant (A₁′) to produce the said predetermined normal front margin reference value (A₁′T n+1 ), and comparator means (2₄) for generating the said first detection signal if the said second (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₁′T n+1 ); the said second detection means (4) comprise multiplying means (4₃) connected to the said measuring means (1) for multiplying the said immediately-following measurement value (T n+1 ) by a second constant (A₂) to produce the said predetermined minimum front margin reference value (A₂′T n+1 ), and comparator means (4₄) for generating the said second detection signal if the said second (T n ) of the said two consecutive measurement values is greater than or equal to that reference value (A₂′T n+1 ); and the said third detection means (6) are connected to the said multiplying means (2₃) of the said first detection means (2) for receiving therefrom the said normal front margin reference value (A₁′T n+1 ) and comprise comparator means (6₂) for generating the said third detection signal if the said first (T n-1 ) of the said two consecutive measurement values is greater than or equal to that reference value (A₁′T n+1 ). Bar code reading apparatus as claimed in any one of claims 5, 6, 11 and 12, wherein the said logic means comprise an AND gate (8, 28) having two inputs connected respectively to the said comparator means of the second and third detection means (4, 6) for receiving therefrom the said second and third detection signals and also having an output connected to one input of an OR gate (10, 30) the other input of which is connected to the said comparator means of the said first detection means (2) for receiving therefrom the said first detection signal, which OR gate generates at its output the said margin detection signal. Bar code reading apparatus as claimed in claim 1 or 2 for reading a bar code also having a front margin area followed by a guard bar and a character bar, wherein the said margin detection means (2, 3, 4, 5, 6, 8, 10, 28, 30) are also operable to generate the said margin detection signal either upon detecting that one of the said measurement values (T n ) is greater than or equal to a predetermined normal front margin reference value (for example 3.5 T n+1 ) or upon detecting that, for two consecutive measurement values (T n-1 , T n ) of the said series, the first (T n-1 ) of those two values is greater than or equal to a predetermined front black frame reference value (for example 3 T n+1 ) and the second (T n ) of those two values is greater than or equal to a predetermined minimum front margin reference value (for example 1.25 T n+1 ) that is less than the said normal front margin reference value. Bar code reading apparatus as claimed in claim 14, wherein the said predetermined front black frame reference value is equal to the said predetermined normal front margin reference value. Bar code reading apparatus as claimed in claim 14 or 15, wherein the said margin detection means (2, 3, 4, 5, 6, 8, 10, 28, 30, 32) comprise: respective first and second holding means (3, 5), each having an input for receiving the said measurement values of the said series sequentially and operable to hold each new measurement value received at the said input, whilst delivering at an output thereof the measurement value previously received at the said input, until the next measurement value of the series is received at the said input, the said measuring means (1) being connected to the said input of the said first holding means (3), and the said output of the first holding means (3) being connected to the said input of the said second holding means (5), such that, when the third (T n+1 ) of three consecutive measurement values is received at the said input of the said first holding means (3), the second (T n ) of those three values is delivered from the said output of the first holding means (3) and the first of those three values (T n-1 ) is delivered from the said output of the said second holding means (5); first multiplying means (2₁) connected to the said output of the said second holding means (5) for receiving therefrom the first (T n-1 ) of the said three consecutive measurement values and operable to multiply that first measurement value by a first constant (A₁) to produce the said predetermined normal rear margin reference value (A₁T n-1 ); first comparator means (2₂), connected to the said output of the said first holding means (3) for receiving therefrom the second (T n ) of the said three consecutive measurement values and also connected to the said first multiplying means (2₁) for receiving therefrom the said predetermined normal rear margin reference value (A₁T n-1 ), and operable to generate a first detection signal if that second measurement value is greater than or equal to that reference value (A₁T n-1 ) ; second multiplying means (4₁) connected to the said output of the said second holding means (5) for receiving therefrom the first (T n-1 ) of the said three consecutive measurement values and operable to multiply that first measurement value by a second constant (A₂) to produce the said predetermined minimum rear margin reference value (A₂T n-1 ); second comparator means (4₂), connected to the said output of the said first holding means (3) for receiving therefrom the second (T n ) of the said three consecutive measurement values and also connected to the said second multiplying means (4₁) for receiving therefrom the said predetermined minimum rear margin reference value (A₂T n-1 ), and operable to generate a second detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₂T n-1 ); third comparator means (6₁), connected to the said measuring means (1) for receiving therefrom the third (T n+1 ) of the said three consecutive measurement values and also connected to the said first multiplying means (21) for receiving therefrom the said predetermined normal rear margin reference value (A₁T n-1 ), and operable to generate a third detection signal if that third measurement value (T n+1 ) is greater than or equal to that reference value (A₁T n-1 ); third multiplying means (2₃) connected to the said measuring means (1) for receiving therefrom the said third (T n+1 ) of the said three consecutive measurement values and operable to multiply that third measurement value by a third constant (A₁′) to produce the said predetermined normal front margin reference value (A₁′T n+1 ); fourth comparator means (2₄), connected to the said output of the said first holding means (3) for receiving therefrom the said second (T n ) of the said three consecutive measurement values and also connected to the said third multiplying means (2₃) for receiving therefrom the said predetermined normal front margin reference value (A₁′T n+1 ), and operable to generate a fourth detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₁′T n+1 ); fourth multiplying means (4₃) connected to the said measuring means (1) for receiving therefrom the third (T n+1 ) of the said three consecutive measurement values and operable to multiply that third measurement value by a fourth constant (A₂′) to produce the said predetermined minimum front margin reference value (A₂′T n+1 ); fifth comparator means (4₄), connected to the output of the said first holding means (3) for receiving therefrom the second (T n ) of the said three consecutive measurement values and also connected to the said fourth multiplying means (4₃) for receiving therefrom the said predetermined minimum front margin reference value (A₂′T n+1 ), and operable to generate a fifth detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₂′T n+1 ); sixth comparator means (6₂), connected to the said output of the said second holding means (5) for receiving therefrom the said first (T n-1 ) of the said three consecutive measurement values and also connected to the said third multiplying means (2₃) for receiving therefrom the said predetermined normal front margin reference value (A₁′T n+1 ), and operable to generate a sixth detection signal if that first measurement value (T n-1 ) is greater than or equal to that reference value (A₁′T n+1 ); and logic means (8, 10, 28, 30, 32) connected to the said first to sixth comparator means for receiving therefrom the said first to sixth detection signals and operable to generate the said margin detection signal in response to the said first detection signal, or to the said fourth detection signal, or to the said second and third detection signals, or to the said fifth and sixth detection signals. Bar code reading apparatus as claimed in claim 14 or 15, wherein the said margin detection means (2, 3, 4, 5, 6, 8, 10, 28, 30, 32) comprise: respective first and second holding means (3, 5), each having an input for receiving the said measurement values of the said series sequentially and operable to hold each new measurement value received at the said input, whilst delivering at an output thereof the measurement value previously received at the said input, until the next measurement value of the series is received at the said input, the said measuring means (1) being connected to the said input of the said first holding means (3), and the said output of the first holding means (3) being connected to the said input of the said second holding means (5), such that, when the third (T n+1 ) of three consecutive measurement values is received at the said input of the said first holding means (3), the second (T n ) of those three values is delivered from the said output of the first holding means (3) and the first of those three values (T n-1 ) is delivered from the said output of the said second holding means (5); first multiplying means (2 1a ) connected to the said output of the said second holding means (5) for receiving therefrom the first (T n-1 ) of the said three consecutive measurement values and operable to multiply that first measurement value by a first constant (A₁) to produce the said predetermined normal rear margin reference value (A₁T n-1 ); first comparator means (2₂), connected to the said output of the said first holding means (3) for receiving therefrom the second (T n ) of the said three consecutive measurement values and also connected to the said first multiplying means (2 1a ) for receiving therefrom the said predetermined normal rear margin reference value (A₁T n-1 ), and operable to generate a first detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₁T n-1 ); second multiplying means (4₁) connected to the said output of the said second holding means (5) for receiving therefrom the first (T n-1 ) of the said three consecutive measurement values and operable to multiply that first measurement value by a second constant (A₂) to produce the said predetermined minimum rear margin reference value (A₂T n-1 ); second comparator means (4₂), connected to the said output of the said first holding means (3) for receiving therefrom the second (T n ) of the said three consecutive measurement values and also connected to the said second multiplying means (4₁) for receiving therefrom the said predetermined minimum rear margin reference value (A₂T n-1 ), and operable to generate a second detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₂T n-1 ); third multiplying means (2 1b ) connected to the said output of the said second holding means (5) for receiving therefrom the first (T n-1 ) of the said three consecutive measurement values and operable to multiply that first measurement value by a third constant (A₃) to produce the said predetermined rear black frame reference value (A₃T n-1 ); third comparator means (6₁), connected to the said measuring means (1) for receiving therefrom the third (T n+1 ) of the said three consecutive measurement values and also connected to the said third multiplying means (2 1b ) for receiving therefrom the said predetermined rear black frame reference value (A₃T n-1 ), and operable to generate a third detection signal if that third measurement value (T n+1 ) is greater than or equal to that reference value (A₃T n-1 ); fourth multiplying means (2 3a ) connected to the said output of the said measuring means (1) for receiving therefrom the said third (T n+1 ) of the said three consecutive measurement values and operable to multiply that third measurement value by a fourth constant (A₁′) to produce the said predetermined normal front margin reference value (A₁′T n+1 ); fourth comparator means (2₄), connected to the said output of the said first holding means (3) for receiving therefrom the said second (T n ) of the said three consecutive measurement values and also connected to the said fourth multiplying means (2 3a ) for receiving therefrom the said predetermined normal front margin reference value (A₁′T n+1 ), and operable to generate a fourth detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₁′T n+1 ); fifth multiplying means (4₃) connected to the said measuring means (1) for receiving therefrom the third (T n+1 ) of the said three consecutive measurement values and operable to multiply that third measurement value by a fifth constant (A₂′) to produce the said predetermined minimum front margin reference value (A₂′T n+1 ); fifth comparator means (4₄), connected to the output of the said first holding means (3) for receiving therefrom the second (T n ) of the said three consecutive values and also connected to the said fifth multiplying means (4₃) for receiving therefrom the said predetermined minimum front margin reference value (A 2′ T n+1 ), and operable to generate a fifth detection signal if that second measurement value (T n ) is greater than or equal to that reference value (A₂′T n+1 ); sixth multiplying means (2 3b ) connected to the said measuring means (1) for receiving therefrom the said third (T n+1 ) of the said three consecutive measurement values and operable to multiply that third measurement value by a sixth constant (A₃′) to produce the said predetermined front black frame reference value (A₃′T n+1 ); sixth comparator means (6₂), connected to the said output of the said second holding means (5) for receiving therefrom the said first (T n-1 ) of the said three consecutive measurement values and also connected to the said sixth multiplying means (2 3b ) for receiving therefrom the said predetermined front black frame reference value (A₃′T n+1 ), and operable to generate a sixth detection signal if that first measurement value (T n-1 ) is greater than or equal to that reference value (A₃′T n+1 ); and logic means (8, 10, 28, 30, 32) connected to the said first to sixth comparator means for receiving therefrom the said first to sixth detection signals and operable to generate the said margin detection signal in response to the said first detection signal, or to the said fourth detection signal, or to the said second and third detection signals, or to the said fifth and sixth detection signals. Bar code reading apparatus as claimed in claim 16 or 17, wherein the said logic means comprise: a first AND gate (8) having two inputs connected respectively for receiving the said second and third detection signals and also having an output connected to one input of a first OR gate (10) the other input of which is connected for receiving the said first detection signal; a second AND gate (28) having two inputs connected respectively for receiving the said fifth and sixth detection signals and also having an output connected to one input of a second OR gate (30) the other input of which is connected for receiving the said fourth detection signal; and a third OR gate (32) having two inputs connected respectively to the respective outputs of the said first and second OR gates (10, 30), which third OR gate generates at its output the said margin detection signal.

Inventors: SATO SHINICHI, SATO, SHINICHI
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1990
Main classification: G06K7
IPC codes: G06K7