IP Library Granted Patent US 10,140,691
Granted Patent B2
US 10,140,691 · App. 15/157,688 · Granted Nov 27, 2018

Correcting perspective distortion in double-page spread images

Inventor: Ivan Germanovich Zagaynov (Moscow Region, RU)
Assignee: ABBYY Development LLC
G06T5/005G06T7/0085G06T2207/10004
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,140,691
App. No.
15/157,688
Granted
Nov 27, 2018
Kind
B2
Abstract

A distortion correction component of a mobile device receives an image of a spread open multi-page document, determines a binding edge line of the spread open multi-page document, determines a first set of substantially vertical straight lines lying left of the binding edge line and a second set of substantially vertical straight lines lying right of the binding edge line. The distortion correction component then determines a first vanishing point based on the first set of substantially vertical straight lines and a second vanishing point based on the second set of substantially vertical straight lines. A first quadrangle is determined based on the first vanishing point and a second quadrangle is determined based on the second vanishing point. A corrected image for the first page is generated based on the first quadrangle and a corrected image for the second page is generated based on the second quadrangle.

Claims (194)

1. A method comprising:

receiving, by a processing device, an image of a spread open multi-page document;

determining a binding edge line of the spread open multi-page document, wherein the binding edge line comprises a first substantially vertical straight line associated with a joining of two pages of the spread open multi-page document;

determining a first additional set of substantially vertical straight lines lying left of the binding edge line in the image of the spread open multi-page document, and a second additional set of substantially vertical straight lines lying right of the binding edge line in the image of the spread open multi-page document;

determining a first vanishing point based on the first additional set of substantially vertical straight lines and the binding edge line, and a second vanishing point based on the second additional set of substantially vertical straight lines and the binding edge line;

determining a first quadrangle based on the binding edge line and the first vanishing point and a second quadrangle based on the binding edge line and the second vanishing point, wherein the first quadrangle corresponds to a first page of the spread open multi-page document, the second quadrangle corresponds to a second page of the spread open multi-page document, and the first quadrangle and the second quadrangle neighboring each other at the binding edge line; and

generating a corrected image of the first page by reducing a first distortion of the first quadrangle based on a geometric characteristic of the first quadrangle, and a second corrected image of the second page by reducing a second distortion of the second quadrangle based on a geometric characteristic of the second quadrangle.

2. The method of claim 1 , further comprising:

transforming the image by performing at least one of a color to grayscale conversion, reducing a size of the image, or a mathematical morphological operation.

3. The method of claim 1 , wherein the first distortion is different than the second distortion.

4. The method of claim 1 , wherein determining the binding edge line comprises:

transforming the image to a grayscale image by performing a color to grayscale conversion;

applying an unsharp mask to the grayscale image;

transforming the grayscale image to a binarized image by performing a binarization operation on the grayscale image;

transforming the binarized image to a downsampled image by reducing a size of the binarized image to a predetermined size;

transforming the downsampled image into a modified image by performing at least one morphological operation on the downsampled image;

determining a set of values corresponding to pixels in the modified image

generating a set of transformed values by applying a transform to the set of values;

determining at least one of the set of transformed values that meets a threshold value; and

identifying the binding edge line in the modified image using the at least one of the set of transformed values.

5. The method of claim 1 , wherein determining the first additional set of substantially vertical straight lines comprises:

identifying, in the image of the spread open multi-page document, an edge of an array of pixels lying left of the binding edge line in view of a change in brightness between pixels in the image; and

identifying at least one line of the first additional set of substantially vertical straight lines based on the edge of the array of pixels.

6. The method of claim 1 , wherein determining the first additional set of substantially vertical straight lines comprises:

determining a set of values corresponding to pixels in the image;

generating a set of transformed values by applying a transform to the set of values;

determining at least one of the set of transformed values meets a threshold value; and

identifying at least one line in the image using the at least one of the set of transformed values.

7. The method of claim 1 , wherein determining the first vanishing point comprises:

determining a set of values corresponding to pixels in the image;

generating a set of transformed values by applying a transform to the set of values;

identifying a first cluster of the set of transformed values, wherein the first cluster comprises transformed values that correspond to the binding edge line;

identifying a second cluster of the set of transformed values, wherein the second cluster comprises transformed values that correspond to substantially vertical straight lines lying to the left of the binding edge line;

generating a ray for the second cluster of transformed values; and

