1. Field of the Invention
The present invention relates to an optical reader system employing a camera to capture a digital data image of an unread form and a computer system for processing the digital data to correct for distortions and derive and interpret information from the digital data. Herein, “camera” includes any photo-sensitive device that captures a scene in a photo-sensitive media that may be downloaded or read-out by a computer processing system that stores in memory the digital data representing the scene. Lenses, filters, apertures, etc., and a photo-sensitive surface, array, or arrays for holding the scene image may be included in the term “camera.”
2. Background Information
Printed documents, play slips, lottery scratch tickets, lottery instant tickets and the like are collectively defined herein as “forms.” Forms, often, have man-made marks at locations indicating a specific intent of the human. Correctly identifying a form and reading or processing the printed and man-made markings are not simple tasks.
Some of these tasks include: detecting the presence of the form, determining that the form is still or motion-less, identifying the existence of marks on the form, locating the marks on the form; and, then interpreting the meaning of the marks. For each task, there must be enough light to illuminate the form with enough contrast with respect to the background to detect and identify those marks.
In order to identify a form, printed markings may be detected and interpreted, or a human may indicate the form type. The printed markings will normally include logos or other special marks used to identify the form type. In addition, alignment marks may be printed and used by the processing system to accurately identify locations on the form. Then, the markings on the form may be accurately located and interpreted for their meaning.
The processing and identifying of marks on the form begins with a camera that captures an image of the form. The captured image may be downloaded, stored and analyzed by a computing system. Analyzing the image may be accomplished by an “application” that may be software running in a computer system, firmware embedded in a hardware framework, a hardware state machine, or a combination thereof.
One important and common problem when reading forms occurs when the form is bent, crumpled, rolled or folded, thereby creating distortions. Distortions are a major cause for errors in reading or rejecting a form. Distortions manifest, at least, as location and resolution errors.
Some prior art readers have drive mechanisms that flatten and position a form into an enclosed chamber. Such drive mechanisms are expensive and require routine service and technical support to maintain them, all leading to additional costs and expense in ownership.
Prior art attempts at compensating for distortions have been ineffectual and a convenient, reliable, comparatively inexpensive easy to use reader that corrects, reduces and/or compensates for such distortions would benefit the industry.
The present invention is directed to an optical reader that is capable of reading a wide assortment of forms and, more particularly, capable of reading forms that have been bent, rolled, crumpled, or folded, by using a system and a process for distortion correction. According to at least one embodiment of the present invention, model images of known form types such as, for example, printed documents, play slips, lottery scratch tickets or lottery instant tickets are stored on a computer system. Along with the model images, information is stored on the computer system that includes known logo or other form identifying marks and alignment marks that partition each model image into areas or sectors that are defined by at least three non-colinear alignment marks. The locations, attributes (see below) and the corresponding meanings of alignment marks, logos, other such identifying marks, and the locations of possible hand drawn marks and their meanings are also stored with each model image.
A coordinate system such as, for example, Cartesian, polar, etc., describes locations on a model image and on any captured images of unread forms. In a Cartesian coordinate system, for example, x and y may define locations on the model image, and x′ and y′ may be used for locations on a unread image of a form.
A transfer function may be applied to an apparent location of any mark within a sector of the unread image to yield a corrected location. The apparent location may then be compared to the corresponding location on the model image and that location may determine the mark's meaning. All the sections having marks therein may be processed in a like manner.
“Transfer function” is a phrase used herein that may be termed by others as “translation function,” or “equation,” or “correction function,” or “factor,” or other such terms or combinations of terms as may be found in the art.
Attributes may refer to shapes, sizes, the center of mass of the mark, etc. The location and the attributes of a mark may define an alignment mark or a logo. The type of form may be determined by a logo, or some other printed mark or marks, or may be manually made by an agent. For example, a pencil mark at a specific location on the form may indicate a selection by a human completing a form such as when playing a game.
An alignment mark on an unread image is easily detected and recognized by a computer system. The mark, found at a specific location, has attributes (large, round, square, oblong, long linear or any shape) that accommodate its detection as an alignment mark Logos are marks similar to alignment marks in their ease of detection and identification, and, as mentioned above, may be used to identify the type of form.
Partitioning a form into sectors allows for correction of curvature distortion by sizing the sectors. Smaller sectors may be relatively flat where curves in such a sector do not manifest to cause errors in reading marks in the sector.
Where a sector is defined by three non-colinear points, the following equations may represent a transfer function that corrects scaling, translation and rotation of marks within that sector:
x′=A′x+B′y+C′ Eq. 1, and
y′=D′x+E′y+F′ Eq. 2.
Once the six coefficients (A′, B′, C′, D′, E′, and F′) are derived for a specific captured image of the form, Equations 1 and 2 may be used to translate any location (x, y) in the model image to the corresponding coordinate (x′, y′) in the unread image of the form.
Where a sector is defined by four non-colinear points that define a four sided sector area, the following equations may represent a transfer function that corrects for scaling, translation, rotation and for perspective issues associated with a camera capturing the unread sector of a form:
Once the eight coefficients (A, B, C, D, E, F, G, and H) are derived for a specific unread image of the form, Equations 3 and 4 may be used to translate any location (x, y) in the model image to the corresponding coordinate (x′, y′) in the unread image of the form.
The coefficients of the above transfer function equations are found by comparing the actual x′, y′ locations of specific marks in the unread image to the corresponding x, y locations in the model image. In order to cover an area of the form, at least three non-colinear known alignment marks may be processed, however, four or more marks may be used to advantage. A system of equations result where the coefficients may be found by use of matrix algebra techniques as illustrated below.
In the following illustration, eight alignment marks are used to define a sector. According to this illustration, when eight alignment marks are used to define the sector, the following biquadratic transfer function equation (Equation 7) may be applied and correct for scaling, translation, rotation and perspective issues associated with a camera capturing the unread sector of a form:
After a form type is known and a transfer function is derived for every sector in the form, the same sectoring may be applied to the stored unread image and the transfer functions may be applied to the locations of the marks within every sector on the unread image. This results in corrected locations for the marks, if any, within each sector. The corrected locations of these other marks then may be compared to corresponding locations on the model image. The locations on the model image have stored meanings that determine the meanings of those other marks whose corrected locations match those of the model image.
In some applications, however the transfer function may be applied to areas immediately outside that area
If a sector includes other alignment marks or marks of known locations, those other marks may be used to calculate an error. The locations of those other marks on the stored unread image may be detected and their locations may be corrected by application of the transfer function. The corrected location may be compared to the actual location from the model image and an error may be calculated. An error threshold may be established, and if the error in any sector exceeds the threshold, the form may be rejected.
In other applications, other, closer alignment marks may be used to form yet another sector and another transfer function may be applied. This process may continue until there are no smaller sectors with acceptable errors, wherein the form may be rejected. If an acceptable error is formed for every sector in the form where a mark exists, the marked form may be accepted and may then be processed by the system.
It will be appreciated by those skilled in the art that although the following Detailed Description will proceed with reference being made to illustrative embodiments, the drawings, and the described methods of use, the present invention is not intended to be limited to these embodiments or methods of use. Rather, the present invention is of broad scope and is intended to be defined as only set forth in the accompanying claims.
The invention description below refers to the accompanying drawings, of which:
Memory 180 may include, at least, one or more image buffers, other buffers, cache, etc. An operating system and software applications may be stored in the memory 180. A processing application 13, discussed below, includes the processes for correcting or compensating for the curvature or distortion of a bent form. In one embodiment, an external, removable flash memory 19 may contain proprietary software, that is uploaded to the computer processor system 12. In this embodiment, removing the flash memory 19 removes the proprietary software from the computer processor system 12.
The computer network 17 may be a public network, such as the Internet, or a private network, etc., but in any case, information, such as, for example, financial information, may be encrypted to prevent outside interference and protection. In this example, information may be derived from the form and sent via the network 17 to a central controller 15. The central controller 15, in turn, verifies the financial information and authorizes agents to act accordingly.
In
The bend 20 in the form 2 produces at least a size error and a position error. If the form 2 is curved, curled or has multiple bends the resulting errors will be that much more difficult to accommodate.
To restate in more detail, the process illustrated in
When a transfer function has been determined for a sector, that function may be applied to other alignment marks in or near that sector. When the comparison is made of the corrected locations of alignment marks in the captured image to the locations of those marks in the model image, an error 35 may be calculated. An error threshold may be established for an error that can be tolerated, and if the error is within the threshold, the form may be processed further as discussed herein. If the error is too large other closer alignment marks may be used, as discussed herein, until an acceptable error is found. If an unacceptable error remains, the form may be rejected 46.
An acceptable error may be one that is smaller than the position error that an analyzing system assigns to an acceptable known location on the form. For example, the area where a mark may be made could be a square of 0.1 inches on a side. A position error of 0.05 inches may be an acceptable error.
If the errors are all acceptable 40, the transfer function for each sector is applied to all the marks within that sector 42, producing corrected locations for all the marks on the captured image 44. The meanings of all the marks, as mentioned above, are found 48 by reference to corresponding locations on the model image.
If the error remains unacceptable, smaller sectors may be successively employed 45 with other alignment marks until a transfer function results in acceptable error for marks in every section of the form. If acceptable errors are not found, the form may be rejected 46.
Illustratively, a form may be divided into triangular and rectangular sectors, but any figure encompassing an area may be used.
In other applications, acceptable errors may be determined by running sample or test forms until the rejection rates of the forms is acceptable. In some applications, acceptable error may be simply estimated.
The following describes a simplistic example illustrating an application of a linear correcting process.
Detection of marks of any kind on a form entails a contrast that allows the edges of the marks, and then characteristics or attributes of the marks to be found. Typically, every form type will have a logo, that is quite different in attributes so that it is easily found and recognized, if one is not found, the form type may be keyed in by an agent or the form rejected. Similarly, alignment marks are distinctive to ease detection.
There are known techniques for detecting edges or marks and for calculating attributes of marks, and are not further discussed herein.
In the embodiment of
If any errors are deemed too large, in some applications, additional alignment marks (for example, 54a′, 54b′, 54c′, 54d′) may be employed. If these eight alignment marks are used, the form may be divided into three sectors, 52, 53, and 55. A transfer function may be developed for each sector and any marks found within each sector would be corrected using the corresponding transfer function. Alignment marks, moreover, may be placed, where acceptable, within the central portion D of the form. As more sections are used, the processing of the form may take longer. Note, however, that if no other marks are in a sector, that sector need not be processed.
The Transfer Functions:
Restating from above, since a rectangular form, for example, is only a sheet of paper, it often will have distortions that might cause reading problems. Straight lines, etc. on the paper form will not necessarily be straight lines on the captured image. The template or model image of the form, however, will represent a flat, usually rectangle form with undistorted marks and lines. The present invention provides for non-linear transfer functions that compensate or correct for curvature distortions on the captured image.
As mentioned above, according to one or more embodiments of the present invention, each model image of a form may be partitioned into a number of sectors, some defined by three alignment marks, others by four alignment marks and yet others may be defined by more than four such marks.
Three Point Equations and Solution
If a sector is defined by three alignment marks, a transfer function that applies to the locations within the sector may be as follows:
x′=A′x+B′y+C′ Eq. 1, and
y′=D′x+E′y+F′ Eq. 2.
Once the six coefficients (A, B, C, D, E, and F) are derived for a specific captured image, Eqs. 1 and 2 may be applied to translate any location (x, y) on the model image to the corresponding coordinate (x′, y′) on the captured image.
The following discussion illustrates one way to solve these equations. Eqs. 1 and 2 may be arranged into matrix form as follows:
To Solve for A, B, and C:
To Solve for D, E, and F:
Because of the simplicity of the matrix, Cramer's Rule can be used to solve this easily. For example:
Four Point Equations and Solution
If a sector is defined by four alignment marks, a transfer function that may apply to the locations within the sector may be defined as follows:
Once the eight coefficients (A, B, C, D, E, F, G, and H) are derived for a specific captured image, Eqs. 3 and 4 can be used to translate any location (x, y) on the model image to the corresponding coordinate (x′, y′) in the captured image.
The following discussion illustrates one way to solve these equations. Eqs. 3 and 4 may be rearranged in more matrix-like form as follows:
A·x+B·y+C·1+D·0+E·0+F·0−G·x·x′−H·y·x′=x′ Eq. 5, and
A·0+B·0+C·0+D·x+E·y+F·1−G·x·y′−H·y·y′=y′ Eq. 6.
Eqs. 5 and 6, then, may be solved as a system of equations using Gaussian Elimination. According to Gaussian Elimination, assembly of the following 8×9 augmented matrix is required and upper triangulation and back substitution is applied:
Biquadratic Transformation Applied to Curvature Correction
When more than four alignment marks are used to define a sector, a transfer function that may apply to the locations within the sector may be defined by the following biquadratic equation, which represents a bi-quadratic transformation:
Where A″ and B″ are coefficients matrices of the transformation and can be expressed as two 1×8 matrices respectively:
And U is an 1×8 matrix, its transpose matrix, UT, is an 8×1 matrix. UT instead of U is defined below for clarity:
That means, un=un(x, y), with n=1, 2, . . . , 8, are functions of x and y.
This eight-point transfer function needs eight reference points to determine the coefficients matrices A″ and B″.
Assume one has eight reference points in the template or model image:
P1(x1,y1),P2(x2,y2),P3(x3,y3),P4(x4,y4),P5(x5,y5),P6(x6,y6),P7(x7,y7),P8(x8,y8)
And also eight corresponding points in the captured space:
P1′(x′1,y′1),P2′(x′2,y′2),P3′(x′3,y′3),P4′(x′4,y′4),P5′(x′5,y′5),P6′(x′6,y′6),P7′(x′7,y′7),P8′(x′8,y′8)
Substituting these eight points to Eq. 1, one has (for j=1, 2, . . . , 8):
Or in matrix form, the above two lines become:
X′=QA″,
Y′=QB″ Equation 8
Where matrices A and B are the same as above, and matrices X′, Y′, Q are defined below:
In Eq. 8, X′, Y′, Q are all known, but A and B are unknowns to be solved.
If matrix Q is singular, the above two linear systems given by Eq. 2 have no solution and one must select different 8 reference points than above.
If matrix Q is non-singular, one can solve the coefficient matrix A and B from Eq. 2 and obtain
A″=Q−1X′
B″=Q−1Y′ Equation 9
Where Q−1 is the inverse of matrix Q.
Substituting A and B into Eq. 1 leads to
x′=UA″=UQ−1X′
y′=UB″=UQ−1Y′ Equation 10
Here, x′j and y′j, with j=1, 2, . . . , 8, are known coordinates of the pre-selected eight reference points in the captured space. Q−1 is also known since it depends only on the coordinates (xj, yj) of the pre-selected eight reference points in the template or model image. For any given point (x, y) in the template, un(x, y), with n=1, 2, . . . , 8, can be calculated. Therefore, for any point (x, y) in the template, the corresponding point (x′, y′) of the captured space can be obtained from the above two equations.
Actually Q−1 can be computed offline to speed up the transformation. That means, we do not have to compute Q−1 for every pair of (x, y) to (x′, y′) transformation. It can be computed only once after the eight reference points in the template are selected.
It should be understood that above-described embodiments are being presented herein as examples and that many variations and alternatives thereof are possible. Accordingly, the present invention should be viewed broadly as being defined only as set forth in the hereinafter appended claims.
The present invention is a continuation-in-part of U.S. patent application Ser. No. 11/376,052, filed Mar. 14, 2006 now U.S. Pat. No. 7,920,299 and entitled SYSTEM AND METHOD FOR PROCESSING A FORM, that claims priority from U.S. Provisional Patent Application Ser. No. 60/661,698, filed on Mar. 14, 2005. These patent applications are of common ownership with the present invention, and they are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
4141036 | Diehl | Feb 1979 | A |
4240748 | Blanc et al. | Dec 1980 | A |
4724307 | Dutton et al. | Feb 1988 | A |
4736109 | Dvorzsak | Apr 1988 | A |
4760247 | Keane et al. | Jul 1988 | A |
4933778 | Tufano et al. | Jun 1990 | A |
5039847 | Morii et al. | Aug 1991 | A |
5103490 | McMillin | Apr 1992 | A |
5214470 | Denber | May 1993 | A |
5216595 | Protheroe | Jun 1993 | A |
5239165 | Novak | Aug 1993 | A |
5258605 | Metlitsky et al. | Nov 1993 | A |
5262624 | Koch | Nov 1993 | A |
5362105 | Scott | Nov 1994 | A |
5417424 | Snowden et al. | May 1995 | A |
5452379 | Poor | Sep 1995 | A |
5673125 | Merecki et al. | Sep 1997 | A |
5734153 | Swartz et al. | Mar 1998 | A |
5735094 | Zember | Apr 1998 | A |
5818026 | Melling et al. | Oct 1998 | A |
5821518 | Sussmeier et al. | Oct 1998 | A |
5834749 | Durbin | Nov 1998 | A |
5945655 | Gilgeous et al. | Aug 1999 | A |
6150930 | Cooper | Nov 2000 | A |
6157435 | Slater et al. | Dec 2000 | A |
6176429 | Reddersen et al. | Jan 2001 | B1 |
6199044 | Ackley et al. | Mar 2001 | B1 |
6223986 | Bobba et al. | May 2001 | B1 |
6234899 | Nulph | May 2001 | B1 |
6262670 | Ballou | Jul 2001 | B1 |
6289125 | Katoh et al. | Sep 2001 | B1 |
6340114 | Correa et al. | Jan 2002 | B1 |
6356365 | Oida et al. | Mar 2002 | B1 |
6357658 | Garczynski et al. | Mar 2002 | B1 |
6366696 | Hertz et al. | Apr 2002 | B1 |
6470099 | Dowdy et al. | Oct 2002 | B1 |
6494372 | Bruchlos et al. | Dec 2002 | B2 |
6650427 | Brooks et al. | Nov 2003 | B2 |
6722569 | Ehrhart et al. | Apr 2004 | B2 |
6736319 | Swanson et al. | May 2004 | B2 |
6760476 | Meder | Jul 2004 | B2 |
6776337 | Irwin, Jr. et al. | Aug 2004 | B2 |
6816630 | Werth et al. | Nov 2004 | B1 |
6875105 | Behm et al. | Apr 2005 | B1 |
6887153 | Walker et al. | May 2005 | B2 |
6929184 | Barkan | Aug 2005 | B2 |
6954290 | Braudaway et al. | Oct 2005 | B1 |
6971577 | Tsikos et al. | Dec 2005 | B2 |
7060968 | Leviton | Jun 2006 | B1 |
7070115 | DeBiase | Jul 2006 | B2 |
7090131 | Natsuno | Aug 2006 | B2 |
7124945 | Kim | Oct 2006 | B2 |
7206008 | Dejong et al. | Apr 2007 | B2 |
7247095 | Nulph | Jul 2007 | B2 |
7317557 | Pollard et al. | Jan 2008 | B2 |
7527206 | Zhu et al. | May 2009 | B2 |
7574047 | Cichielo et al. | Aug 2009 | B2 |
7635088 | Chung et al. | Dec 2009 | B2 |
7674171 | Walker et al. | Mar 2010 | B2 |
8117635 | Hendricks et al. | Feb 2012 | B2 |
20010025880 | Bruchlos et al. | Oct 2001 | A1 |
20010029513 | Kuwano et al. | Oct 2001 | A1 |
20020010022 | Vincent | Jan 2002 | A1 |
20020048403 | Guerreri | Apr 2002 | A1 |
20020109866 | Yang et al. | Aug 2002 | A1 |
20030102376 | Meier et al. | Jun 2003 | A1 |
20030173404 | Chung et al. | Sep 2003 | A1 |
20030186734 | LeMay et al. | Oct 2003 | A1 |
20040029630 | Walker et al. | Feb 2004 | A1 |
20040160652 | Kimura et al. | Aug 2004 | A1 |
20040209665 | Walker et al. | Oct 2004 | A1 |
20040218835 | Loew | Nov 2004 | A1 |
20050092841 | Barkan | May 2005 | A1 |
20050098633 | Poloniewicz et al. | May 2005 | A1 |
20050161511 | Parker et al. | Jul 2005 | A1 |
20050163385 | Thakur | Jul 2005 | A1 |
20050233797 | Gilmore et al. | Oct 2005 | A1 |
20050237580 | Coleman et al. | Oct 2005 | A1 |
20050238260 | Coleman et al. | Oct 2005 | A1 |
20060063589 | Chong | Mar 2006 | A1 |
20060079311 | Nulph | Apr 2006 | A1 |
20060122910 | Chau et al. | Jun 2006 | A1 |
20060152595 | Ryu et al. | Jul 2006 | A1 |
20060221354 | Slaten et al. | Oct 2006 | A1 |
20060255145 | Chung et al. | Nov 2006 | A1 |
20060290886 | Santos | Dec 2006 | A1 |
20060291004 | Dymetman | Dec 2006 | A1 |
20070109511 | Kelly et al. | May 2007 | A1 |
20080240614 | Garcia | Oct 2008 | A1 |
20090015883 | Kim | Jan 2009 | A1 |
20090020606 | Chung et al. | Jan 2009 | A1 |
20090021798 | Abahri | Jan 2009 | A1 |
20090051814 | Shirane et al. | Feb 2009 | A1 |
20090167960 | Miyasato | Jul 2009 | A1 |
20100060943 | Monga et al. | Mar 2010 | A1 |
Number | Date | Country |
---|---|---|
1 172 756 | Jan 2002 | EP |
1 441 315 | Jul 2004 | EP |
WO 0004487 | Jan 2000 | WO |
WO 0104571 | Jan 2001 | WO |
WO 2007114241 | Oct 2007 | WO |
Number | Date | Country | |
---|---|---|---|
20090074327 A1 | Mar 2009 | US |
Number | Date | Country | |
---|---|---|---|
60661698 | Mar 2005 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11376052 | Mar 2006 | US |
Child | 12323701 | US |