IP Library Granted Patent US 10,726,557
Granted Patent B2
US 10,726,557 · App. 16/589,124 · Granted Jul 28, 2020

Method and system for preparing text images for optical-character recognition

Inventors: Olga Arnoldova Kacher (Moscow, RU); Ivan Germanovich Zagaynov (Moscow Region, RU); Vladimir Rybkin (Moscow, RU)
Assignee: ABBYY Production LLC
G06T7/11G06K9/18G06K9/228G06K9/325G06K9/4604G06K9/4652G06T3/0037G06T5/20G06T7/12G06K2209/01G06T2207/10024G06T2207/20116
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,726,557
App. No.
16/589,124
Granted
Jul 28, 2020
Kind
B2
Abstract

The current document is directed to methods and systems that acquire an image containing text with curved text lines to generate a corresponding corrected image in which the text lines are straightened and have a rectilinear organization. The method may include identifying a page sub-image within the text-containing image, generating a text-line-curvature model for the page sub-image that associates inclination angles with pixels in the page sub-image, generating local displacements, using the text-line-curvature model, for pixels in the page sub-image, and transferring pixels from the page sub-image to a corrected page-sub-image using the local displacements to construct a corrected page sub-image in which the text lines are straightened and in which the text characters and symbols have a rectilinear arrangement.

Claims (75)

1. An image-processing subsystem included within a device, appliance, or system that acquires a text-containing image containing text with curved text lines to generate a corresponding corrected image in which the text lines are straightened and have a rectilinear organization, the image-processing subsystem comprising:

one or more memories; and

one or more processors, coupled to the one or more memories, to:

identify a page sub-image within the text-containing image,

generate a text-line-curvature model for the page sub-image that associates inclination angles with pixels in the page sub-image,

generate local displacements, using the text-line-curvature model, for pixels in the page sub-image, and

transfer pixels from the page sub-image to a corrected page-sub-image using the local displacements to construct a corrected page sub-image in which the text lines are straightened and in which the text characters and symbols have a rectilinear arrangement.

2. The image-processing subsystem of claim 1 wherein to identify a page sub-image within the text-containing image, the one or more processors to:

identify intensity edges within the text-containing image; and

use the identified intensity edges along with known geometrical constraints associated with text-containing pages to identify the sub-images corresponding to one or more text-containing pages in the text-containing image.

3. The image-processing subsystem of claim 1 wherein the one or more processors are further to correct a vertical perspective of the page sub-image by:

rotating the page sub-image so that the spine edge of the page adjacent to the spine of the book has a vertical orientation;

when a non-spine-adjacent edge is contained in the page sub-image,

adjusting the image so that the non-spine-adjacent edge also has a vertical orientation; and

when the non-spine-adjacent edge is not contained in the page sub-image, correcting the vertical perspective of the page sub-image by another method.

4. The image-processing subsystem of claim 1 wherein to generate a text-line-curvature model for the page sub-image, the one or more processors to:

block fragments within the page sub-image, each fragment associated with an inclination angle;

use the inclination angles associated with the fragments to determine coefficients for a polynomial representation of an initial text-line-curvature model; and

refine the initial text-line-curvature model to produce a final text-line-curvature model.

5. The image-processing subsystem of claim 4 wherein to block fragments within the page sub-image, the one or more processors to:

identify fragments in the page sub-image that comprise aggregations of characters and/or symbols that correspond to words, word fragments, and/or fragments of multiple words; and

for each fragment,

identify the centroid of the fragment, and

employ a minimization method that minimizes the distance between pixels of each fragment and a line through the centroid to determine and associate an inclination angle with the fragment that is an angle between a principle axis of the fragment and a horizontal direction.

6. The image-processing subsystem of claim 5 wherein to identify fragments in the page sub-image, the one or more processors to:

select seed character pixels within the page image;

alternately expand each seed character pixel into a blob of contiguous character pixels, and

search for new seed character pixels within a maximum distance of the blob of contiguous character pixels.

7. The image-processing subsystem of claim 5 wherein, when the text image includes darker characters on a brighter background, a character pixel has an intensity lower than a threshold value; and

wherein, when the text image includes lighter characters on a darker background, a character pixel has an intensity greater than a threshold value.

8. The image-processing subsystem of claim 4 wherein, after blocking fragments within the page sub-image, the one or more processors are to filter the blocked fragments by inclination angle and dimension to select a best set of blocked fragments for determining coefficients for the polynomial representation of the initial text-line-curvature model.

9. The image-processing subsystem of claim 4 wherein to use the inclination angles associated with the fragments to determine coefficients for the polynomial representation of the initial text-line-curvature model, the one or more processors to:

initialize the values of a set of coefficients for the initial polynomial representation of the text-line-curvature model; and

use a data-fitting method to determine the coefficients for the initial polynomial representation of the text-line-curvature model from the inclination angles associated with the fragments.

10. The image-processing subsystem of claim 9 wherein the one or more processors further to:

filter the blocked fragments for correspondence of the inclination angles associated with each blocked fragment with the inclination angles determined for the pixels of the blocked fragment using the initial polynomial representation of the text-line-curvature model; and

when filtering the blocked fragments removes more than a threshold number of blocked fragments,

regenerate coefficients for the initial polynomial representation of the text-line-curvature model by application of a data-fitting method.

11. The image-processing subsystem of claim 4 wherein to refine the initial text-line-curvature model to produce a final text-line-curvature model, the one or more processors to:

apply closing, opening, and vertical smoothing operations to the page sub-image to generate filled contours corresponding to the text lines in the page sub-image;

construct curved text-line segments within the filled contours about the text lines using inclination angles generated by the polynomial representation of the text-line-curvature model; and