determining the first vanishing point based on the ray.

8. The method of claim 7 , wherein generating the ray comprises performing at least one of a method of least squares operation or a random sample consensus operation.

9. The method of claim 1 , wherein determining the second vanishing point comprises:

determining a set of values corresponding to pixels in the image;

generating a set of transformed values by applying a transform to the set of values;

identifying a first cluster of the set of transformed values, wherein the first cluster comprises transformed values that correspond to the binding edge line;

identifying a second cluster of the set of transformed values, wherein the second cluster comprises transformed values that correspond to substantially vertical straight lines lying to the right of the binding edge line;

generating a ray for the second cluster of transformed values; and

determining the second vanishing point based on the ray.

10. The method of claim 9 , wherein generating the ray comprises performing at least one of a method of least squares operation or a random sample consensus operation.

11. The method of claim 1 , wherein determining the first quadrangle comprises:

determining a left midpoint of the image, wherein the left midpoint comprises a pixel position at the center of a left edge of the image;

determining a left line intersecting the left midpoint of the image and the first vanishing point;

determining a left top normal line connecting the binding edge line and the left line, wherein the left top normal line is perpendicular to the binding edge line, and wherein the left top normal line is positioned to avoid losing any pixels of the image; and

determining a left bottom normal line connecting the binding edge line and the left line, wherein the left bottom normal line is perpendicular to the binding edge line, and wherein the left bottom normal line is positioned to avoid losing any pixels of the image.

12. The method of claim 1 , wherein determining the second quadrangle comprises:

determining a right midpoint if the image, wherein the right midpoint comprises a pixel position at the center of a right edge of the image;

determining a right line intersecting the right midpoint of the image and the second vanishing point;

determining a right top normal line connecting the binding edge line and the right line, wherein the right top normal line is perpendicular to the binding edge line, and wherein the right top normal line is positioned to avoid losing any pixels of the image; and

determining a right bottom normal line connecting the binding edge line and the right line, wherein the second normal line is perpendicular to the binding edge line, and wherein the right bottom normal line is positioned to avoid losing any pixels of the image.

13. The method of claim 1 , wherein generating the corrected image of the first page comprises:

determining a first set of coordinates in the image, wherein the first set of coordinates comprises coordinates for each of the corners in the first quadrangle;

determining a first proportion of the corrected image, wherein the first proportion comprises parameters for constructing a rectangle;

determining a second set of coordinates for the corrected image by applying the first proportion to the first set of coordinates, wherein the second set of coordinates comprises coordinates for each of the corners in the rectangle for the corrected image; and

transforming information from the first quadrangle into the rectangle by performing a coordinate conversion.

14. The method of claim 1 , wherein generating the corrected image of the second page comprises:

determining a first set of coordinates in the image, wherein the first set of coordinates comprises coordinates for each of the corners in the second quadrangle;

determining a first proportion of the corrected image, wherein the first proportion comprises parameters for constructing a rectangle;

determining a second set of coordinates for the corrected image by applying the first proportion to the first set of coordinates, wherein the second set of coordinates comprises coordinates for each of the corners in the rectangle for the corrected image; and

transforming information from the second quadrangle into the rectangle by performing a coordinate conversion.

15. A computing apparatus comprising:

a memory to store instructions; and

a processing device, operatively coupled to the memory, to execute the instructions, wherein the processing device is to:

receive, by the processing device, an image of a spread open multi-page document;

determine a binding edge line of the spread open multi-page document, wherein the binding edge line comprises a first substantially vertical straight line associated with a joining of two pages of the spread open multi-page document;

determine a first additional set of substantially vertical straight lines lying left of the binding edge line in the image of the spread open multi-page document, and a second additional set of substantially vertical straight lines lying right of the binding edge line in the image of the spread open multi-page document;

determine a first vanishing point based on the first additional set of substantially vertical straight lines and the binding edge line, and a second vanishing point based on the second additional set of substantially vertical straight lines and the binding edge line;

determine a first quadrangle based on the binding edge line and the first vanishing point and a second quadrangle based on the binding edge line and the second vanishing point, wherein the first quadrangle corresponds to a first page of the spread open multi-page document, the second quadrangle corresponds to a second page of the spread open multi-page document, and the first quadrangle and the second quadrangle neighboring each other at the binding edge line; and

