Background removal for document images
First Claim
1. A method for processing an input gray-scale document image for background removal, comprising:
- (a) binarizing the input gray-scale image using a global threshold value close to a pixel value representing an ideal background to generate a first binarized image;
(b) calculating external contours in the first binarized image;
(c) identifying large external contours, and designating regions of the input gray-scale image enclosed by large external contours as candidate regions for background removal;
(d) for each candidate region of the input gray-scale image, calculating a histogram of numbers of pixels having each pixel value, and based on the histogram, determining whether the candidate region is a region containing graphics;
(e) individually binarizing candidate regions of the input gray-scale image that are determined not to be a region containing graphics in step (d), to generate a plurality of binarized images of the candidate regions;
(f) for each binarized image of a candidate region, analyzing its geometric characteristics and/or statistics of connected components within it to determine whether the corresponding candidate region of the input image is a region containing graphics or a region containing text and/or tables; and
(g) for each candidate region of the input image that is determined not to be a region containing graphics in step (e) and step (f) or is determined to be a region containing text and/or tables in step (f), removing a background in the region by setting pixels of the input image which are located in areas corresponding to white areas of the corresponding binarized image generated in step (e) to the pixel value representing the ideal background, without altering any other regions of the input image.
1 Assignment
0 Petitions
Accused Products
Abstract
A simple, fast, and effective method is provided for background removal for document images with dark text over relatively uniform or slow-varying non-white background. Candidate regions for background removal are first identified by binarizing the input gray-scale image using a global threshold very close to white. Large contours in the binarized image are identified as candidate regions. A histogram analysis is applied to preliminarily identify regions containing graphics, which are excluded from further processing. The remaining candidate regions are individually binarized. The binarized regions are analyzed to determine whether they contain graphics or text/table, by examining their geometric characteristics and statistics of connected components within them. For candidate regions determined to contain text or tables, background pixels in the input image are set to white using a mask which is the inverse of the individually binarized images of the regions. Regions that contain graphics are left unchanged.
-
Citations
10 Claims
-
1. A method for processing an input gray-scale document image for background removal, comprising:
-
(a) binarizing the input gray-scale image using a global threshold value close to a pixel value representing an ideal background to generate a first binarized image; (b) calculating external contours in the first binarized image; (c) identifying large external contours, and designating regions of the input gray-scale image enclosed by large external contours as candidate regions for background removal; (d) for each candidate region of the input gray-scale image, calculating a histogram of numbers of pixels having each pixel value, and based on the histogram, determining whether the candidate region is a region containing graphics; (e) individually binarizing candidate regions of the input gray-scale image that are determined not to be a region containing graphics in step (d), to generate a plurality of binarized images of the candidate regions; (f) for each binarized image of a candidate region, analyzing its geometric characteristics and/or statistics of connected components within it to determine whether the corresponding candidate region of the input image is a region containing graphics or a region containing text and/or tables; and (g) for each candidate region of the input image that is determined not to be a region containing graphics in step (e) and step (f) or is determined to be a region containing text and/or tables in step (f), removing a background in the region by setting pixels of the input image which are located in areas corresponding to white areas of the corresponding binarized image generated in step (e) to the pixel value representing the ideal background, without altering any other regions of the input image. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer program product comprising a computer usable non-transitory medium having a computer readable program code embedded therein for controlling a data processing apparatus, the computer readable program code configured to cause the data processing apparatus to execute a process for removing background in an input gray-scale document image, the process comprising:
-
(a) binarizing the input gray-scale image using a global threshold value close to a pixel value representing an ideal background to generate a first binarized image; (b) calculating external contours in the first binarized image; (c) identifying large external contours, and designating regions of the input gray-scale image enclosed by large external contours as candidate regions for background removal; (d) for each candidate region of the input gray-scale image, calculating a histogram of numbers of pixels having each pixel value, and based on the histogram, determining whether the candidate region is a region containing graphics; (e) individually binarizing candidate regions of the input gray-scale image that are determined not to be a region containing graphics in step (d), to generate a plurality of binarized images of the candidate regions; (f) for each binarized image of a candidate region, analyzing its geometric characteristics and/or statistics of connected components within it to determine whether the corresponding candidate region of the input image is a region containing graphics or a region containing text and/or tables; and (g) for each candidate region of the input image that is determined not to be a region containing graphics in step (e) and step (f) or is determined to be a region containing text and/or tables in step (f), removing a background in the region by setting pixels of the input image which are located in areas corresponding to white areas of the corresponding binarized image generated in step (e) to the pixel value representing the ideal background, without altering any other regions of the input image. - View Dependent Claims (7, 8, 9, 10)
-
Specification