IP Library Granted Patent US 11,074,679
Granted Patent B2
US 11,074,679 · App. 16/483,950 · Granted Jul 27, 2021

Image correction and display method and device

Inventors: Yahui Wang (Beijing, CN); Xin Chen (Shenzhen, CN); Yunchao Zhang (Beijing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06T5/50G06T7/13G06T7/50H04N5/23222G06T2207/30176
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 11,074,679
App. No.
16/483,950
Granted
Jul 27, 2021
Kind
B2
Abstract

A method includes photographing a first image, where the first image comprises a document. A first area of the document is obscured by a first obstruction. The method further includes determining a location of the first area based on depth data. The method further includes photographing a second image. The method further includes restoring the obstructed information in the first area based on the second image. The method further includes displaying a third image, wherein the third image comprises the document and the first obstruction s removed from the first area of the document.

Claims (56)

1. An electronic device, comprising:

a camera;

a processor coupled to the camera; and

a memory coupled to the processor and comprising instructions that, when executed by the processor, cause the electronic device to be configured to:

photograph a document that includes first information in a first area to obtain a first image that comprises the document and a first object, wherein the first object obscures the first information in the first image;

determine a location of the first area in the first image based on depth data collected by the camera;

photograph the document to obtain a second image that includes the first information;

restore the first information in the location of the first area in the first image based on interpolation using the grayscale value of the second image to obtain a third image; and

display the third image, wherein the document is displayed in the third image with the first object being removed from the location of the first area of the document.

2. The electronic device of claim 1 , wherein the instructions further cause the electronic device to be configured to:

establish a reference plane, wherein the reference plane is a plane on which the document is located, wherein there are a plurality of sampling points in an area of the document, and wherein the plurality of sampling points have corresponding projected points on the reference plane;

calculate a difference between first depth data and second depth data, wherein the first depth data is a distance between each of the plurality of sampling points and a plane on which the camera is located, and wherein the second depth data is a distance between a projected point corresponding to each of the plurality of sampling points and the plane on which the camera is located; and

determine the location of the first area in the first image based on the difference between the first depth data and the second depth data.

3. The electronic device of claim 2 , wherein the instructions further cause the electronic device to be configured to determine that the first object exists in the first area of the document when a percentage of sampling points whose difference is greater than a first threshold in the plurality of sampling points is greater than a second threshold.

4. The electronic device of claim 2 , wherein the instructions further cause the electronic device to be configured to:

perform edge detection on the first image to determine at least four edge line segments;

obtain depth data of each edge line segment of the at least four edge line segments; and

select, based on the depth data, four edge line segments on a same plane to establish the reference plane.

5. The electronic device of claim 1 , wherein the instructions further cause the electronic device to be configured to generate a first prompt information, and wherein the first prompt information is used to prompt the location of the first area.

6. The electronic device of claim 1 , wherein the instructions further cause the electronic device to be configured to generate a second prompt information that is used to instruct a user to move the camera and to photograph the document to obtain the second image.

7. The electronic device of claim 1 , wherein the instructions further cause the electronic device to perform document correction after restoring the first information in the location of the first area.

8. A non-transitory computer readable medium storing computer instructions that, when executed by a processor, cause an electronic device to be configured to:

photograph a document that includes first information in a first area to obtain a first image that comprises the document and a first object, wherein the first object obscures the first information in the first image;

determine a location of the first area in the first image based on depth data collected by the electronic device;

photograph the document to obtain a second image that includes the first information;

restore the first information in the location of the first area in the first image based on interpolation using the grayscale value of the second image to obtain a third image; and

display the third image, wherein the document is displayed in the third image with the first object being removed from the location of the first area of the document.

9. The non-transitory computer readable medium of claim 8 , wherein the computer instructions further cause the electronic device to be configured to:

establish a reference plane, wherein the reference plane is a plane on which the document is located, wherein there are a plurality of sampling points in an area of the document, and wherein the plurality of sampling points have corresponding projected points on the reference plane;

calculate a difference between first depth data and second depth data, wherein the first depth data is a distance between each of the plurality of sampling points and a plane on which a camera is located, and the second depth data is a distance between a projected point corresponding to each of the plurality of sampling points and the plane on which the camera is located; and

determine the location of the first area in the first image based on the difference between the first depth data and the second depth data.

10. The non-transitory computer readable medium of claim 9 , wherein the computer instructions further cause the electronic device to be configured to determine—that the first object exists in the first area of the document when a percentage of the plurality of sampling points whose difference is greater than a first threshold is greater than a second threshold.

11. The non-transitory computer readable medium of claim 9 , wherein the computer instructions further cause the electronic device to be configured to:

perform edge detection on the first image to determine at least four edge line segments;

obtain depth data of each edge line segment of the at least four edge line segments; and

select, based on the depth data, four edge line segments on a same plane to establish the reference plane.

12. The non-transitory computer readable medium of claim 8 , wherein the computer instructions further cause the electronic device to be configured to generate a first prompt information configured to prompt the location of the first area.

13. The non-transitory computer readable medium of claim 8 , wherein the computer instructions further cause the electronic device to be configured to generate a second prompt information, and wherein the second prompt information is used to instruct a user to move a camera and to photograph the document to obtain the second image.

14. The non-transitory computer readable medium of claim 8 , wherein the computer instructions further cause the electronic device to be configured to perform document correction after restoring the first information in the location of the first area.

15. An image processing method, comprising:

photographing, by a camera of an electronic device, a document that includes first information in a first area to obtain a first image that comprises the document and a first object, wherein the first object obscures the first information in the first image;

determining a location of the first area in the first image based on depth data collected by the camera of the electronic device;

photographing the document to obtain a second image that includes the first information;

restoring the first information in the location of the first area in the first image based on interpolation using the grayscale value of the second image to obtain a third image; and

displaying the third image, wherein the document is displayed in the third image with the first object being removed from the location of the first area of the document.

16. The method of claim 15 , wherein the determining the location of the first area in the first image comprises:

establishing a reference plane, wherein the reference plane is a plane on which the document is located, and wherein a plurality of sampling points have corresponding projected points on the reference plane;

calculating a difference between first depth data and second depth data, wherein the first depth data is a distance between each of the plurality of sampling points and a plane on which the camera is located, and wherein the second depth data is a distance between a projected point corresponding to each of the plurality of sampling points and the plane on which the camera is located; and

determining the location of the first area based on the difference between the first depth data and the second depth data.

17. The method of claim 16 , wherein the method further comprises determining that the first object exists in the first area of the document when a percentage of the plurality of sampling points whose difference is greater than a first threshold is greater than a second threshold.

18. The method of claim 16 , wherein the method further comprises:

performing edge detection on the first image to determine at least four edge line segments;

obtaining depth data of each edge line segment of the at least four edge line segments; and

selecting, based on the depth data, four edge line segments on a same plane to establish the reference plane.

19. The method of claim 15 , wherein the method further comprises generating first prompt information used to prompt the location of the first area.

20. The method of claim 15 , wherein the method further comprises generating second prompt information used to instruct a user to move the camera and to photograph the document to obtain the second image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 21, 2020
From: WANG, YAHUI; CHEN, XIN; ZHANG, YUNCHAO
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 053265/0719 →
Continuity (1)
Related Publication 20200051226A1 · Feb 13, 2020
Cited By (1)
US 12,694,491