generate a corrected image of the first page by reducing a first distortion of the first quadrangle based on a geometric characteristic of the first quadrangle, and a second corrected image of the second page by reducing a second distortion of the second quadrangle based on a geometric characteristic of the second quadrangle.

16. The computing apparatus of claim 15 , wherein the processing device is further to:

transform the image by performing at least one of a color to grayscale conversion, reducing a size of the image, or a mathematical morphological operation.

17. The computing apparatus of claim 15 , wherein the first distortion is different than the second distortion.

18. The computing apparatus of claim 15 , wherein to determine the binding edge line, the processing device is to:

transform the image to a grayscale image by performing a color to grayscale conversion;

apply an unsharp mask to the grayscale image;

transform the grayscale image to a binarized image by performing a binarization operation on the grayscale image;

transform the binarized image to a downsampled image by reducing a size of the binarized image to a predetermined size;

transform the downsampled image into a modified image by performing at least one morphological operation on the downsampled image;

determine a set of values corresponding to pixels in the modified image

generate a set of transformed values by applying a transform to the set of values;

determine at least one of the set of transformed values that meets a threshold value; and

identify the binding edge line in the modified image using the at least one of the set of transformed values.

19. The computing apparatus of claim 15 , wherein to determine the first additional set of substantially vertical straight lines, the processing device is to:

identify, in the image of the spread open multi-page document, an edge of an array of pixels lying left of the binding edge line in view of a change in brightness between pixels in the image; and

identify at least one line of the first additional set of substantially vertical straight lines based on the edge of the array of pixels.

20. The computing apparatus of claim 15 , wherein to determine the first additional set of substantially vertical straight lines, the processing device is to:

determine a set of values corresponding to pixels in the image;

generate a set of transformed values by applying a transform to the set of values;

determine at least one of the set of transformed values meets a threshold value; and

identify at least one line in the image using the at least one of the set of transformed values.

21. The computing apparatus of claim 15 , wherein to determine the first vanishing point, the processing device is to:

determine a set of values corresponding to pixels in the image;

generate a set of transformed values by applying a transform to the set of values;

identify a first cluster of the set of transformed values, wherein the first cluster comprises transformed values that correspond to the binding edge line;

identify a second cluster of the set of transformed values, wherein the second cluster comprises transformed values that correspond to substantially vertical straight lines lying to the left of the binding edge line;

generate a ray for the second cluster of transformed values; and

determine the first vanishing point based on the ray.

22. The computing apparatus of claim 21 , wherein to generate the ray, the processing device is to perform at least one of a method of least squares operation or a random sample consensus operation.

23. The computing apparatus of claim 15 , wherein to determine the second vanishing point, the processing device is to:

determine a set of values corresponding to pixels in the image;

generate a set of transformed values by applying a transform to the set of values;

identify a first cluster of the set of transformed values, wherein the first cluster comprises transformed values that correspond to the binding edge line;

identify a second cluster of the set of transformed values, wherein the second cluster comprises transformed values that correspond to substantially vertical straight lines lying to the right of the binding edge line;

generate a ray for the second cluster of transformed values; and

determine the second vanishing point based on the ray.

24. The computing apparatus of claim 23 , wherein to generate the ray, the processing device is to perform at least one of a method of least squares operation or a random sample consensus operation.

25. The computing apparatus of claim 15 , wherein to determine the first quadrangle, the processing device is to:

determine a left midpoint of the image, wherein the left midpoint comprises a pixel position at the center of a left edge of the image;

determine a left line intersecting the left midpoint of the image and the first vanishing point;

determine a left top normal line connecting the binding edge line and the left line, wherein the left top normal line is perpendicular to the binding edge line, and wherein the left top normal line is positioned to avoid losing any pixels of the image; and

determine a left bottom normal line connecting the binding edge line and the left line, wherein the left bottom normal line is perpendicular to the binding edge line, and wherein the left bottom normal line is positioned to avoid losing any pixels of the image.

26. The computing apparatus of claim 15 , wherein to determine the second quadrangle, the processing device is to:

determine a right midpoint if the image, wherein the right midpoint comprises a pixel position at the center of a right edge of the image;

determine a right line intersecting the right midpoint of the image and the second vanishing point;

determine a right top normal line connecting the binding edge line and the right line, wherein the right top normal line is perpendicular to the binding edge line, and wherein the right top normal line is positioned to avoid losing any pixels of the image; and

