1) Field of the Invention
The present invention relates to a barcode reader that reads a barcode (characters) based on light reflected from the barcode (binary information) in which characters are expressed by bar width by using a difference in reflectance of light, a method of reading barcode, a computer program for reading barcode and a module-point extracting unit, and more particularly, to a barcode reader that enables to improve a processing speed, a method of reading barcode, a computer program for reading barcode, and a module-point extracting apparatus.
2) Description of the Related Art
Conventionally, in a field of distribution of products, a barcode that is provided on a product is read optically and information related to the product such as a price and a name of the product is recorded in a register.
In a barcode, information related to a product is encoded as characters and is combined as alternate black and white bars. In a barcode reader, beam light that is emitted from a laser diode is made to scan the barcode, reflected light of the beam is received, and barcode information is read from an electric signal corresponding to width of black bars and white bars.
In this case, the barcode is printed on various media such as an organic material, a can, and mainly a paper.
The barcode reader 20 is a reader that reads a barcode 10 optically. In the barcode reader 20 shown in
A polygon mirror 22 is formed by a mirror that causes the light beam L from the laser diode 21 to reflect, and is rotated by a motor (omitted in the diagram), and imparts scanning patterns of a plurality of types by changing a direction of reflection of the light beam L.
The light beam L that is reflected by the polygon mirror 22 is irradiated by a reading window 20b that is provided on a housing 20a shown in
An analog/digital (A/D) converter 25 performs digital sampling of an analog signal that is subjected to photoelectric conversion, which is amplified by the amplifier 24, and outputs as a digital signal that is subjected to photoelectric conversion. An extractor 26, to reduce a signal processing in a latter stage, extracts from the signal that is subjected to photoelectric conversion from the A/D converter 25, only a signal that is reflected from the barcode 10.
A band-limiting differentiator 27, by using module frequency 2f0 that is extracted by a module-frequency extractor 28, which is mentioned later, performs a differentiation process for limiting a band of an output signal of the extractor 26, and outputs a narrow-band differential signal S1 of a waveform pattern shown in
Thus, the narrow-band differential signal S1 has a waveform such that at a point of switching from the black bar to the white bar, an amplitude is converged to the maximum value, at a point of switching from the white bar to the black bar, the amplitude is converged to the minimum value, and at a flat portion of the black bar and the white bar, the amplitude is converged to zero.
The module-frequency extractor 28 performs processes such as a differentiation process and a squaring process on the output signal of the extractor 26, obtains a frequency spectrum 61 shown in
The amplitude extractor 29 for each module point shown in FIG. 22 with the narrow-band differential signal S1 and the module frequency 2f0 as input, is provided with a function of extracting a module point corresponding to a boundary of the black bar and the white bar and a function of extracting an amplitude value of the narrow-band differential signal S1, and outputs a ternarized pattern S2 (see
The gain characteristic 60 is for determining filtering of a band pass in a band pass filter (BPF) 32 that is mentioned later and is expressed by parameters such as a module frequency error Δf, a bandwidth fw, and a roll-off factor ROF. These parameters are important values that control an accuracy of barcode reading.
The module frequency error Δf is equivalent to an error in the module frequency 2f0 that is mentioned above. Therefore, a mean frequency of the gain characteristic (bandwidth fw) becomes the module frequency 2f0+ the module frequency error Δf.
Referring back to
The BPF 32, based on the filter coefficient corresponding to the gain characteristic 60 shown in
In
Thus, the Hilbert converter 33 is a converter that performs Hilbert conversion of an output signal of the BPF 32 and is provided with a function of vectorizing a signal of each sample point.
Practically, the BPF 32 is a digital filter in which the gain characteristic is set by setting a tap coefficient.
A phase calculating unit 34 calculates a phase of a vector signal that is input. A zero-degree point extractor 36 extracts a point for which a phase becomes 0° by an output of the phase calculating unit, as a sample point. A phase integrator 35 integrates in units of samples the phase that is calculated by the phase calculating unit 34.
A delay-time calculating unit 37 calculates a delay time between the sample point and a point that becomes 0° in
The delay filter 39 performs delaying process on the narrow-band differential signal S1 based on the delay filter coefficient, is a filter for causing the sample point to coincide with a zero-degree timing point, and outputs a waveform pattern shown in
A least mean square (LMS) unit 40 performs an equalization process on an output signal from the delay filter 39 by a method of least squares, and outputs a signal of a waveform pattern shown in
A ternary processor 41, based on a comparison of amplitude and a threshold value, ternarizes an output of the LMS unit 40 (see
For example, the ternarized pattern of the circled portions shown in
This character pattern is transmitted as a reading result to a host computer 50 by an I/F unit 43 (see
However, in the conventional barcode reader 20, since the filter coefficient that is to be set in the BPF 32 shown in
Moreover, in the conventional barcode reader 20, for filtering a signal of a narrow-band called as the narrow-band differential signal, the number of taps (for example, 127) of the BPF 32 becomes large and the number of the processing steps increases, thereby leading to a problem of the processing speed becoming slow.
Moreover, in the conventional barcode reader 20, for performing the Hilbert conversion in the Hilbert converter 33 for generating a Hilbert signal, due to a large number of processing steps in this case as well, there has been a problem of leading to the fall in the processing speed.
In
According to
It is an object of the present invention to solve at least the above problems in the conventional technology.
A barcode reader according to one aspect of the present invention includes a signal fetching unit that fetches a signal that includes binarized information disposed with a predetermined information length, from a barcode; a module-frequency extracting unit that extracts a module frequency equivalent to a basic unit length in the binarized information, from the signal; a frequency shifting unit that shifts a frequency to 0 Hertz based on the module frequency, for the signal; a low pass filter that passes a low frequency component included in an output signal from the frequency shifting unit; a module-point extracting unit that extracts a module point that is synchronized with the signal and that has the module frequency, based on the module frequency extracted and an output signal of the low pass filter; and a demodulating unit that demodulates a character of the barcode based on the module point extracted.
A method of reading a barcode according to another aspect of the present invention includes fetching a signal that includes binarized information disposed with a predetermined information length, from a barcode; extracting a module frequency equivalent to a basic unit length in the binarized information, from the signal; shifting a frequency to 0 Hertz based on the module frequency, for the signal; passing a low frequency component included in an output signal at the shifting; extracting a module point that is synchronized with the signal and that has the module frequency, based on the module frequency extracted and an output signal at the passing; and demodulating a character of the barcode based on the module point extracted.
A computer-readable recording medium according to still another aspect of the present invention stores a computer program that causes a computer to execute the above method according to the present invention.
A module-point extracting apparatus according to still another aspect of the present invention includes a signal fetching unit that fetches a signal that includes binarized information disposed with a predetermined information length, from a barcode; a module-frequency extracting unit that extracts a module frequency equivalent to a basic unit length in the binarized information, from the signal; a frequency shifting unit that shifts a frequency to 0 Hertz based on the module frequency, for the signal; a low pass filter that passes a low frequency component included in an output signal from the frequency shifting unit; and a module-point extracting unit that extracts a module point that is synchronized with the signal and that has the module frequency, based on the module frequency extracted and an output signal of the low pass filter.
The other objects, features, and advantages of the present invention are specifically set forth in or will become apparent from the following detailed description of the invention when read in conjunction with the accompanying drawings.
Exemplary embodiments of a barcode reader, a method of reading barcode, a computer program for reading barcode, and a module-point extracting unit according to the present invention is described below in detail with reference to the accompanying drawings.
The amplitude extractor 101 for each module point, similarly as the amplitude extractor 29 for each module point (see
However, the amplitude extractor 101 for each module point, as shown in
In the amplitude extractor 101 for each module point shown in
Referring back to
However, practically, since there is a noise included in the module frequency 2f0 that is extracted by a module-frequency extractor 28, it is difficult to make the peak value 121a to be exactly 0 Hz. Therefore, the frequency of the peak value 121a becomes a module frequency 2f0′ that includes a module-frequency error Δf (2f0–2f0′).
Moreover, at the frequency shifting unit 103, since there is a shift in a frequency of a scalar amount of the squared signal S3, an output signal is vectorized (real part Re and imaginary part Im) as shown in
The multiplier 103a multiplies the squared signal S3 by cos θ and lets it to be a real part Re. On the other hand, the multiplier 103b multiplies the squared signal S3 by −sin θ and lets it to be an imaginary part Im. Thus, an output signal of the frequency shifting unit 103 is vectorized by the real part Re and the imaginary part Im.
Here, θ in cos θ and −sin θ is calculated from the module frequency 2f0. For example, if the frequency shifting unit 103 operates at a sampling rate of 2.5 MHz and if the module frequency 2f0 is 0.8 MHz, the frequency is shifted by −0.8 MHz.
In this case, θ rotates for each −115.2° (=(−0.8 MHz/2.5 MHz)×360°) at one sample unit. Therefore, at the frequency shifting unit 103, based on θ shown in
A broad-band low pass filter (LPF) is a filter that allows from the output signal (the frequency spectrum 121: see
According to the present embodiment, since the squared signal S3 (frequency spectrum 121) is shifted near 0 Hz in the frequency shifting unit 103, a low pass filter (broad-band LPF 104) that allows only the low frequency component to pass, may be suitable.
Moreover, the gain characteristic 122 of the broad-band LPF 104 is a broad band as compared to a gain characteristic 124 of a narrow-band LPF 111 (see
Practically, the broad-band LPF 104, as shown in
Moreover, a decimation factor (for example, ¼) is set in advance in the broad-band LPF 104. The decimation factor is a proportion that thins out a throughput. Therefore, when the decimation factor is ¼, the throughput is ¼.
Referring back to
For example, when the module-frequency error Δf (2f0–2f0′) is −10 kHz, the sampling rate is 2.5 MHz, the phase is calculated as −1.44° ((−10 kHz/2.5 MHz)×360°).
A phase integrator 106, as shown in
For example, when the number of samplings is 100 and the result of integration is −145°, an angle per sampling is −1.45° (−145/100). When this angle is converted to frequency, the module-frequency error Δf becomes −10.06944 . . . Hz ((−1.45°/360°)×2.5 MHz).
An adder 108, adds the module frequency 2f0 (since the error is included, hereinafter, “module frequency 2f0′”) from the module-frequency extractor 28 (see
A squaring processor 109 performs a squaring process on the narrow-band differential signal S1 shown in
A frequency shifting unit 110, as shown in
Moreover, in the frequency shifting unit 110, since a scalar quantity of the squared signal S4 is subjected to the shift in frequency, an output signal is vectorized.
The narrow-band LPF 111 is a filter that allows from the output signal (the frequency spectrum 124: see
According to the present embodiment, since the squared signal S4 (frequency spectrum 124) is shifted to almost 0 Hz (low) in the frequency shifting unit 110, a low pass filter (narrow-band LPF 111) that allows only the low frequency component to pass, may be suitable.
Moreover, the gain characteristic 125 of the narrow-band LPF 111 (
This is because there is almost no fluctuation due to the module-frequency error Δf as an accurate module-frequency error Δf is calculated at the Δf calculating unit 107 and the peak value of the frequency spectrum 124 (squared signal S4) after the shift in frequency is let to be almost 0 Hz.
Practically, the narrow-band LPF 111, as shown in
Moreover, a decimation factor (for example, ⅛) is set in advance in the narrow-band LPF 111 similarly as in the broad-band LPF 104. The decimation factor is a proportion that thins out the throughput. Therefore, when the decimation factor is ⅛, the throughput is ⅛.
Here, the decimation factor of the narrow-band LPF 111, as compared to that of the broad-band LPF 140, can be set to be lower since the band is narrow.
Referring back to
A phase integrator 113, similarly as the phase integrator 106, integrates in units of samples the phase that is calculated by the phase calculating unit 112 as shown in
A zero-degree point extractor 114, as shown in
In an example shown in
A delay-time calculating unit 115, similarly as a delay-time calculating unit 37 (see
A delay-filter-coefficient calculating unit 116, based on the delay time calculated by the delay-time calculating unit 115, calculates a delay filter coefficient and sets it in a delay filter 39.
Next, an operation according to the present embodiment is described. In
By this, the module-frequency extractor 28 performs a differentiation process and a squaring process on an output signal of the extractor 26, a frequency spectrum is obtained by an FFT process on a differentiated and squared signal, and frequency of a gain peak of this frequency spectrum is calculated as a module frequency 2f0 that is equivalent to a basic module of the barcode.
Moreover, the band-limiting differentiator 27, by using the module frequency 2f0 mentioned above, performs a differentiation process for limiting a band of the output signal of the extractor 26 and outputs the narrow-band differential signal S1 (see
The squaring processor 102 performs the squaring process on the narrow-band differential signal S1 shown in
However, since there is an error that is mentioned above, the frequency of the peak value 121a shown in
Next, the broad-band LPF 104 allows from the frequency spectrum 121 shown in
Further, the phase calculating unit 105 calculates the phase of the output (vector signal) of the broad-band LPF 104. The phase integrator 106, as shown in
Further, the Δf calculating unit 107 calculates the module-frequency error Δf (2f0–2f0′) from the result of the integration by the phase integrator 106.
By this, the adder 108 calculates the module frequency 2f0′ from the module-frequency extractor 28 (see
The squaring processor 109 performs the squaring process on the narrow-band differential signal S1 shown in
Next, the frequency shifting unit 110, as shown in
Further, the narrow band LPF 111 allows from the frequency spectrum 124 shown in
Next, the phase calculating unit 112 calculates the phase of (−180° to +180°) of the output (vector signal) of the narrow-band LPF 111, and the phase integrator 113 integrates in units of samples the phase that is calculated by the phase calculating unit 112.
Further, the zero-degree point extractor 114, as shown in
Next, the delay-time calculating unit 115, similarly as the delay-time calculating unit 37 (see
Further, the delay-filter-coefficient calculating unit 116, based on the delay time calculated by the delay-time calculating unit 115, calculates the delay filter coefficient and sets it in the delay filter 39.
Next, the delay filter 39, based on the delay filter coefficient corresponding to the delay time, performs a delaying process on the narrow-band differential signal S1, allows the sample point 0° to coincide with the timing point (see
By doing so, the LMS unit 40 performs an equalization process on an output signal from the delay filter 39 by a method of least squares. A ternary processor 41, based on a comparison of amplitude and a threshold value, ternarizes an output of the LMS unit 40 (see
The character demodulator 42, based on the ternarized pattern, demodulates a character pattern (character string) of the barcode shown in
As described above, according to the present embodiment, regarding the squared signal S4 corresponding to the barcode 10, since in the frequency shifting unit 110, the low frequency component that is included in the output signal with the frequency shifted to 0 Hz based on the module frequency, is allowed to pass by the narrow-band LPF 111, based on the module frequency that is let to be extracted and the output signal from narrow-band LPF 111, a module point that is synchronized with the squared signal S4 (narrow-band differential signal S1) and that has a module frequency is let to be extracted, and the character of the barcode 10 is let to be demodulated, as compared to a configuration in which a conventional BPF 32 (see
Moreover, according to the present embodiment, since the broad-band LPF 104 and the narrow-band LPF 111 are let to be digital filters and the decimation for thinning out the throughput is let to be set, the processing speed can be improved further.
Moreover, according to the present embodiment, since the module-frequency error Δf is let to be calculated by the squaring processor 102, the frequency shifting unit 103, the broad-band LPF 104, the phase calculating unit 105, the phase integrator 106, and the Δf calculating unit, and the error is let to be corrected while the frequency is shifted in the frequency shifting unit 110, it is possible to improve accuracy of reading of the barcode 10.
Furthermore, according to the present embodiment, since the output signal that is vectorized by the frequency shifting unit 103 and the frequency shifting unit 110 is let to be generated, as compared to a case of a conventional Hilbert converter 33 (see
In
According to
Although the present embodiment has been described above by referring to the diagrams, a concrete example of configuration is not restricted to the present embodiment and a design modification etc. within a scope that is not deviated from the basic idea of the present invention is included in the present invention.
For example, according to the present embodiment, a program for realizing the function of the barcode reader 100 mentioned above may be recorded in a computer readable recording medium 300 shown in
The computer 200 includes a central processing unit (CPU) 210 that runs the abovementioned program, an input device 220 such as a keyboard and a mouse, a read only memory (ROM) 230 that stores various types of data, a random access memory (RAM) 240, a reading device 250 that reads the program from the recording medium 300, an output device 260 such as a display and a printer, and a bus 270 that connects each component of the apparatus.
The CPU 210, run the program after reading the program that is recorded in the recording medium 300 via the reading unit 250, thereby realizing each of the functions mentioned above. An optical disc, a flexible disc, and a hard disc etc. are examples of the recording medium 300.
As described above, according to the present invention, regarding a signal corresponding to a barcode, since a low frequency component that is included in an output signal with a frequency shifted to 0 Hz based on a module frequency, is allowed to pass, based on a module frequency that is let to be extracted and an output signal of a low pass filter, a module point that is synchronized with the signal and that has a module frequency, is let to be extracted, and a character of the barcode is let to be demodulated, as compared to a configuration in which a conventional band pass filter etc. is used, an effect of reduction in throughput and an improvement in a processing speed is achieved.
Furthermore, according to the present invention, since a low pass filter is let to be a digital filter and a decimation to thin out the throughput is set, an effect of a further improvement in the processing speed is achieved.
Moreover, according to the present invention, since an error in module frequency is let to be calculated and the error is let to be corrected while the frequency is shifted, an effect of an improvement in accuracy of reading of the barcode is achieved.
Furthermore, according to the present invention, an output signal that is vectorized by the frequency shift is let to be generated, an effect of the reduction in the throughput and the improvement in the processing speed as compared to a case of a conventional Hilbert conversion, is achieved.
Moreover, according to the present invention, regarding the signal corresponding to the barcode, since the low frequency component that is included in the output signal with the frequency shifted to 0 Hz based on the module frequency, is allowed to pass, based on the module frequency that is let to be extracted and the output signal of the low pass filter, the module point that is synchronized with the signal and that has a module frequency, is let to be extracted, as compared to the configuration in which the conventional band pass filter etc. is used, the effect of reduction in the throughput and the improvement in the processing speed is achieved.
Although the invention has been described with respect to a specific embodiment for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth.
This application is a continuing application, filed under 35 U.S.C. §111(a), of International Application PCT/JP02/08760 filed Aug. 29, 2002.
Number | Name | Date | Kind |
---|---|---|---|
6176422 | Hattori | Jan 2001 | B1 |
20030148775 | Spriestersbach et al. | Aug 2003 | A1 |
20040164160 | Miyazawa et al. | Aug 2004 | A1 |
20040164162 | Watanabe et al. | Aug 2004 | A1 |
20050046584 | Breed | Mar 2005 | A1 |
20050141760 | Floeder et al. | Jun 2005 | A1 |
Number | Date | Country |
---|---|---|
3-6748 | Jan 1991 | JP |
9-34981 | Feb 1997 | JP |
10-271177 | Oct 1998 | JP |
Number | Date | Country | |
---|---|---|---|
20050139676 A1 | Jun 2005 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP02/08760 | Aug 2002 | US |
Child | 11067342 | US |