Image box filtering for optical character recognition
AssigneeOpen Text Corporation
InventorsArnaud G. Flament, Guillaume B. Koch
Life of this patent
Estimating the term…
Abstract
A method for box filtering includes obtaining, by a computing device, a form image, and identifying, by the computing device, a region of the form image that includes boxes. Vertical lines in the region of the form image are detected. The boxes in the region are detected according to the plurality of vertical lines, and image content is extracted from the boxes.
Claims18
A computer program product comprising a non-transitory computer readable medium storing therein a set of computer-readable instructions, the set of computer-readable instructions comprising instructions for:
- receiving a form template input, the form template input comprising a definition of a first region of a form and specifying a first set of box removal parameters for the first region;
- storing a form template for the form, the form template identifying the first region and including the first set of box removal parameters for the first region;
- obtaining a form image that is an image of an instance of the form containing written information;
- preprocessing the form image using the form template to generate a preprocessed form, the instructions for preprocessing the form further comprising instructions for:
- detecting a first box in the first region of the form image according to the first set of box removal parameters, detecting the first box in the first region of the form image comprising:
- projecting a set of pixels in the first region onto a vertical axis to determine a first vertical axis projection, the first vertical axis projection comprising a first set of combined values, each combined value in the first set of combined values representing a number of pixels in at least one row that meet a criteria;
- identifying a first peak in the first vertical axis projection;
- identifying a second peak in the first vertical axis projection;
- and
- detecting a first bottom based on the first peak and a first top based on the second peak;
- and
- extracting first image contents from the first box, wherein extracting the first image contents comprises filtering out the first box;
- and
- performing optical character recognition on the preprocessed form to generate a text recognized form containing first character content determined from the first image contents.
A method for processing electronic forms comprising:
- receiving, by a processor, a form template input, the form template input comprising a definition of a first region of a form and specifying a first set of box removal parameters for the first region;
- storing a form template for the form in a computer memory, the form template identifying the first region and including the first set of box removal parameters for the first region;
- obtaining, by a processor, a form image that is an image of an instance of the form containing written information;
- preprocessing, by the processor, the form image using the form template to generate a preprocessed form, preprocessing the form further comprising:
- detecting a first box in the first region of the form image according to the first set of box removal parameters, detecting the first box in the first region of the form image comprising:
- projecting the set of pixels in the first region onto a horizontal axis to determine a horizontal axis projection, the horizontal axis projection comprising a second set of combined values, each combined value in the second set of combined values representing a number of corresponding pixels in at least one column that meet the criteria;
- identifying a set of peaks in the horizontal axis projection;
- identifying one or more pairs of adjacent peaks from the set of peaks in the horizontal axis projection;
- identifying a set of sub-regions of the first region, each sub-region in the set of sub-regions falling between a corresponding pair of adjacent peaks from the one or more pairs of adjacent peaks;
- and
- removing any sub-regions not having a top line and a bottom line from the set of sub-regions to determine a box set of possible boxes;
- and
- extracting first image contents from the first box, wherein extracting the first image contents comprises filtering out the first box;
- and
- performing, by the processor, optical character recognition on the preprocessed form to generate a text recognized form containing first character content determined from the first image contents.
Dependencies are inferred from the claim text.