determine a right bottom normal line connecting the binding edge line and the right line, wherein the second normal line is perpendicular to the binding edge line, and wherein the right bottom normal line is positioned to avoid losing any pixels of the image.

27. The computing apparatus of claim 15 , wherein to determine the corrected image of the first page, the processing device is to:

determine a first set of coordinates in the image, wherein the first set of coordinates comprises coordinates for each of the corners in the first quadrangle;

determine a first proportion of the corrected image, wherein the first proportion comprises parameters for constructing a rectangle;

determine a second set of coordinates for the corrected image by applying the first proportion to the first set of coordinates, wherein the second set of coordinates comprises coordinates for each of the corners in the rectangle for the corrected image; and

transform information from the first quadrangle into the rectangle by performing a coordinate conversion.

28. The computing apparatus of claim 15 , wherein to determine the corrected image of the second page, the processing device is to:

determine a first set of coordinates in the image, wherein the first set of coordinates comprises coordinates for each of the corners in the second quadrangle;

determine a first proportion of the corrected image, wherein the first proportion comprises parameters for constructing a rectangle;

determine a second set of coordinates for the corrected image by applying the first proportion to the first set of coordinates, wherein the second set of coordinates comprises coordinates for each of the corners in the rectangle for the corrected image; and

transform information from the second quadrangle into the rectangle by performing a coordinate conversion.

29. A non-transitory computer readable storage medium, having instructions stored therein, which when executed by a processing device of a computer system, cause the processing device to perform operations comprising:

receiving, by the processing device, an image of a spread open multi-page document;

determining a binding edge line of the spread open multi-page document, wherein the binding edge line comprises a first substantially vertical straight line associated with a joining of two pages of the spread open multi-page document;

determining a first additional set of substantially vertical straight lines lying left of the binding edge line in the image of the spread open multi-page document, and a second additional set of substantially vertical straight lines lying right of the binding edge line in the image of the spread open multi-page document;

determining a first vanishing point based on the first additional set of substantially vertical straight lines and the binding edge line, and a second vanishing point based on the second additional set of substantially vertical straight lines and the binding edge line;

determining a first quadrangle based on the binding edge line and the first vanishing point and a second quadrangle based on the binding edge line and the second vanishing point, wherein the first quadrangle corresponds to a first page of the spread open multi-page document, the second quadrangle corresponds to a second page of the spread open multi-page document, and the first quadrangle and the second quadrangle neighboring each other at the binding edge line; and

generating a corrected image of the first page by reducing a first distortion of the first quadrangle based on a geometric characteristic of the first quadrangle, and a second corrected image of the second page by reducing a second distortion of the second quadrangle based on a geometric characteristic of the second quadrangle.

30. The non-transitory computer readable storage medium of claim 29 , the operations further comprising:

transforming the image by performing at least one of a color to grayscale conversion, reducing a size of the image, or a mathematical morphological operation.

31. The non-transitory computer readable storage medium of claim 29 , wherein the first distortion is different than the second distortion.

32. The non-transitory computer readable storage medium of claim 29 , wherein determining the biding edge line comprises:

transforming the image to a grayscale image by performing a color to grayscale conversion;

applying an unsharp mask to the grayscale image;

transforming the grayscale image to a binarized image by performing a binarization operation on the grayscale image;

transforming the binarized image to a downsampled image by reducing a size of the binarized image to a predetermined size;

transforming the downsampled image into a modified image by performing at least one morphological operation on the downsampled image;

determining a set of values corresponding to pixels in the modified image

generating a set of transformed values by applying a transform to the set of values;

determining at least one of the set of transformed values that meets a threshold value; and

identifying the binding edge line in the modified image using the at least one of the set of transformed values.

33. The non-transitory computer readable storage medium of claim 29 , wherein determining the first additional set of substantially vertical straight lines comprises:

identifying, in the image of the spread open multi-page document, an edge of an array of pixels lying left of the binding edge line in view of a change in brightness between pixels in the image; and

identifying at least one line of the first additional set of substantially vertical straight lines based on the edge of the array of pixels.

34. The non-transitory computer readable storage medium of claim 29 , wherein determining the first additional set of substantially vertical straight lines comprises:

determining a set of values corresponding to pixels in the image;

generating a set of transformed values by applying a transform to the set of values;

determining at least one of the set of transformed values meets a threshold value; and

identifying at least one line in the image using the at least one of the set of transformed values.

