GB2388230A - A method for locating and reading a barcode - Google Patents
A method for locating and reading a barcode Download PDFInfo
- Publication number
- GB2388230A GB2388230A GB0306743A GB0306743A GB2388230A GB 2388230 A GB2388230 A GB 2388230A GB 0306743 A GB0306743 A GB 0306743A GB 0306743 A GB0306743 A GB 0306743A GB 2388230 A GB2388230 A GB 2388230A
- Authority
- GB
- United Kingdom
- Prior art keywords
- bitmap
- region
- pixels
- representation
- dimensional barcode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1443—Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Electromagnetism (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
Two-dimensional barcodes surrounded by a quiet zone of white space which may or may not include a border, each barcode having encoded digital information in a bitmap representing preferably randomized encoded data bits, are printed onto a medium. To extract the encoded digital information from the printed medium, if is scanned, then the bitmap is located within the printed medium by moving a window, in stepwise fashion in a predetermined pattern across the printed medium. At each step the portion of the printed medium which is encompassed by the window is tested to determine whether it conforms to one or more characteristics of the bitmap. The skew of the bitmap, if any, is determined, by using a finite-state recognizer in combination with a Hough Transform calculation. The candidate region is divided into a plurality of horizontal regions, preliminary skew angles are calculated for each region, and the actual skew angle is selected using a voting scheme. Once the skew angle is calculated, the bitmap is deskewed if necessary, cropped, and the randomized digital information is read from the bitmap. Finally, the digital information is derandomized and any error correction codes are removed, in the process correcting and/or recording any errors discovered, thereby reproducing the original encoded digital information.
Description
1 - A METHOD FOR LOCATING AND
READING.\ O-DIMENSIONAL BARCODE
5 The invention relates generally to an improved method for locating and reading two-dimensional barcodes printed within an image.
Contrary to the frequent predictions that we Still one day live in a "paperless society,', paper, and other printed meciiums, are playing an increasingly important role 10 as an inexpensive, effective and convenient means for communication. A fundamental limitation with paper, however, is that prowl a computer standpoint, it is currently an output- only format. While paper may be the preferred medium for displaying information for human use, it is difficult, i,- not impossible, for a computer to recover data reliably once it has been printed. Op-ica! character recognition LOCAL) attempts to 15 solve this problem in a relatively simple ciormain, such as text rendered using standard fonts, but has met with only limited success thus far. While accuracy rates of nine-nine (99%) percent are perhaps achievable and may seem impressive, a page with 3,000 characters will still incur an average of thirty (30) OCR errors and hence requires ... expensive and time consuming manual post- processng.
20 Another approach uses computer readable barcodes which may be included directly on paper (or other printed medium such as microfilm). Once encoded, such barcodes can be used by the computer to recover information evident to the human reader but difficult for a computer to recognize (e. g., printed text), information implicit
f to the creation of page but essentially invisible to the human reader (e.g., spreadsheet formu' es), or any other information desired, whether or not dependent on the actual character text on the paper.
Computer readable barcodes, wherein digital data is recorded directly on paper, 5 are known and have been utilized to provide document or product identification given a fixed set of values using simple numeric encoding and scanning technologies.
Document or product identification systems which have been employed in the past include barcode markers and scanners which have found use in a wide range of arenas.
With respect to paper documents, special marks or patterns in the paper have been used 10 to provide information to a related piece of equipment, for example the joD control sheet for image processing as taught by Hikawa in U.S. Patent No.,01779. Similarly, identifying marks comprising encoded information have beer printed on the face of preprinted forms as described in U.S. Patent No. 5,060,980 tO Johnson, et al. The Johnson, et al. system provides for a user entering hand drawn information in the fields
15 on a paper copy of the form and then scanning the form to provide insertions to We fields in the duplicate form that is stored electronically in the computer. Still another
system is described in U.S. Patent No. 5,091,966 of Bloomberg, et al., which teaches the decoding of glyph shape codes, which codes are digitally encoded data on paper. The identifying codes can be read by z computer and thereby facilitate computer handling 20 of the document, such as identifying, remeving and transmitting such document.
Besides the various shaped barcodes described above, two-dimensional barcodes called 'data strips" having a plurality of rows ot 'data lines" that represent information digitally encoded on printed media are also known in the ar.. Each data line row consists of a series of black and white pixels each representing binary "gas and "1"s. The ordering of the bits in each row determines the digital data stored therein. The data stored within the totality of the rows deRne the data contained in the two-dimensional barcode. Typically, to read the barcode, the use. passes a hand scanner, which simultaneously reads the information in each data line row, vertically along the length of the barcode to read all of the data line rows.
10 An example of a prior art system using a data strip two-dimensional barcode
having rows of data lines with paper media, s round in U.S. Patent Nos. 4, 692,603, 4,754,127 and 4,782,221 of Brass, et al. In this system, twociimensional barcodes consist of data line rows which are used to encode compute. programs and data on paper and are scanned by use of a hand scanner. m adciirion to encoding the computer 15 programs and data, these data lines also contain cracking and synchronization bits, hereinafter referred to as "clock bits". The requirement for use of numerous clock bits directly within each data line row, significantly reduces the amount of digital data that can be stored within each row. Further, if date line rows having clock bits are damaged, which is common if such harcodes are photocopied or transmitted by facsimile systems, 90 such clock bits would be lost malting it dirRcult, if not impossible, to decode the information encoded in the barcode. Other examples of two-dimensional barcodes
include: (1) U.S. Patent No. 5,083,214 to Knowles, which describes a twodimensional barcode system that requires clock bits embedded within the encoded data itself; and (2) U.S. Patent No. 4,924,078 to Sant'Anselmo et al., which describes a two-dimensior,al barcode system in which an orientation and/or timing cell border is induded within the 5 body of the barcode itself.
In addition, in co-pending patent application "A Clock-Free TwoDimensional Barcode and Method for Printing and Reading the Same", (Serial No. 08/569,280, filed December 8, 1995) ("the '280 Application"), the contents of which are explicitly incorporated by reference herein, a clock-less two-dimensional barcode with a border l O on at least one of the four sides of the barcode is described, which border is placed outside the confines of the barcode itself. The two-dimensional barcodes are sometimes called "PanaMarks". As depicted in FIG. 1A herein, twodimensional barcode 10 is printed in the low right hand corner of printed page 11, although this position is completely arbitrary. In the embodiment depicted in FIG. 1A, the remaining portion of 1: printed page 11 is occupied by printed text 12. However, as one skilled in the art will appreciate, any type of computer-generated printed material, for example a spreadsheet or graphics, can be substituted for the printed text 12. The two-dimensional barcode 10 depicted in FIG. 1B herein includes a border 13 that is present on all four of its sides.
As is fully described in the '280 Application, although the border 13 is only needed on 90 one of the four sides of the two-dimensional barcode 10, for aesthetic reasons it is Epically included on all four sides.
( - - Also, in co-pending patent application "A Borderless Clock-Eiree Two-Dimensional Barcode and Method for printing and Reading the Same", (Serial No. 09/088,189, filed June 1, 1998) ("the '189 Application"), the contents o, which are explicitly incorporated by reference herein, a clock-less two-dimensional barcode without a border (shown in 5 FlG. 2 herein) is described, along with methods of printing and reading the same. Two alternate symbologies for the barcode are presented in the 4189 Application, a first symbology which requires that the four corner bits 1 to he D.a k (when printed on a white background), and a second symbology in which no Flail: corner bits Q1 are
required. As such, two alternate methods for reading the la-DdA of Al G. 2 are described lO in the '189 Application, a first method which operates on the barcode which does not require corner bits, as described by the flowchart in TIC. SA cite rein and the description
related thereto, and a second method which operates or A.:,arAod which is required to have corner bits, as described by the flowchart in rib. S7. h. -i-, and the description
related thereto. Although the two methods of ead.n, h A: -Due ie..^;.be d in the '189 I Application provide satisfactory results, it was found that when the barcode w as ? inted on a page with a complex background, the results provided ^: the locate step 70 of FIGS.
8A and 8B of the '189 Application, which is described therein in conjunction with FIGS. 9A and 9B, were less than optimal, particularly in the presence of single line noise conditions (i.e., an arbitrarily line across the barcode hasting z width less than or equal 20 to the width of a bit block within the barcode, which can often occur in faxed documents and documents printed by poorly maintained printers). in addition, it was found that
( changes in the Hough Transform skew angle estimation step 71 of FIGS. 8A and 88 of the '189 Application could be made to increase processing speed. Also, because of the increased processing speed of the Hough Transform skew estimation step of the presen: invention, the template matching skew angle estimation step 71 of FIG 8B of the '189 Application, which requires that the barcode include corner bits, decreasing the number of bits that could be stored within the barcode, and has a less than optimal processing speed, is no longer required.
It is therefore an object of the present invention to provide a method of decoding infonr,ation digitally encoded in the form of a border-less clock free wo-dimensional 1() barcode punted on a printed medium which is able to operate in the presence of complex backgrounds.
It is an additional object of this invention to provide a method o,' decoding information digitally encoded in the form of a border-iess clock free two-dimensional barcode printed on a printed medium which has an improved processing speed.
It is yet a further object of this invention to provide a method of decoding information digitally encoded in the form of a border-less clock free two-dimer.siona1 barcode printed on a printed medium which does not include corner bits.
It is another object of this invention to provide a method of decoding, inforrr.arion digitally encoded in the form of a two-dimensional barcode printed on a printed medium 90 which may or may not include a border.
( Various other objects, advantages and features of the present invention will become readily apparent from the ensuing detailed description and the novel reatur, s
will be particularly pointed out in the appended claims.
Summary of the Invention
5 These and other objectives are realized by a method of decoding randomized information printed on a human readable medium in the form of a bitmap of rows and columns of data pixels representing encoded data bits. Each or the data pixcis has eithe.
a first or second color. The bitmap has a predete,nnined size and is surrounded by an outer region of pixels of predetermined substantially uniform color. A border of 10 contrasting color may be present within the outer region. The h-u.llan. eadable medium is first scanned to digitize the bitmap and then formatted to a pixel based g.a>,scale representation. The pixel based grayscale replesen,arion is cone.rea.v E p.,:ei cased binary representation by setting a threshold intensity level cased on one gra'scale representation and converting pixels "rearer than or equal Lo the threshold to a first 1 level, e.g., "0", and pixels less than the threshold to a second level, e c, "1". The rou, and column boundaries of the digitized bitmap are located by molting a window a rosa the pixel based binary representation in stepwise fashion in a predetermined pattern.
At each step the portion of the representation which is encompassed by the vindoxA is rested to determine whether the portion conforms to one or more cha, acteristics of the 20 bitmap, and the boundaries of the digitized bitmap are set as the boundaries of the window if the portion does conform to the one or more characteristics of the bitmap.
- g - The skew angle of the digitized bitmap is determined, and if necessary, the digitized bitmap is deskewed so that the skew angle is reduced to substantially zero. The digitized bitmap is thereafter cropped and the binary data is read out from the digitized bitrr,ap, thereby producing a one-dimensional array of digital data. Finally, theDnedimensional array is derandomized and error-correction is applied to produce a substantially error-
free digital representation of the encoded information.
In one embodiment, the window used in the locating step comprises a core region corresponding to the predetermined size of the bitmap and a quiet region corresponding to the outer region. The testing comprises separately testing portions of the lO representation encompassed by the core region and the quiet region to determine whether the portions conform to one or more characteristics of the bitmap and the outer region, espectively. Preferably, -he pixel disibuion of each. region is tested to determine whether it falls within predetermined ranges to verify that the bitrr,ap is presenr within the irr,age, i.e., the bitmap within the core region will leave an l approximately even pixel distribution and the outer region will have a pixel distribution that has pixels of close to 100% of either "0" or 17. If the portions of the representation encompassed by the core region and the quiet region conform to the one or more characenstics of the bitmap, the boundaries of a candidate region for the digitized bitmap are set to the boundaries of the core region. In addition, if the portions of the 20 representation encompassed by the window are found to satisfy the previous testing, the portion encompassed by the core region may also be cropped to determine the outer
( boundaries of the candidate bitmap therein, and the outer boundaries compared to the predetermined dimensions of the bitmap, to further verify that a bitmap is present within the window.
In another embodiment of the present invention, the skew angle is determined S by first locating all of the horizontal or vertical edges within the located canciidate region, preferably using a finite-sLate recognizer. The coordinates of a horizontal or vertical line within the located candidate region representing the horizontal or verricai edges are then calculated using the Hough Transform. Finally, the skew angle is calculated as the angle between the coordinates of the horizontal or vertical line within 10 the candidate region and a horizontal line representing a row of pixels within the representation or a vertical line representing a column of pixels within the candidate region. Optionally both the no,;zon,al and vertical edges can be located and the skew angle can be calculated using both the horizontal and vertical edges.
in yet another embodiment, the candidate region is divided into a piu, aiir>- of 1: horizontal and/or vertical regions. Preliminary skew angles are calculated for each of the plurality of horizontal andior vertical regions, and the skew angle is selected b)! a voting scheme from the preliminary skew angles, e.g., the median value is selected.
( -] to -
Brief Description of the Drawings
The following detailed description., given by way of e';ampie and not intended to
limit the present invention solely thereto, will best be understood in conjunction with the accompanying drawings in which: 5 Figure 1A is a diagram scherr.ati-al!y illustrating the two-dimensional barcode of the '280 Application printed on a page of printed text, and Figure 1B shows an e,;ampie of the two-dimensional barcode of the '280 Application.
Figure 2 shows an example of a two-dimensional barcode in accordance with -the present invention.
I O Figure 3 is a flow chart showing the steps for encoding and decoding inrorrnation onto a printed medium in accordance with the present invention.
Figure 4 shows a nAo-ciimensior.al barcode printed on a ?nnred medium having a complex background with a quiet zone provided around the barcode.
Figure 5 is a flowchart describing how co read the two-dimensional barcode in 1 > accordance with the present invenrior Figure 6 shows the layout of the sliding window used as part of the locate method of the present invention.
Figures 7A, 7B and 7C shove three alternate embodiments of search patterns used as part of the locate method of the present invention.
20 Figure 8 is a diagram of the finite-state recognizer used tO detect edge pixels in the skew estimation method of the present invention.
- 11 Figure 9A is a diagram of a prior art method of skew angle estimation based upon
the use of only a single line within the edge image, and Figure 9B is a diagram or the voting scheme method used as part of the skew angle estimation method of the present invention. S Derailed Description of the Preferred Embodiments
As fully described in U.S. Patent Nos. 5,625,721 and 5,703,972 to Lopresi et al. which are both entitled "Certifiable Optical Character Recognition" and in U.S. Patent No. 5,748,807 entitled "A Method and Means For Enhancing Optical Character Recognition of Printed Documents", the contents of which are all explicitly incorporated l 0 by reference herein, information about the contents, layout, generation and retrieval of a document can be encoded by a computer when initially generating the document o.
upon subsequent computer proessir.O thereof. The encoded document inro;r. ation can then be provided via a two-dimensional barcode, generated on the face of a printed version of the document. Advanced encoding and print resolution capabilities presently l S available can accommodate up to 30,000 bits of information in a single square inch of space. Therefore, as taught by the above-referenced applications, one can theoretically encode the entire document contents, limited only by the amount of space on the document face that one is willing to sacrifice to the two- dimensior,al barcode. A barcode scanner, in conjunction with or wholly separate from an optical page scanner, can scan 20 the two-dimensional barcode and provide the information to an associated system equipped with the appropriate recognition and decoding software. The decoded
( - l -
information can then be used by the scanning system tO create a new version of the document or to enhance the recognition, reproduction and error orrecuon for the scanned document. To decode the rwo-dimensional barcode, it iS not required that such barcode scanner and scanning system know the printing resolution of the tWG 5 dimensional barcode, provided that the scannirg resolution of the scanner is able tO establish at least a 3 x 3 pixel matrix for each logical bit of the wo-dimensional barcode, for the preferred embodiment of the Smite state re ognizeI discussed below with respect to FIG. 8.
The information encoded in the form of a two-dimensional barcode can be used 10 to enhance the sofm are tools already used to create pape. documents. Examples include word processors, spreadsheets, objec-oriented graphics, and multimedia applications, such as voice recording and phDragraphi- ir.aging.
The border 13 used in the two-dimensional barcode 10 of FIG. 1 was not a critical feature of the invention disclosed in the '280 Ap?iication, as most of the key procedures 15 described therein work whether or not a horde. is present. However, the border 10 was used in the '280 Application by the skew estimation and deskewing steps.
FIG. 2 illustrates an example of the two-dimensional barcode symbology introduced in the'189 Application. Two-dimer.sio..G1 Barcode 2C comprises an encoded set of data bits in a two-dimensional grid. Typically, each data bit which is encoded is 20 printed as a matrix of black or white pixels 23. Preferably, a pixel matrix representing one data bit is square and may be as small as a 1 s: 1 matrix to as large as a 6 x 6 matrix
- 13 or more. Non-square matrices may also be used. There are no clocks or borders needed or required in the symbology for two-dimensional barcode 20. In the preferred embodiment, the wo-dimensional barcode 20 is a 20 x 20 arTay of data bits, with each bit stored in a 9 x 9 pixel matrix, although it can be recognized that the size is flexible 5 and that the only requirement on the size is that the reading process know the size of the encoded arrant.
Two different embodiments of tn" barcode syrnbology are described in the '189 Application. In the first embodiment, the four corner bits 21 are always black (when printed on a white background). The four corner bits 21 in the first embodiment are
10 called "anchor" bits. The remaining data bits in the first embodiment of the '189 Application are pseudo-randomized and can hold any combination of desired information and error correction bits. The symbology of the first ernbodimen, provides for good skew estimation when the skew is small and the two-dimensional barcode 90 is free from any damage. However, the placement of the anchor bits 21 in the corner 1> makes them susceptible to damage. Thus, in the second embodiment described in the 189 Application, there is no requirement for anchor bits 21 and the two-dimensional barcode 20 is simply a N x M array of data bits, preferably with N = M = 20, in which case providing for the storage of up tO 50 bytes (400 bits) of information. In the second embodiment, all of the data bits are pseudo-randomized and can hold any combination 70 of desired information and error correction bits. Preferably, a conventional (7,4) Hamming Code is used as the error correction code to detect and correct for random
- 14 noise, in which case the two-dimensional barcode can hold up to 28 bytes (224 bits) of inforTnanon. Figure 3 illustrates the steps involved in the encoding/decoding process. Except as discussed herein with respect to the methods of the present inversion, each of the steps are more particularly described in the '280 Application and/or in the '189 Application. During the encoding process, input data in the form of a onedimensional linear bitstream is first processed to add a standard, bioAIbased error correction code ("ECC") at step 30, randomized at step 31, mapped from a one dimensional bitstream to a two-dimensional representation, i.e., the wo-dimensional teal code, at step 32, and I O the two-dimensional barcode is finally printed at step o3. The decoding process repeats these steps in reverse order, the printed two-dimensional barcode Is read at step 34, mapped from a two-dimensional to one-dime?. sio..al ep.=sen.a.ier. in step o5, derandomized at step 36, and finally the CC is applied at ste? 37 to recreate the "raw" linear bitstream. In particular, the methods of the present invention ar" used in the read 15 step 34.
Figure 5 illustrates the steps in the reading procedure of the present invention.
First, the scanned grayscale image is converted to black and white by thresholding step 100, wherein a certain intensity level is dynamically selected (e.g., the mean or median value pixel value) and pixels having a level equal to or above the selected intensity level 20 will be considered to be black (or white) and pixels having an intensity level less than the selected intensity level will be considered to be white (or black). Next, to speed up
- 15 the process, the resolution of the scanned input image is optionally reduced at step 102, as further discussed below. After that at step 104, a candidate two-dimensional barcode region is located and extracted from the input image by the sliding window method of the present invention, as further discussed below with respect to FIGS 4, 6 and 7. If a candidate region is determined to include a wo-dimensional barcode, the candidate region is extracted at step 104 from the original image (at the original resolution).
Then, at step 106, the skew angle of the two-dimensional barcode within the candidate region is estimated by the method of the present invention, as is further described with respect tO FIGS. 8 and 9 herein.
10 Once the skew angle is known, it is corrected as needed at step 108, as is described in further detail in the '189 Application. In particular, if the skew angle is greater than a minimum threshold a, above which the read step 112 is no longer able to reliably read the barcode, but below a second threshold 0, a simple deskew method is employed. If the skew angle is greater than the second threshold is, typically set to l seven degrees of skew, a trigonometric deskew process is employed which requires more processing time than the simple deskew method. The simple deskew method employs a shear rotation method and is fully disclosed in the '189 Application with respect to FIGS. 16A, 16B and 16C therein. The trigonometric deskew process is also fully described in the '189 Application with respect to FIG. 17 therein.
90 The candidate region is optionally cropped at step 110 to create a tight boundary around the two-dimensional barcode, as further described below. Finally, the
( - l6 -
inforrnation encoded in the two-dimensional barcode is read from the candidate region at step 112, as fully described in the '280 and '189 Applications. The candidate region may be tested at both crop step 110 and read step 112 to ensure tr.a, it contains certain characteristics of the two-dimensional barcode, and in the event that the candidate region does not include such characteristics, processing can revert to She locate step 1 Qua to resume searching for a candidate region.
The first step 102 of the reading process reduces the resolution of the image by a factor of four, preferably, to speed up the iocaring ste? 10^, al no,',n as one reasonably skilled in the art may realize, the resolution of the image r,a; De reduced by, 10 other factors, and if processing speed is not an issue, this step need no; be performed a: all. Preferably, the input image is simply sub-sampled to create s lower rsolunon image. The following equation describes how a reduced;esoiu.io.., l lance is generated from the original input image in this manner: R(I, J) _ O(row_ skip * I, col_ skip * J) (1) I for: O < I < row_m / row_skip O < J colt m l col_ skip where O(x, y)represents the original input image, R(x, y) represents the -educed image, row m and col m represents the vertical and horizontal size of the input image array, respectively, and row skip and column skip are sampling factors in the vertical and 20 horizontal directions, respectively. Preferably, row_skip and column_skip are both equal
- 17 to 4. As one reasonably skilled in the art may realize, other methods of reducing the resolution of the input image may be substituted for the preferred method described by equation (1).
The locate step 104 determines the location of a two-dimensional barcode within j a given document image. Prior art methods of locating include a simple locating
scheme based on the distribution of a histogram of the horizontal and vertical projection of image pixels, as described in the '280 Application, and a mathematical morphology based scheme, described in co-pending patent application "Method of Locating a Machine Readable Two Dimensional Barcode Within an Image (amended)", (Serial loo.
lO 08/892,347, Bled March 17, 1997) ("the '347 Application"). The simple locating scheme of the '280 Application is relatively fast regardless of the location of the two dimensior,al barcode within an image, but does not provide opirclai results when the two-dimensional barcode is printed on a complex background, includes single line noise
or has a skew angle of greater than five degrees. The morphology-based locating scheme l of the '347 Application can handle document backgrounds such as the printed text. but
does not handle complex backgrounds such as the dark background 220 of FIG. 4 and
is not as efficient in terms of processing speed. The method described below of the present invention has the beneficial characteristics of both prior art methods, and is
capable or locating the two-dimensional barcode when it is printed on a document 20 including a complex background such as the dark background 220 of FIG. 4.
( _ Is Referring now to FIG. 4, a quiet zone 200 of white space is now explicitly created around the two-dimensional barcode 210 when it is printed to improve the accuracy or the locate process when the twodimensional barcode 210 is included within printed media which contains complex backgrounds, such as background 220 The quiet zone S 200 also improves the accuracy of the locate process in the presence of
line noise and skewing of the two dimensional barcode. As shown in FIG. 1A, when the cwo-
dimensional barcode is positioned in a comer of a document outside the margins within which the document contents, such as text or graphics, lie, an area of white space is inherently present. However, a much more difficult sinuation presents itself whey.
10 document does not include such margins or other areas or white space. Thus, by explicitly requiring the presence of a quiet zone 200 around twociimensional barcode 210, the two-dimensional barcode 210 may be placed anywhere on a document with a complex background, as is generally shown in FIG. 4, and still be read by the method of
the present invention.
l The locate step 120 of FIG. 5 takes advantage of the fact Blat the twcdimDnsiorlal barcode is located in the center of a quiet zone (white region), which combination can be printed on any kind of document background. Thus, the two-dimensional barcode is
surrounded by a white border region as shown in FIG. 4. As one reasonably stilled in the art will realize, the quiet zone requires that substantially all of the pixels therein be 20 the same color, but the particular color may be black or white (or another color in the case of a color document, which will be converted to black or white in the threshold step
- 19 100). The locate step 120 must allow for a certain level of' speckle" noise and line noise which may be introduced in the quiet zone, for example during printing or scanning.
The locate step 120 uses the sliding window 300 illustrated in FIG. 6 to locate a tWG-
dimensional barcode within the input image. In particular, the sliding window 300 is 5 moved across the input image and at chosen positions is used to extract the portion of the image within the conEmes of the sliding window 300. The extracted portion of the image is then tested to determine if a rwo-dimensional barcode candidate region exists therein, as further discussed below. The sliding window 300 has two regions: (1) a core region 310 and (2) a quiet region 390. The core region 310 corresponds to the tWG 10 dimensional barcode itself, and the quiet region 320 corresponds to the quiet zone of two-dimensional barcode. The size of the two regions is mainly determined bit the specification of the two-dimensional barcode, i.e., the size of two-dimensional barcode
210 and quiet zone 200 shown in FIG. 4. However, since the size of the rectangular window necessary to contain the two-dimensional barcode increases when the two 15 dimensional barcode is skewed, as shown by skewed two-dimensional barcode 330 in FIG. 6, the size of the core region of the sliding window 300 is slightly larger than the expected size of the two-dimensional barcode in order to accommodate circumstances where a two-dimensional barcode is skewed up to a certain maximum amount. In addition, this feature also allows the two-dimensional barcode to be slightly magnified 20 during the printing and/or scanning processes and still be located by the method of the present invention.
- 20 Various search patterns for the sliding window 300 can be used. For simplicity, the search pattern can start from the top-left corner of the image and scan, row by row, left to right for each row, as shown in FIG. 7A, which is easy to implement but does nor use any a priori knowledge about the location of the two-dimensional.barcode within a given image, and therefore may not be the most efficient search method.
In practice, the two-dimensional barcode is usually printed at a predefined location within a page. Thus, when decoding, only a small portion of the entire document image needs to be scanned by the sliding window 300. This srr,all region is usually obtained by the scanning device according to the expected location of the two 10 dimensional barcode, e.g. , in each comer of the document. Once the small region (or regions) is extracted, it is more likely that the two-dimensional barcode will be closer to the center of the extracted small region than to the boundary. The preferable search pattern starts from the center of the extracted small region and expands out in a spiral-
like pattem, as shown in FIG. 7B, which allows the two-dimensional barcode candidate 15 region to be located much quicker than the simple method discussed with respect to FIG. 7A. However, the implementation of this search method can be more complicated.
Thus, a search pattern which is less complicated to implement than the search pattern of FIG. 7B, but faster than the search pattern of FIG. 7A, may be alternately implemented using a jump row search pattem, as illustrated in FIG. 7C, which searches by rows on the 90 extracted small region. As shown in FIG. 7C, the jump row search pattern starts searching at the center row, then jumps one row up and one row down from the center
- 91 row, then two rows up and two rows down from the center row, searching each row until a candidate two-dimensional barcode region is found or the top and bottom of the extracted small region is reached. For each row, the jump row search pattern searches from left to right. Although not be as efficient as spiral-like pattern of FIG. 7B, it is easier to implement.
Further, if improved efficiency is necessary, each search pattern discussed herein can be modified to a search bit slipp,nc some scan paths, such as only searching along the even number paths shown in FIGS. 7-7C.
When the sliding window passes each location, the irr,age region within the lO sliding window 300 is checked to see if contains certain characteristics of a two.
dimensional barcode. As indicated aDov=, the bits in a two-dimensional barcode are randomized and contain a uniform d s- iDuJon of bits. {r, addition, the approm,ate size of the two-dimensional barcode knov. and the two dimensional barcode is surrounded by a quiet zone of white space. The tossing method of the present invention checks the 1: image region at each step to determine whether it contains these features, to determine whether the image region should DO selected as a two-dimensional barcode candidate region. As a first test at each position, the Core Region Density value of the image within the core region 310 of the sliding winnow 300 is tested to determine if it falls within a 20 predetermined range. In particular, because the bits within the two-dimensional barcode are distributed in a uniform pattern because of the randomization process, a perfectly
( - 9 - uniform two-dimensional barcode will have an equal number of black pixels and white pixels. The "Core Region Density" is defined as ache ratio of the number of black pixels to the total number of pixels inside the core region 310 of scanning window 300.
Because the binarization process of the scanning device or the threshold step 100 S discussed above may cause the two-dimensional barcode region to be too dark or too light, the Core Region Density can vary slightly to a level somewhat lower or higher than 0.5. Therefore the Core Region Density value may be within a pre-determined range around 0.5. In addition, if the rwo-dimensional barcode to be decoded includes a border, the Core Region Density value threshold and range must be adjusted according 10 to accommodate the extra black pixels present due to the black border (e.g., if the threshold is 0.5 and the range is 0.45 to O.aS when no black border is present, the threshold may be 0.55 and the range is O.aO to 0.60 when a black border is present). If the core region is found to have a Core Region Density which indicates the presence of a nondimensional barcode, testing continues, otherwise the sliding window is moved 15 to its next position to evaluate the Core Region Density.
As a second test at each position, Quiet Region Density of the region within the quiet region 320 of the sliding'window 300 is evaluated to determine if it falls within a predetermined range. The Quiet Region Density is defined as the ratio of the number of black pixels to the total number of pixels inside the quiet region 320 of the sliding 20 window 300. As shown in FIG. 4, the quiet zone 200 ideally contains no black pixels and thus a perfectly scanned two-dimensional barcode without any noise (i.e., black
( - 23 pixels) within the quiet zone 200 would yield a Quiet Region Density value of zero. To accommodate some speckle noise or single drawn line noise, z maximum density value somewhat greater than zero is preselected as an acceptable value. The Quiet Region Density value for the portion of the image within the quiet zone 320 of the sliding window 300 is evaluated, and if found to be less than or equal to the pre-selected value, testing continues, otherwise the sliding window is moved to its next position to evaluate the Core Region Density.
As a final test, when an image region within a scanning window falls within the acceptable ranges for both Core Region Density and Quiet Region Density, a cropping I O test is further performed to check the vaiidir of each region. The cropping step of the present invention relies on the fact the bits in the two-dimensional barcode are uniformly distributed. Thus, in an array of 20 x 20 DitS, no,D^r o. column will exist in the candidate region that does not contain any black bits. The cropping is done from the center to the outside. Starring from the center or the candidate region, each image row 1 > is scanned consecutively from the center so the top of the candidate region until a row is reached that contains no black pixels, which is assumed to be where the top edge of the two-dimensional barcode is. The scanning process is repeated three more times, with row scanning proceeding from the center downwards to the bottom of the candidate region, and then column scanning from the center to the left-most column of 20 the candidate region, and finally from the center to the right-most column of the candidate region. Instead of a single row signifying the edge of the two-dimensional
- 24 barcode, the respective boundaries of the two-dimensional barcode can be signified by the presence of a predetermined consecutive number of row or columns which contain no black tO accommodate for scan line noise from the scanning process, or a too light image. After the candidate region is cropped, the size of the new region is checl ed against the expected size of the two-dimensional barcode. If a significantly different size is found, it signifies that the candidate region is not a wo-dimensional barcode region, and the sliding window is moved to its next position tO evaluate the Core Region Density,. Checking the size after the cropping process is effective in eliminating some 10 regions which may be falsely detected by the first two tests. For instance, a text region may pass the density test, where it includes a font having a size similar to the size of each bit within the wo-dimensional Darcode and has Remain line spacing and character spacing. However, cropping a text region will usually end up with a single connected component region, i.e. a character, which will have a size significantly different from l 5 that expected for the two-dimensional barcode.
Once a candidate region is found to meet all three tests, it will be considered a valid candidate region. The current location within the image of the sliding window is recorded and mapped to the full resolution image, and the corresponding region is extracted as a candidate region for further processing. If a two-dimensional barcode 20 within the sliding window has a relatively large skew angle, the corners thereof may be left outside the boundaries of the core region 310 of the sliding window 300. The
- 2: corners can be recovered by slightly expanding the size of the core region 310 when extracting the candidate region from the full resolution image, to ensure that the entire two-dimensional barcode is extracted. Any noise created in the extracted region because of the expansion of the window size can be removed at crop step 110, which uses the same inside out cropping procedure described above with respect to locate step 104' e Unlike the locate methods described in the 'ago an& '189 Applications, the method of the present invention does not crop the located candidate region before deskewing, because cropping a skewed two-dimensior.a! Barcode can easily damage its 10 corners, whereas, cropping a correctly deskewed rwo-dimer.sional barcode will preserve its corners.
The skew estimation method of the '080..?plicaion relies upon the iocanon of two anchor bits in the top left and bottom left comers of the;odimensional barcode to calculate the skew angle. As further discussed therein, templates are used to locate 15 the corners, and this method fails when the skew angle is recta ively large, greater than approximately five degrees of skew. In addition, the corners of the two- dimensional barcode are often deformed by noise, resulting in an inaccurate value for the estimated skew angle by the method of the '280 Application.
T o solve these shortcomings, the '189 Application disclosed a Hough Transform 20 based skew estimation technique. The Hough Transform is a parametric transformation that can be used to detect geometric features, such as straight lines, within an image.
- 26 The method of the'189 Application extracts all horizontal edge pixels by using a vertical black and white mast; across the entire image. Then the Hough Transform is performed on all identified horizontal edge pixels to calculate the angle of the longest edge line, representing the skew angle of the two-dimensional barcode. This method requires a significant amount of processing time, because moving a vertical mask across the entire image to detect each edge pixel involves accessing each image pixel multiple times (the actual number of accesses depends upon the size of the mask) and because -he Hough Transform method tests a wide variety of possible angles in 0.5 degree increments for all of the edge pixels to determine the angle of the longest edge line. In addition, 10 because the angle determined by the Hough Transform corresponds to the angle of the line containing the most number of pixels, the skew angle will not be determined accu. arely when a drawn line noise is present across the tvo-dimersional barcode. This is because the line noise will be the dominant line among all of the edge lines, causing the skew estimation procedure to calculate the angle corresponding tO the line noise.
15 The effect of a drawn line is illustrated in FIG. 9A, wherein line 400 is drawn along the bottom of two-dimensional barcode 410. Because the dominant line 430 in the horizontal edge image 420 is the dominant line, the skew angle estimation method of the '189 Application will incorrectly calculate the skew angle to be 0.o degrees.
The skew estimation method of the present invention is also based on the Hough 20 Transform method, with two significant changes to make the method more practical and reliable. First, a finite-state recognizer is used to detect the edge pixels of the two
- 27 dimensional barcode in a single pass, instead of the vertical mask used in the '189 Application. Since the black-white and white-black transitions within the candidate region are associated with edges in the logical rows and columns, a valid transition is determined by a specified number of consecutive black pixels followed by a specified 5 number of consecutive white pixels (or vice versa) by an attributed finite state recognizes, which is shown in diagram form in FIG. 8. This method is more efficient because it accesses each image pixel only once and can be used for to detect either horizontal or vertical edges or both. In addition, the finite state recognizes does not require that the two-dimensional barcode include any anchor bits whatsoever, making lO the skew estimation method of the present invention more robust in tne presence of a slight deformation of any corner of the scanned two-dimensional barcode.
In particular, the finite state 1 ecognizer sequentially examines ea,. i, el in each row (or column) to nnd vertical (or horizontal) edges. Ape itim is f3 as a first sequence of at least N pixels in a r'irst color followed by a second sequence of at 15 least N pixels in the opposite color. The position of the black pixel Busing the edge transition is used as the location of the edge. Thus, for example, in a row consisting of four consecutive white pixels followed by four consecutive black pixels, and further followed by three consecutive white pixels, only the fifth pixel in the row will be designated as an edge transition when N = 4. However, if N = 3 in the same example, 20 the fifth and the eighth pixels will be designated as edge transitions (edges).
- 28 Referring now to the state diagram FIG. 8, a finite state recognizer, which is a conditional state machine, is shown which operates for N equal to or greater than 3. in FIG. 8, the designations "B" and "W7'rerer to the color (i.e., black or white) of the pixel at the particular position within the row or column being processed. Thus, at initial state 500, if the color of the first pixel is black, the process moves from state 500 to state 501.
If the color of the first pixel is white, the process instead moves from state 500 to state 502. Processing continues along through the state machine, as discussed further below, until a special character is reached which indicates the end of the particular rout or column being processed, at which point the next row or column is processed from initial 10 state 500. At each state beyond state 500, a position index I is incremented to track the position of the pixel being examined within the particular roA' or column. in addition., certain other operations are performed at various states as indicated in Table 1 and further described below.
l Table 1
State Operation(s) 501, 502 Pixels = 2 503-506, 509, 510 #pixels = Pixels + 1 507 Pixels = 2 edge candidate = 1-1 20 508 Pines = 2 edge_candidate = l 511, 512 #pixels - #pixels + 1 storefedge candidate) -
( At state 501, if the color of the next pixel is black, processing moves to state 503, whereas if the color of the next pixel is white, processing moves to state 502 Likewise, at state 502, if the color of the next pixel is white, processing moves to state 0, whereas if the color of the next pixel is black, processing moves state 01. As 5 indicated in Table 1, at states 501 and 502 the number of conseuu-ve pixels encountered is set to 2 (for two consecutive black pixels at state 01 and two consecutive white pixels at state 502). From state 501, processing moves to s.aLe if the next pixel is black and to state 502 if the next pixel is white. At state Q9.
processing continues at state 503 as long as each subsequent pixel encountered is black l O and the number of pixels remains less than N. Each time stare 503 is passed, the pixel count, i.e., #pixels in Table 1, is incremented. When the Nth consecutive black Pixel its reached, processing moves to state 5C5. If a white pixel is encounterer berQre IV consecutive black pixels, processing moves to state 502. Processing moves through states 502, 504 and 506 in an analogous replanner when a series of white pixels is first l encountered, with the pixel colors reversed.
At state 505, processing continues at state 505 for each subsequent black pixel, with the pixel count being incremented for each pass, in effect looking for the last black pixel in the current sequence. When a white pixel is encountered at state o0, processing moves to state 507, where the pixel count is set to 2 and the inkier or the last 20 black pixel set as an "edge_candidate." The edge candidate is the last black pixel in a sequence of N or more consecutive black pixels. At state 507, the pixel count is reset to
- 30 2. If the pixel encountered at step 507 is black, processing moves back to state aO1 to begin counting black pixels, in effect discarding the ede_candidate because the necessary condition, i.e., at least N consecutive black pixels followed by at least N consecutive white pixels, has not been satisfied. If the pixel encountered at state aO7 is white, processing moves to state 509, where the pixel count is incremented. Processing continues at stare 5Q9 so long as white pixels are encountered and the pixel count remains less than N. If a black pixel is encountered at any time before the Nth white pixel is reached, processing reverts to state 501, discarding the edge_-andidate because the necessary condition of at least N consecutive white pixels has not been reached. If ] O the Nth consecutive white pixel is reached, processing moves to state 511, where edge candidate is stored, and the pixel count is incremented. As stated above with respect to states BOO, 506 and 506, the processing through states 508, a10 and a19 is ar.alo:,ous to that discussed above with respect to states 507, aO9 and 511, with the pixel colors reversed. The only exception is that the edge candidate at state 508 is se, to the index l of the current pixel, while the edge candidate at state 507 is set to the index of the previous pixel, as indicated in Table 1, since only black pixels can be designated as edges. If a black pixel is next encountered at state 511, processing moves to state o08 and treat black pixel is set as an edge_candidate, since at least N consecutive white pixels 90 have been encountered (only black pixels may be edges). After state 508, processing continues through states 510 and 512, in a similar rnanne, to the processing which
( - 3l occurred at states 509 and 511, to determine if there are N consecutive black pixels following the sequence of at least N consecutive white pixels, and if so, the edge candidate is stored as an edge at step 512. If a white pixel is encountered at stare 511, processing moves to state 506 to look for the last white pixel in the current 5 sequence, and then moves to state 508 once the last white pixel has been located to determine whether a sequence of at least N black pixels follows. Analogous steps occur with respect to the processing from state 52 through states 05,;:,G7, 509 and Gil.
The edge detection process continues through the row or column of pixels, looking for N consecutive black (or white) pixels and then 19 consecutive white (or l 0 black) pixels of a second color, until the special character is reached designating the end of the row or column. At each point where N consecutive black (or whites pixels is found that is followed by N consecutive white (or blackly) pixels, the black pixel at the boundary between the two sequences is set as an edge.
Once the edge pixels (either horizontal, vertical, or both horizontal and vertical) 15 are detected by the finite state recognizes, they are mapped into the Hough dorr.ain using the same process described in the '189 Application.
The finite state recognizer improves the processing speed of the skew estimation step, but does not affect the impact of line noise. s shown in FIG. 9A, when a line 400 is drawn which passes through a barcode 410' it will become the dominant edge line 430 9() within the edge image 420, and will produce an incorrect result for the skew angle when the line is not drawn parallel to the horizontal (or vertical when vertical edges are
- 32 detected) axis of the barcode itself. The line 430 in FIG. 9A causes the skew angle to be incorrectly estimated as 0.5 degrees. To reduce the impact of such an arbitrary arawr line in estimating the skew angle of the rwo-dimensional barcode the method of the present invention segments the horizontal edge image created by the Unite state recognizer into a number of regions. The skew angle is determined for each region, and a voting scheme is used to determine the skew angle most likely representative of the actual skew. In the preferred method, the horizontal edge image is segmented into three regions, such as the top region 440, middle region 450, and bottom region 460 of the horizontal edge image 420 of FIG. 9B. The skew angle is determined for each region, ] 0 i.e., Eve degrees for the top region 440 and the middle region 450 and 0.5 degrees for the bottom region (due tO the edge tin '30 esuaed by d.a- wn line 400), and the median value, i.e., five degrees, preferably, is selected as the actual skew anal estirnaior.. As one reasonably skilled in the art will recognize, there are many ways tO implement the voting scheme. In the present invention, the median value is used because it provides 1: the least overhead in terms of processing speed. Other methods of determining the skew angle include using the most frequently occurring skew angle (he., majority voting) or more complex weighting techniques (i.e., weighted vote). This mulriple-region skew estimation scheme is more robust against arbitrary line noise than prior art methods
because when line noise is present which will affect the skew estimation, it is likely to 20 affect only a single region, as demonstrated by the line 400 in FIG. 9B. If line noise is present that crosses over more than one region, it must be at a relatively large angle with
( - 33 respect to the edge pixels in the horizontal edge image, and will thus not be a dominant line that affects the skew angle estimation. As one reasonably skilled in the art will recognize, based upon the detection of both horizontal and vertical edges, the edge image may be segmented into both horizontal and vertical regions for testing by one of the voting schemes.
As discussed above, the use of a finite state recognizer to locate the edge pixels followed by the Hough Transform-based skew estimation step allows the method of the present invention to eliminate the need for anchor bits in the two-dimensional barcode, which reduces the effect of corner deformation of the two-dimensional barcode. In addition, multipleregion voting scheme further increases the immunity of the skew estimation method of the present invention to background noise, especially drawn lines.
Once the skew angle is estimated, the candidate region is deskewed, as further discussed above with respect to step 108 of FIG. 5, and described in greater detail in the 189 Application, using a shear rotation method for smaller levels of skew and alternately using a trigonometric method for larger levels of skew.
After correcting the skew angle, the boundary of the two-dimensional barcode is optionally determined by crop step 110 of FIG. 5, which uses the same the inside Out method described above with respect to the locate step 104, although a tighter threshold is used to check the validity of the two-dimensional barcode candidate region, since deskewing has already occurred and it is unlikely that any valid bits will be cut off.
Once the candidate region is cropped, the dimensions thereof are compared to the
expected dimensions of the two-dimensional barcode. If the dimensions differ greatly, a two-dimensional barcode is not present in the candidate region, and processing passes back to the locate step 104, as shown in rlG. 5. If the dimensions fall within a range which is close to the size of the two-dimensional barcode, processing passes to the read step 112.
At this point, the scanned two-dimensional barcode has been located, deskewed, and tightly cropped. The next step is to read out the data bits, which transforms the two-dimensional harcon- from the image domain, where each bit is represented as a collection of black or white pixels, to a 20 x 20 bit array, in the 10 preferred embodiment, of logical values. Note that since the rwo-dimensional barcode symbology is clock-free, there are no predeerrnineo reference parrerr.s so nelD orient the reading, process. However, the logical size of -one,o-dirnensional barcode is known in advance, for example, a square measuring 0 bits on each side in the preferred embodiment. Moreover, because the bits in one mark are pseucio-ranoomized during the 15 encoding process, any particular row or column of pixels will show a higher distribution of black-white and whiteblack transitions near the edges in the logical rov,s and columns, and alower distribution near the centers. This process is fully described in the 280 Application. Once horizontal and vertical center lines are established by the process described in the '280 Application, Me bits are read out of the no-dimensional barcode 20 by recording the pixel value lying at the intersection of each horizontal and vertical center line (for example, setting each "white" pixel value = "0" and each "black" pixel
- 35 value = "1"). The '189 Applicanon descnbes, with respect to FIGS. ISA ISD, an improved clocking method for reading OUt the DitS from the Cdimensional barcode which reduces the error rate by reading the bits in each of four possible direcuon^., thereby creating four different arrays representing the data, and choosing the array for output which the ECC step 37 of FIG. 3 snouts to have the least number of errors. Her e again, if the read step fails, as determined bit the ECC for example, processing can pass back to the locate step 104, as shovel in FIG. 5.
While the present invention has been particularly shorn and described with reference to the preferred embodiments and various aspects thereof, it will be 10 appreciated by those of ordinary skill in the are, that various changes and modifications Ala: - made viou. Llepa;--u.O rigor,-'.; -I_.,;.-;. ails S--FJc c;. in-vel-uil. l. is in-.enoeG that the appended claimers be interprere-' as Deluding the embodiments describe- he. eir, the alternatives mentioned above, and ail equivalents thereto.
"The '280 Application" referred to above is published as EP 0 783 160, "the '189 Application" referred to above is published as EP 0 962 883, and "the '347 Application" referred to above is published as EP 0 866 415.
Claims (17)
1. A method of decoding randomized information printed on a human readable medium in the form of a bitmap of rows and columns of data pixels representing encoded data bits, each of said data pixels being either a first or second color, said 5 bitmap having a predetermined size and surrounded by an outer region of pixels of predetermined substantially unifonn color, comprising the steps of: scanning said human readable medium to digitize said bitmap; formatting said bitmap to a pixel based grayscale representation; converting said pixel based grayscale representation to a pixel based binary 10 representation by setting a threshold intensity level based on said grayscale representation and converting pixels to a first level or to a second level dependent on their relationship to said threshold; locating the row and column boundaries of a candidate region for said digitized bitmap by moving a window across said pixel based binary representation in stepwise 15 fashion in a predetermined pattem, at each step testing a portion of said representation which is encompassed by said window to determine whether said portion conforms to one or more characteristics of said bitmap, and setting the boundaries of said candidate region as the boundaries of said window if said portion does conform to said one or more characteristics of said bitmap; 20 determining the skew angle of said digitized bitmap within said candidate region;
- 37 deskewing said digitized bitmap so that the skew angle is reduced to substantially zero; reading out binary data from said digitized bitmap to produce a one-dimensional array of digital data; 5 derandomizing said onedimensional array of digital data; and error-correcting the derandomized one-dimensional array of digital data to produce a substantially errorfree digital representation of the encoded information.
2. The method of Claim 1, whereby said window of said locating step comprises a
1 n core region corresponding to said predetermined size of said bitmap and a quiet region corresponding to said outer region, and wherein said testing comprises separately testing portions of said representation encompassed by said core region and said quiet region to determine whether said portions conform to one or more characteristics of said birrnap and said outer region, respectively, and wherein the boundaries or said candidate ! region are set to the boundaries of said core region.
3. The method of Claim 2, wherein said testing of said core region comprises determining if the density of pixels of said first color or said second color within said portion of said representation encompassed by said core region is within a 9() predetermined range.
- 38
4. The method of Claim 2 or 3, wherein said testing of said quiet region comprises determining if the density of pixels of said first color or said second color within said Portion of said representation enCmnac==A hi, quiet region is within a predetermined range.
5. The method of any one of Claims 1-4, wherein said locating step further comprises an additional testing step in which sai,! candidate region is cropper and tile oineisio of said cropped candidate region are compared to said predetermined size of said bitmap, 10
6. The method af any one of Claims 1-b, wherein said printed human readable medium further comprises other infor;klcon, are Herein said scanning step, said formatting step and said converting step operate off said OiCUp and said other information.
7. The meth=1 of any one of Claims 1-6, wherein said skew angle determining IS step comprises; locating horizontal or vertical edgeorigin said bitmap using a finite state recognized; calculating the coordiriates of a horizontal or vertical line within said bitmap representing said horizontal or vertical edges using the Hough Transform and calculating said skew angle as the angle between the coordinates of said 20 horizontal or vertical line within said bitmap and a horizontal line representing a row
- 39 of pixels within said candidate region or a vertical line representing a column of pixels within said candidate region.
8. The method of Claim 7, whereby said candidate region is divide into a plurality 5 of horizontal and/or vertical regions, preliminary skew angles are calculated for each of said plurality of horizontal and/or vertical regions, and said skew angle is selected by a voting scheme from said preliminary skew angles.
9. The method of Claim 8, whereby said voting scheme selects the median value of 10 said preliminary skew angles.
10. The method of Claim 8, whereby- said voting schem" selects the mean value of said preliminary skew angles.
15
11. A method of any one o. Claims 1-10, further comprising the step of: reducing the resolution of said pixel based binary representation by a predetermined factor prior to said locating step; and wherein said locating step extracts said candidate region at the original resolution of said pixel based binary representation.
- 40
12. The method of any one of Claims 1-1 1' wherein said locating step moves said window in a predetermined pattern across at least one predetermined portion of said converted representation.
13. The method of Claim 12, wherein said predetermined pattern movers along rows, starting at a center row of said converted representation, and then moving repeatedly one row upwards and then one row downwards, respectively, until the first row and last row of said converted representation is reached.
14. The method of Claim 12, wherein said at least one predetermined portion consists of at least one corner of said converted representation.
15. The method of any one of Claim 1-14, further comprising the step of cropping and digitized bitmap after said deskewing step.
16. A method of locating a two-dimensional barcode within a scanned binary image comprising: moving a window across said image in stepwise fashion in a predetermined pattern; testing at each step a portion of said image which is encompassed by said window to determine whether said portion conforms to one or more characteristics of said two-dimensional barcode; and
if; - 41 setting the boundaries of said digitized bitmap as the boundaries of said window if said portion does conform to said one or more characteristics of said two-
dimensional barcode.
17. A method according to any one ot Claims I or 16 substantially as described herein with reference to the accompanying drawings.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/212,243 US6082619A (en) | 1998-12-16 | 1998-12-16 | Method for locating and reading a two-dimensional barcode |
GB9929667A GB2344913B (en) | 1998-12-16 | 1999-12-16 | Method for locating and reading a two-dimensional barcode |
Publications (3)
Publication Number | Publication Date |
---|---|
GB0306743D0 GB0306743D0 (en) | 2003-04-30 |
GB2388230A true GB2388230A (en) | 2003-11-05 |
GB2388230B GB2388230B (en) | 2003-12-17 |
Family
ID=28793326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
GB0306743A Expired - Fee Related GB2388230B (en) | 1998-12-16 | 1999-12-16 | A method for locating and reading a two-dimensional barcode |
Country Status (1)
Country | Link |
---|---|
GB (1) | GB2388230B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7028911B2 (en) * | 2002-08-07 | 2006-04-18 | Shenzhen Syscan Technology Co. Limited | Methods and systems for encoding and decoding data in 2D symbology |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112990192B (en) * | 2021-02-04 | 2024-02-02 | 西安理工大学 | Barcode scale image positioning, identifying and detecting method for digital level |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5867594A (en) * | 1994-06-15 | 1999-02-02 | Metanetics Corporation | Recognizing dataforms in image areas |
EP0962883A2 (en) * | 1998-06-01 | 1999-12-08 | Matsushita Electric Industrial Co., Ltd. | A border-less clock free two-dimensional barcode and method for printing and reading the same |
-
1999
- 1999-12-16 GB GB0306743A patent/GB2388230B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5867594A (en) * | 1994-06-15 | 1999-02-02 | Metanetics Corporation | Recognizing dataforms in image areas |
EP0962883A2 (en) * | 1998-06-01 | 1999-12-08 | Matsushita Electric Industrial Co., Ltd. | A border-less clock free two-dimensional barcode and method for printing and reading the same |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7028911B2 (en) * | 2002-08-07 | 2006-04-18 | Shenzhen Syscan Technology Co. Limited | Methods and systems for encoding and decoding data in 2D symbology |
Also Published As
Publication number | Publication date |
---|---|
GB2388230B (en) | 2003-12-17 |
GB0306743D0 (en) | 2003-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6082619A (en) | Method for locating and reading a two-dimensional barcode | |
US6565003B1 (en) | Method for locating and reading a two-dimensional barcode | |
US6201901B1 (en) | Border-less clock free two-dimensional barcode and method for printing and reading the same | |
US6115508A (en) | Clock free two-dimensional barcode and method for printing and reading the same | |
CA2044404C (en) | Self-clocking glyph shape codes | |
EP0469868B1 (en) | Binary image processing for decoding self-clocking glyph shape codes | |
US5539841A (en) | Method for comparing image sections to determine similarity therebetween | |
US7198194B2 (en) | Two-dimensional code having superior decoding properties making it possible to control the level of error correcting codes, and a method for encoding and decoding the same | |
US6371373B1 (en) | Method for reading a two-dimensional barcode | |
EP0999519B1 (en) | Distortion correction method in optical code reading | |
JPH0778819B2 (en) | An adaptive scale method for decoding spatially periodic self-clocking symbol shape codes | |
US20090103803A1 (en) | Machine readable documents and reading methods | |
USRE38758E1 (en) | Self-clocking glyph shape codes | |
GB2388230A (en) | A method for locating and reading a barcode | |
DE19964415B4 (en) | Method of decoding randomized information printed on human readable medium in the form of bitmap of rows and columns of data pixels by deskewing digitized bitmap so that skew angle is reduced to zero for reading out binary data from it | |
JPH0119193B2 (en) | ||
JPH0373916B2 (en) | ||
Zhu et al. | Information encoding into and decoding from dot texture for active forms | |
JPS59128677A (en) | Optical character reader | |
JPH04267494A (en) | Character segmenting method and character recognizing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PCNP | Patent ceased through non-payment of renewal fee |
Effective date: 20071216 |