Line removal from an image
AssigneeCapital One Services, LLC
InventorsSaumya Gupta, Arpit Dubey
Life of this patent
Estimating the term…
Abstract
In some implementations, a device may process an image to identify one or more first lines of the image that extend in a first dimension. The device may process the image to identify one or more second lines of the image that extend in a second dimension orthogonal to the first dimension. The device may identify portions of the one or more first lines that do not intersect with the one or more second lines. The device may process the image to obtain a version of the image in which the portions of the one or more first lines are removed.
Claims19
A system for line removal from an image, the system comprising:
- one or more memories;
- and
- one or more processors, coupled to the one or more memories, configured to:
- process the image using a first bounding box by scanning the image along a first dimension in increments corresponding to a width of the first bounding box to identify one or more first lines of the image that extend in the first dimension;
- process the image using a second bounding box by scanning the image along a second dimension, orthogonal to the first dimension, in increments corresponding to a height of the second bounding box to identify one or more second lines of the image that extend in the second dimension,
- wherein a size of the first bounding box in the first dimension is greater than a size of the second bounding box in the second dimension,
- wherein a first line of the one or more first lines is identified when a continuous sequence of pixels in the first dimension satisfies a first threshold quantity of pixels set to include a width of a particular number of textual characters, and
- wherein a second line of the one or more second lines is identified when a continuous sequence of pixels in the second dimension satisfies a second threshold quantity of pixels set to include at most a height of one textual character;
- adjust the first threshold quantity of pixels and the second threshold quantity of pixels based on a font of textual characters in the image;
- generate, based on the one or more first lines and the one or more second lines, information that identifies portions of the one or more first lines that do not intersect with the one or more second lines;
- process the image, based on the information, to obtain a version of the image in which the portions of the one or more first lines are removed to improve an accuracy of the version of the image;
- and
- perform optical character recognition on the version of the image in which the portions of the one or more first lines are removed.
A method for line removal from an image, comprising:
- identifying, by a device, a size and a font of textual characters in the image;
- determining, by the device and based on the size of the textual characters, a first threshold quantity of pixels consecutive in a first dimension and a second threshold quantity of pixels consecutive in a second dimension, wherein the first threshold quantity of pixels is greater than the second threshold quantity of pixels;
- adjusting, by the device, the first threshold quantity of pixels and the second threshold quantity of pixels based on the font of the textual characters;
- processing, by the device and based on the first threshold quantity of pixels, the image using a first bounding box to identify one or more first lines of the image that extend in the first dimension, the first bounding box comprising a first quantity of pixels in the first dimension and a second quantity of pixels in the second dimension;
- processing, by the device and based on the second threshold quantity of pixels, the image using a second bounding box to identify one or more second lines of the image, the second bounding box comprising a quantity of pixels in the second dimension that is greater than the second quantity of pixels associated with the first bounding box, wherein a size of the first bounding box in the first dimension is five times greater or ten times greater than the size of the second bounding box in the second dimension;
- processing, by the device, the image to remove portions of the one or more first lines from the image that do not intersect with the one or more second lines to improve an accuracy of a version of the image;
- and
- performing optical character recognition on the version of the image in which the portions of the one or more first lines are removed.
A non-transitory computer-readable medium storing a set of instructions for line removal from an image, the set of instructions comprising:
- one or more instructions that, when executed by one or more processors of a device, cause the device to:
- identify a size and a font of textual characters in the image;
- determine, based on the size of the textual characters, a first threshold quantity of pixels consecutive in a first dimension and a second threshold quantity of pixels consecutive in a second dimension, wherein the first threshold quantity of pixels is greater than the second threshold quantity of pixels;
- adjust the first threshold quantity of pixels and the second threshold quantity of pixels based on the font of the textual characters;
- process the image, using a first kernel and based on the first threshold quantity of pixels, to generate first information that identifies one or more first lines of the image that extend in the first dimension, wherein generating the first information includes scanning the image along the first dimension in increments corresponding to a width of the first kernel;
- process the image, using a second kernel and based on the second threshold quantity of pixels, to generate second information that identifies one or more second lines of the image, wherein a quantity of rows of the second kernel is greater than a quantity of rows of the first kernel, and wherein generating the second information includes scanning the image along the second dimension in increments corresponding to the second kernel;
- generate, based on the first information and the second information, information that identifies portions of the one or more first lines that do not intersect with the one or more second lines;
- process, based on the information that identifies the portions of the one or more first lines, the image to obtain a version of the image in which portions of the one or more first lines are removed to improve an accuracy of the version of the image;
- and
- perform optical character recognition on the version of the image in which the portions of the one or more first lines are removed.
Dependencies are inferred from the claim text.