摘要 |
A method and corresponding computing device and computer readable storage media containing instructions for modifying the histogram of a grayscale image to improve contrast by extracting black connected components from the grayscale image that touch at least one of the margins of the grayscale image, computing the histogram of the portion of the grayscale image covered by the extracted black connected components, and updating the histogram of the grayscale image by subtracting the histogram of the portion of the binary image covered by the extracted black connected components from the histogram of the grayscale image or by subtracting a function of number of pixels of the portion of the binary image covered by the extracted black connected components from the histogram of the grayscale image. The function may be a property of a document containing the grayscale image, such as the size of the document. In this case, pixels outside of the document boundaries are removed from the histogram during the updating of the histogram.
|