use points and associated angles of inclination along the constructed curved text-line segments as data for application of a data-fitting method to generate refined coefficients for the polynomial representation of the text-line-curvature model.

12. The image-processing subsystem of claim 11 wherein to construct curved text-line segments within the filled contours about the text lines using inclination angles generated by the polynomial representation of the text-line-curvature model, the one or more processors to:

for each blocked fragment in the page sub-image,

select, as a starting point, a pixel corresponding to the centroid of the blocked fragment within the filled contour corresponding to the text line; and

construct a curved text-line segment in two directions from the starting point by iteratively adding segment portions to the current ends of the curved text-line segment until no further segment portions can be added.

13. The image-processing subsystem of claim 12 wherein the one or more processors are further to attempt to construct, from each starting point, a first segment portion in the direction of an inclination angle obtained from the polynomial representation of the text-line-curvature model for the starting point and a second segment portion in a direction equal to the direction of the inclination angle plus 180°, the starting point representing two current curved text-line-segment endpoints.

14. The image-processing subsystem of claim 12 wherein to add a segment portion to a current curved text-line-segment endpoint, the one or more processors to:

determine an inclination angle using the polynomial representation of the text-line-curvature model for a pixel corresponding to the current curved text-line-segment endpoint;

construct an initial vector from current curved text-line-segment endpoint a direction equal to the determined inclination angle;

consider a vertical neighborhood of pixels coincident with a head of the initial vector;

when a pixel in the vertical neighborhood has an intensity value more representative of an intensity expected for text pixels than a subset of the remaining pixels in the vertical neighborhood,

reconfigure the initial vector, when necessary, to produce a final vector having a head coincident with the pixel having an intensity value more representative of the expected intensity, and

extend the curved text-line-segment to the pixel coincident with the head of the final vector; and

when no pixel in the vertical neighborhood has an intensity value more representative of an intensity expected for text pixels than a subset of the remaining pixels in the vertical neighborhood, terminate the curved text-line-segment at the current curved text-line-segment endpoint.

15. The image-processing subsystem of claim 1 wherein the text-line-curvature model is to return a tangent of an inclination angle when called with arguments representing the location of a pixel within the page sub-image.

16. The image-processing subsystem of claim 1 wherein to generate local displacements, using the text-line-curvature model, for pixels in the page sub-image from the text-line-curvature model, the one or more processors to:

generate an inclination-angle map that includes an inclination angle for each pixel of the page sub-image produced by input of a position of the pixel within the page sub-image to the final text-line-curvature model;

modify the inclination angles in a vertical region of the angle map by multiplication by a coefficient that adjusts the inclination angles for increased curvature and compression in corresponding vertical region of the page sub-image; and

generate an offset map that includes a local displacement for each offset-map cell in the page sub-image.

17. The image-processing subsystem of claim 16 wherein to generate a local displacement for a cell in the offset map, the one or more processors to:

determine a value for a vertical displacement as a compression coefficient multiplied by a cell width times the tangent of the inclination angle obtained from the final text-line-curvature model;

set a value for a horizontal displacement to the compression coefficient; and associate the vertical displacement and the horizontal displacement with the cell.

18. The image-processing subsystem of claim 17 wherein the compression coefficient for a cell is computed as a fraction equal to a cell width divided by a pixel width times one of the cosine of the difference between inclination angles for cells at the top and bottom of a vertical cell column spanning the page image and coincident with the cell and 0.4.

19. The image-processing subsystem of claim 1 wherein to transfer pixels from the page sub-image to a corrected page sub-image using pixel displacements generated from the local displacements, the one or more processors to:

identify pairs of corresponding anchor points in the page sub-image and the corrected page sub image;

transfer the intensity value of pixels corresponding to the anchor points in the page sub-image to pixels corresponding to pixels corresponding to the anchor points in the corrected page sub-image; and

for each non-anchor-point pixel in the page sub-image,

sum the local displacements coincident with a vector from the non-anchor-point pixel to a nearby anchor point to produce a pixel displacement, and

transfer the intensity value of the non-anchor-point pixel to a pixel displaced from a corresponding anchor point in the corrected page sub-image by the pixel displacement.

20. A method carried out by an image-processing subsystem included within a device, appliance, or system that acquires a text-containing image containing text with curved text lines to generate a corresponding corrected image in which the text lines are straightened and have a rectilinear organization, the method comprising:

identifying a page sub-image within the text-containing image;

generating a text-line-curvature model for the page sub-image that associates inclination angles with pixels in the page sub-image;

generating local displacements, using the text-line-curvature model, for pixels in the page sub-image; and

transferring pixels from the page sub-image to a corrected page-sub-image using the local displacements to construct, in a memory, the corrected page sub-image in which the text lines are straightened and in which the text characters and symbols have a rectilinear arrangement.

Assignments (4)
SECURITY INTEREST Recorded Aug 14, 2023
From: ABBYY INC.; ABBYY USA SOFTWARE HOUSE INC.; ABBYY DEVELOPMENT INC.
To: WELLS FARGO BANK, NATIONAL ASSOCIATION, AS AGENT
Reel/Frame 064730/0964 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 25, 2022
From: ABBYY PRODUCTION LLC
To: ABBYY DEVELOPMENT INC.
Reel/Frame 059249/0873 →
MERGER Recorded Mar 9, 2020
From: ABBYY DEVELOPMENT LLC
To: ABBYY PRODUCTION LLC
Reel/Frame 052052/0280 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 4, 2020
From: KACHER, OLGA ARNOLDOVNA; ZAGAYNOV, IVAN GERMANOVICH; RYBKIN, VLADIMIR
To: ABBYY DEVELOPMENT LLC
Reel/Frame 052009/0675 →