Abstract:
The present invention provides a method of encoding a barcode, in which the barcode is scanned at multiple scanning lines along plural length portions to determine potential locations where the bars probably exist. For each potential length, data obtained at all the scanning lines is synthesized to determine the validity of the location. The plural length portions are then combined to ascertain the information.

Description:
FIELD OF THE INVENTION  
       [0001]     This invention relates to techniques of decoding barcodes, and more particularly, to a method of decoding a 1-D barcode in which the barcode is scanned at multiple scanning lines so as to read and decode barcodes of low quality, poor readability and/or having one or more defects by potentially using information from different horizontal portions of different scan lines to piece the together the equivalent of a single scan line.  
       BACKGROUND OF THE INVENTION  
       [0002]     1-D barcodes are universally used to provide information in a machine-readable format, such as the well-known Universal Product Code (UPC) strip on a product package. A 1-D barcode is usually formed by bars and spaces arranged in parallel along a length of the barcode, and the encoded information is represented by the arrangement of the bars and the spaces, and in particular, by the locations along the length of the barcode where the bars exist. To read the barcode, the varying widths of the bars, and the spaces between the bars, are measured and interpreted to extract the data.  
         [0003]     However, the barcode is difficult to correctly read when the barcode is defective or not clear. For example, as shown in  FIG. 1 ( a ), if a defect in the form of a tilted line  11  runs across the bars  1 , the point  12  where the tilted line  11  meets with the scanning line  2  may be improperly taken by the scanner as a location where a bar exists. In  FIG. 2 ( a ), some of the bars  1   a  in the barcode  10  are broken or are not clear enough, and will be erroneously read as spaces by the scanner if the scanning line  2  runs through the missing or unclear portions of the defective bars  1   a . Additionally, if the barcode is beneath an uneven transparent covering material such as a plastic wrapper, the barcode may not be correctly read.  
         [0004]     Therefore, there exists a need to improve the reliability in reading a barcode, especially when the barcode is defective or has poor readability.  
       SUMMARY OF THE INVENTION  
       [0005]     The present invention provides a method of encoding a barcode in which the barcode is scanned along multiple scanning lines along a length of the barcode to determine potential locations where the bars probably exist. For each potential location, data obtained at all the scanning lines are analyzed in combination to determine the validity of the location. Thus, the defective barcode with poor readability can still be correctly read since most of the scanning lines may run across the good portions of the defective bars.  
         [0006]     In a preferred embodiment, the barcode is scanned by an image area reader or area scanner. Preferably, there are at least three scanning lines, and for each potential location found by the scanning, the majority of the data obtained at all the scanning lines determines the data. Then, the determination at each location is used in combination with the determination at other locations to fully decode the information. In other enhanced embodiments, other combinations in addition to a “majority rules” decision may be utilized.  
     
    
     DESCRIPTION OF THE DRAWINGS  
       [0007]     The above and other advantages and features of the present invention will be clearer after reading the detailed description of preferred embodiments of the present invention with reference to the accompanying drawings in which:  
         [0008]     FIGS.  1 ( a ) and  1 ( b ) illustrate the problems existing with the conventional methods in reading defective barcode symbols; and  
         [0009]     FIGS.  2 ( a ) and  2 ( b ) illustrate that the method of the present invention solves the problems in FIGS.  1 ( a ) and  1 ( b ). 
     
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS  
       [0010]     According to the present invention, the barcode is scanned along multiple scanning lines instead of using only one single scanning line in the conventional method. Preferably, the scanning lines are generally parallel to each other. In an embodiment as illustrated in FIGS.  2 ( a ) and  2 ( b ), the barcode  10  is scanned along three scanning lines  2 ,  3  and  4 . Obviously, more scanning lines can be used to increase the reliability. This can be done by means of an image area reader or area scanner. The barcode  10  can be scanned at the multiple scanning lines  2 , 3 ,  4  simultaneously or can be scanned line by line.  
         [0011]     As shown in  FIG. 2 ( a ), which corresponds to  FIG. 1 ( a ) where a tilted line  11  runs across the barcode  10 , with the three scanning lines  2 ,  3  and  4  used according to the present invention, the tilted line  11  meets with the scanning lines  2 ,  3  and  4  at points  12 ,  13  and  14  respectively. Thus, from the reading result of the scanning, a bar may exist at each of the locations corresponding to points  12 ,  13  and  14 , which would be a final conclusion in the prior art if only a single scanning line is used.  
         [0012]     However, according to the method of the present invention, for each of the above potential locations determined by the points  12 ,  13  and  14 , the data obtained in all the three scanning lines  2 ,  3  and  4  are combined to determine the actual presence of the bars at these locations according to a predetermined technique. In a preferred embodiment, majority decision rule is adopted to ascertain the information at the location. More specifically, with respect to a specific location, if the majority of the scanning lines indicate that there is a bar, the location is determined to contain a bar, while if more scanning lines indicate that there is no bar, the location is determined to not contain a bar.  
         [0013]     For example, as to the location corresponding to point  12 , the data obtained at scanning lines  3  and  4  shows that there is no bar found at points  12   a  and  12   b  corresponding to the location. Similarly, as to the location corresponding to point  14 , the data obtained at the scanning lines  2  and  3  indicates that there is no bar at corresponding points  14   a  and  14   b . According to the majority decision rule, the locations corresponding to points  12  and  14  are determined invalid and there is no bar running across the points  12  and  14 .  
         [0014]     As to point  13  where the scanning line  13  happens to meet with a bar  1 , the data obtained at other two scanning lines  2  and  4  also indicates that a bar may exist at the location corresponding to the point  13 . Thus, the location corresponding to point  13  is validated, and there is a bar existing at the location corresponding to point  13  and running through point  13 . For all other bars  1 , the data read at all three scanning lines  2 ,  3  and  4  is the same, and the locations where the bars  1  exist can be thus determined. When scanning is complete, the information can be compiled from piecing together the information gathered at each location using the foregoing technique. After all the locations are determined, the barcode is decoded according to the techniques well-known in the art.  
         [0015]     It is also notable that other techniques of combining the plural scanning lines in addition to a “majority rules” decision may be utilized. For example, the system could require that at least four out of five show the presence of the bar. Or, the system could combine the light levels received when reading all of the bars and determine the presence of a bar if and when the combined signals from all the scanning lines exceed a predetermined threshold. Therefore, with the teaching of the present invention, the tilted line  11  or other imperfections do not result in an incorrect interpretation of the data.  
         [0016]      FIG. 2 ( b ) illustrates the situation similar to  FIG. 1 ( b ) where some of the bars are not clear or are partially missing. For example, the middle portion of bar  1   a  is missing, and the scanning line  2  runs through the missing middle portion of bar  1   a . In the prior art as shown in  FIG. 1 ( b ), bar  1   a  will be found not existing. However, according to the teachings of the present invention, two other scanning lines  3  and  4  run across the good portions of bar  1   a , and the data obtained at the meeting points  31   a  and  41   a  indicates that there may exist a bar at the location corresponding to the points  31   a  and  41   a . Even though the data read at scanning line  2  shows that there is no bar existing at such location, according to the majority decision rule, the location is deemed to contain a valid bar since more scanning lines show that there is a bar at the location.  
         [0017]     Similarly, defective bar  1   b  can be determined to be there from the data obtained at the scanning lines  2  and  4  even though the scanning line  3  does not detect bar  1   b . Thus, the location corresponding to the meeting points  21   b  and  41   b  is validated by the fact that more scanning lines ( 2  and  4 ) show that there is a bar.  
         [0018]     Though the preferred embodiments of the invention have been described above in detail, it is understood that adaptations and modifications are possible to a person of ordinary skill in the art without departing from the spirit and scope of the invention. For example, the 1-D barcode may be a constituent part of a stacked barcode, and a variety of one and two dimensional barcodes may be utilized. Instead of the majority decision rule, an average calculation of the data obtained at a specific location by all the scanning lines may be used. Thus, the scope of the present invention is solely defined by the accompanying claims.