35. The non-transitory computer readable storage medium of claim 29 , wherein determining the first vanishing point comprises:

determining a set of values corresponding to pixels in the image;

generating a set of transformed values by applying a transform to the set of values;

identifying a first cluster of the set of transformed values, wherein the first cluster comprises transformed values that correspond to the binding edge line;

identifying a second cluster of the set of transformed values, wherein the second cluster comprises transformed values that correspond to substantially vertical straight lines lying to the left of the binding edge line;

generating a ray for the second cluster of transformed values; and

determining the first vanishing point based on the ray.

36. The non-transitory computer readable storage medium of claim 35 , wherein generating the ray comprises performing at least one of a method of least squares operation or a random sample consensus operation.

37. The non-transitory computer readable storage medium of claim 29 , wherein determining the second vanishing point comprises:

determining a set of values corresponding to pixels in the image;

generating a set of transformed values by applying a transform to the set of values;

identifying a first cluster of the set of transformed values, wherein the first cluster comprises transformed values that correspond to the binding edge line;

identifying a second cluster of the set of transformed values, wherein the second cluster comprises transformed values that correspond to substantially vertical straight lines lying to the right of the binding edge line;

generating a ray for the second cluster of transformed values; and

determining the second vanishing point based on the ray.

38. The non-transitory computer readable storage medium of claim 37 , wherein generating the ray comprises performing at least one of a method of least squares operation or a random sample consensus operation.

39. The non-transitory computer readable storage medium of claim 29 , wherein determining the first quadrangle comprises:

determining a left midpoint of the image, wherein the left midpoint comprises a pixel position at the center of a left edge of the image;

determining a left line intersecting the left midpoint of the image and the first vanishing point;

determining a left top normal line connecting the binding edge line and the left line, wherein the left top normal line is perpendicular to the binding edge line, and wherein the left top normal line is positioned to avoid losing any pixels of the image; and

determining a left bottom normal line connecting the binding edge line and the left line, wherein the left bottom normal line is perpendicular to the binding edge line, and wherein the left bottom normal line is positioned to avoid losing any pixels of the image.

40. The non-transitory computer readable storage medium of claim 29 , wherein determining the second quadrangle comprises:

determining a right midpoint if the image, wherein the right midpoint comprises a pixel position at the center of a right edge of the image;

determining a right line intersecting the right midpoint of the image and the second vanishing point;

determining a right top normal line connecting the binding edge line and the right line, wherein the right top normal line is perpendicular to the binding edge line, and wherein the right top normal line is positioned to avoid losing any pixels of the image; and

determining a right bottom normal line connecting the binding edge line and the right line, wherein the second normal line is perpendicular to the binding edge line, and wherein the right bottom normal line is positioned to avoid losing any pixels of the image.

41. The non-transitory computer readable storage medium of claim 29 , wherein generating the corrected image of the first page comprises:

determining a first set of coordinates in the image, wherein the first set of coordinates comprises coordinates for each of the corners in the first quadrangle;

determining a first proportion of the corrected image, wherein the first proportion comprises parameters for constructing a rectangle;

determining a second set of coordinates for the corrected image by applying the first proportion to the first set of coordinates, wherein the second set of coordinates comprises coordinates for each of the corners in the rectangle for the corrected image; and

transforming information from the first quadrangle into the rectangle by performing a coordinate conversion.

42. The non-transitory computer readable storage medium of claim 29 , wherein generating the corrected image of the second page comprises:

determining a first set of coordinates in the image, wherein the first set of coordinates comprises coordinates for each of the corners in the second quadrangle;

determining a first proportion of the corrected image, wherein the first proportion comprises parameters for constructing a rectangle;

determining a second set of coordinates for the corrected image by applying the first proportion to the first set of coordinates, wherein the second set of coordinates comprises coordinates for each of the corners in the rectangle for the corrected image; and

transforming information from the second quadrangle into the rectangle by performing a coordinate conversion.

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 Dec 31, 2018
From: ABBYY DEVELOPMENT LLC
To: ABBYY PRODUCTION LLC
Reel/Frame 047997/0652 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 19, 2016
From: ZAGAYNOV, IVAN GERMANOVICH
To: ABBYY DEVELOPMENT LLC
Reel/Frame 038651/0913 →
Priority Claims (1)
RU 2016116324 · Apr 26, 2016 · national
Continuity (1)
Related Publication 20170309001A1 · Oct 26, 2017