IP Library Granted Patent US 10,559,067
Granted Patent B2
US 10,559,067 · App. 15/907,526 · Granted Feb 11, 2020

Removal of shadows from document images while preserving fidelity of image contents

Inventors: Prasenjit Mondal (West Midnapore, IN); Ruppesh Nalwaya (Sunnyvale, CA); Ram Bhushan Agrawal (Noida, IN); Deepanshu Arora (Delhi, IN); Anuj Shara (Delhi, IN)
Assignee: Adobe Inc.
G06T5/002G06T5/20G06T2207/20032
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,559,067
App. No.
15/907,526
Granted
Feb 11, 2020
Kind
B2
Abstract

Techniques are disclosed for generating a shadow map of a digital image. In some examples, a method may include generating a shadow mask of a digital image, generating a dilated de-noised binarized gradient image based on the shadow mask, generating a binarized median-filtered gray image based on the digital image and the dilated de-noised binarized gradient image, and generating a shadow map based on the shadow mask and the binarized median-filtered gray image. The generated shadow map can then be used to remove shadows from the digital image without degrading the quality of the image content in the digital image.

Claims (66)

1. A computer-implemented method to generate a shadow map of a digital image, the method comprising:

generating a shadow mask of a digital image;

generating a binarized gradient image based on the shadow mask, the binarized gradient image being dilated and de-noised;

generating a binarized median-filtered gray image based on the digital image and the binarized gradient image; and

generating a shadow map based on the shadow mask and the binarized median-filtered gray image;

wherein the shadow map is usable to remove shadows from the digital image.

2. The method of claim 1 , wherein generating the binarized gradient image based on the shadow mask comprises:

generating a gradient image from the shadow mask; and

binarizing the generated gradient image to generate an initial binarized gradient image.

3. The method of claim 2 , further comprising:

performing a connected component analysis on the initial binarized gradient image; and

generating a de-noised binarized gradient image from the initial binarized gradient image.

4. The method of claim 3 , further comprising dilating the de-noised binarized gradient image to generate the dilated de-noised binarized gradient image.

5. The method of claim 1 , wherein generating the binarized median-filtered gray image comprises generating a median-filtered gray image based on the digital image.

6. The method of claim 5 , wherein generating the binarized median-filtered gray image further comprises:

performing a connected component analysis on the binarized gradient image; and

binarizing the median-filtered gray image to generate the binarized median-filtered gray image.

7. The method of claim 6 , wherein binarizing the median-filtered gray image comprises:

determining a minimal bounding rectangle for each connected component in the binarized gradient image; and

binarizing regions in the median-filtered gray image corresponding to the minimal bounding rectangles in the binarized gradient image.

8. The method of claim 7 , wherein binarizing regions in the median-filtered gray image is based on a segmentation algorithm.

9. The method of claim 1 , wherein generating the shadow map comprises:

generating a color pixel map of the digital image, the color pixel map comprising a plurality of black pixels; and

generating a partially interpolated shadow mask based on the shadow mask and the color pixel map;

wherein the shadow map is based on the partially interpolated shadow mask and the binarized median-filtered gray image.

10. The method of claim 1 , wherein generating the shadow map comprises:

performing a connected component analysis on the binarized median-filtered gray image, the connected component analysis generating at least one connected component in the binarized median-filtered gray image;

computing an average intensity value from the shadow mask based on neighboring pixels of the at least one connected component; and

interpolating a region in the shadow mask corresponding to the at least one connected component with the computed average intensity value.

11. The method of claim 10 , wherein computing the average intensity value from the shadow mask being computing the average intensity value from the partially interpolated shadow mask, and further wherein interpolating the region in the shadow mask being interpolating the region in the partially interpolated shadow mask.

12. The method of claim 1 further comprising smoothening the shadow map.

13. The method of claim 1 , wherein the digital image is a document image.

14. A system to generate a shadow map of a digital image, the system comprising:

one or more non-transitory machine readable mediums configured to store instructions; and

one or more processors configured to execute the instructions stored on the one or more non-transitory machine readable mediums, wherein execution of the instructions causes the one or more processors to

generate a shadow mask of a digital image;

generate a binarized gradient image based on the shadow mask, the binarized gradient image being dilated and de-noised;

generate a binarized median-filtered gray image based on the digital image and the binarized gradient image; and

generate a shadow map based on the shadow mask and the binarized median-filtered gray image;

wherein the shadow map is usable to remove shadows from the digital image.

15. The system of claim 14 , wherein to generate the binarized gradient image based on the shadow mask comprises generate a gradient image from the shadow mask and binarize the generated gradient image to generate an initial binarized gradient image, and further wherein the one or more non-transitory machine readable mediums further stores instructions that, in response to execution by the one or more processors, cause the one or more processors to:

perform a connected component analysis on the initial binarized gradient image; and

generate a de-noised binarized gradient image from the initial binarized gradient image.

16. The system of claim 14 , wherein to generate the binarized median-filtered gray image comprises:

generate a median-filtered gray image based on the digital image;

perform a connected component analysis on the binarized gradient image;

determine a minimal bounding rectangle for each connected component in the binarized gradient image; and

binarize regions in the median-filtered gray image corresponding to the minimal bounding rectangles in the binarized gradient image.

17. The system of claim 14 , wherein to generate the shadow map comprises:

generate a color pixel map of the digital image, the color pixel map comprising a plurality of black pixels; and

generate a partially interpolated shadow mask based on the shadow mask and the color pixel map;

wherein the shadow map is based on the partially interpolated shadow mask and the binarized median-filtered gray image.

18. The system of claim 14 , wherein to generate the shadow map comprises:

perform a connected component analysis on the binarized median-filtered gray image, the connected component analysis generating at least one connected component in the binarized median-filtered gray image;

compute an average intensity value from the shadow mask based on neighboring pixels of the at least one connected component; and

interpolate a region in the shadow mask corresponding to the at least one connected component with the computed average intensity value.

19. A computer program product including one or more non-transitory machine readable mediums encoded with instruction that when executed by one or more processors cause a process to be carried out to generate a shadow map of a digital image, the process comprising:

generating a shadow mask of a digital image;

generating a binarized gradient image based on the shadow mask, the binarized gradient image being dilated and de-noised;

generating a binarized median-filtered gray image based on the digital image and the binarized gradient image; and

generating a shadow map based on the shadow mask and the binarized median-filtered gray image;

wherein the shadow map is usable to remove shadows from the digital image.

20. The computer program product of claim 19 , wherein generating the shadow map comprises:

performing a connected component analysis on the binarized median-filtered gray image, the connected component analysis generating at least one connected component in the binarized median-filtered gray image;

computing an average intensity value from the shadow mask based on neighboring pixels of the at least one connected component; and

interpolating a region in the shadow mask corresponding to the at least one connected component with the computed average intensity value.

Assignments (2)
CHANGE OF NAME Recorded Nov 30, 2018
From: ADOBE SYSTEMS INCORPORATED
To: ADOBE INC.
Reel/Frame 047688/0530 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 28, 2018
From: MONDAL, PRASENJIT; NALWAYA, RUPPESH; AGRAWAL, RAM BHUSHAN; ARORA, DEEPANSHU; SHARA, ANUJ
To: ADOBE SYSTEMS INCORPORATED
Reel/Frame 045063/0020 →