ALIGNING A DATA TABLE WITH A REFERENCE TABLE
First Claim
1. A method for aligning grid lines of an image of a table of a filled-out paper form with grid lines of an image of a table of a template of the filled-out paper form, the method comprising:
- generating, by a computer system, a thin feature image of a filled-out paper form by;
applying a median filter to an image of a filled-out paper form to generate a filtered image, wherein the applying of the median filter includes;
for each pixel of the image of the filled-out paper form;
selecting a plurality of pixels that have a pre-defined location relative to said each pixel,identifying a median pixel of a set of pixels comprised of the plurality of pixels and said each pixel, andgenerating the filtered image by replacing said each pixel with the median pixel, andsubtracting the filtered image of the filled-out paper form from the image of the filled-out paper form to generate the thin feature image,wherein the thin feature image includes grid lines of a table of the filled-out paper form;
straightening, by the computer system, the grid lines of the table by;
aligning the grid lines of the table with an X axis or a Y axis, the X axis being a horizontal axis and the Y axis being a vertical axis, by;
for each sub-block of a plurality of sub-blocks of the thin feature image;
calculating a plurality of Hough transforms for said each sub-block, each of the plurality of Hough transforms being calculated based on a different rotation of said each sub-block relative to the X axis or the Y axis,determining a dominant rotation relative to the X axis or the Y axis for said each sub-block based on the plurality of Hough transforms,calculating a transformation for said each sub-block based on the dominant rotation, wherein the transformation aligns lines in said each sub-block with the X axis or the Y axis, andapplying the transformation to generate a rotation aligned version of said each sub-block, andgenerating the rotation aligned version of the thin feature image based on the rotation aligned versions of the plurality of sub-blocks; and
scaling and shifting, by the computer system, the rotation aligned version of the thin feature image by;
determining a scale translation and a shift translation that maximizes a correlation between the grid lines of the table of the rotation aligned version of the thin feature image, and template grid lines of an image of a template table of a form template, andapplying the scale translation and the shift translation to the rotation aligned version of the thin feature image to generate a location aligned version of the thin feature image,wherein an alignment of the grid lines of the table of the location aligned version of the thin feature image with the template grid lines of the image of the template table facilitates a determination that the table and the template table are aligned.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods, apparatuses, and embodiments related to aligning an image of a table of a form with an image of a table of a template of the form. Automatically extracting data entered in fields of a table of a form by a user can be aided by matching the form with a template of the form. The form template can have a digitized representation that identifies locations of fields of the form, and that identifies labels of the fields. Matching the form with the form template can enable locations and labels of fields of the form to be identified based on the digitized representation. However, matching the form with the form template may require matching the table of the form with the table of the form template, and matching two tables can be challenging. For example, the tables can be rotated, warped, scaled, etc. relative to each other.
-
Citations
22 Claims
-
1. A method for aligning grid lines of an image of a table of a filled-out paper form with grid lines of an image of a table of a template of the filled-out paper form, the method comprising:
-
generating, by a computer system, a thin feature image of a filled-out paper form by; applying a median filter to an image of a filled-out paper form to generate a filtered image, wherein the applying of the median filter includes; for each pixel of the image of the filled-out paper form; selecting a plurality of pixels that have a pre-defined location relative to said each pixel, identifying a median pixel of a set of pixels comprised of the plurality of pixels and said each pixel, and generating the filtered image by replacing said each pixel with the median pixel, and subtracting the filtered image of the filled-out paper form from the image of the filled-out paper form to generate the thin feature image, wherein the thin feature image includes grid lines of a table of the filled-out paper form; straightening, by the computer system, the grid lines of the table by; aligning the grid lines of the table with an X axis or a Y axis, the X axis being a horizontal axis and the Y axis being a vertical axis, by; for each sub-block of a plurality of sub-blocks of the thin feature image; calculating a plurality of Hough transforms for said each sub-block, each of the plurality of Hough transforms being calculated based on a different rotation of said each sub-block relative to the X axis or the Y axis, determining a dominant rotation relative to the X axis or the Y axis for said each sub-block based on the plurality of Hough transforms, calculating a transformation for said each sub-block based on the dominant rotation, wherein the transformation aligns lines in said each sub-block with the X axis or the Y axis, and applying the transformation to generate a rotation aligned version of said each sub-block, and generating the rotation aligned version of the thin feature image based on the rotation aligned versions of the plurality of sub-blocks; and scaling and shifting, by the computer system, the rotation aligned version of the thin feature image by; determining a scale translation and a shift translation that maximizes a correlation between the grid lines of the table of the rotation aligned version of the thin feature image, and template grid lines of an image of a template table of a form template, and applying the scale translation and the shift translation to the rotation aligned version of the thin feature image to generate a location aligned version of the thin feature image, wherein an alignment of the grid lines of the table of the location aligned version of the thin feature image with the template grid lines of the image of the template table facilitates a determination that the table and the template table are aligned. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method comprising:
-
filtering, by a computer system, an image of a form to create a thin feature image of the form, wherein the thin feature image includes first grid lines of a table of the form; transforming, by the computer system, the thin feature image of the form to create a rotation aligned version of the thin feature image that includes second grid lines, wherein the second grid lines have improved alignment, relative to the first grid lines, to an X axis or a Y axis, wherein the second grid lines have improved linearity relative to the first grid lines, and wherein the X axis is orthogonal to the Y axis; and applying, by the computer system, a scale translation or a shift translation to the rotation aligned version of the thin feature image to generate a location aligned version of the thin feature image that includes third grid lines, wherein alignment of the third grid lines with template grid lines of a template table of an image of a form template is improved relative to alignment of the second grid lines with the template grid lines. - View Dependent Claims (7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19)
-
-
12. The method of claim 12, wherein the warping model is a polynomial warping model.
-
20. A computer system comprising:
-
a processor; a networking interface coupled to the processor; and a memory coupled to the processor and storing instructions which, when executed by the processor, cause the computer system to perform operations including; receiving an image of a form and an image of a form template; generating a thin feature image of the form based on the image of the form, wherein the thin feature image includes first grid lines of a table of the form, wherein, when the image of the form includes a step-edge, the thin feature image does not include the step-edge, and wherein the step-edge is an edge between two constant regions of the image of the form; and transforming the thin feature image of the form to create a rotation aligned version of the thin feature image that includes second grid lines, wherein the second grid lines have improved alignment, relative to the first grid lines, to an X axis or a Y axis, wherein the second grid lines have improved linearity relative to the first grid lines, and wherein the X axis is orthogonal to the Y axis - View Dependent Claims (21, 22)
-
Specification