1. Field of the Invention
This invention relates to downsampling of binary images, and more particularly it relates to topology-preserving down-sampling of binary images.
2. Description of Related Art
Digital image downsampling is widely used in today's computer graphic and image processing applications. Various approaches have been introduced to reduce image quality loss in a down-sampling process.
For example, U.S. Pat. No. 6,563,964 disclosed an image downsampling method using a redundant pixel removal approach for computer-graphics imagery applications, where a digital image is downsampled non-uniformly in a manner that attempts to minimize aliasing of high-spatial-frequency image information by concentrating deletion paths in lower-spatial-frequency image regions, by using a spatial frequency estimator that compares groups of pixels in order to produce a classification of the image, a path generator and path scorer that traces and scores potential deletion paths through the image where the path with the greatest score (i.e., one that provides minimal distortion and aliasing) is selected for pixel removal, and a re-cursor that repeats this process until a desired number of image rows and/or columns have been removed.
Another example is found by E. Decencière, and M. Bilodeau, “Downsampling of Binary Images Using Adaptive Crossing Numbers”, in C. Ronse, L. Najman and E. Decencière editors, Mathematical Morphology: 40 Years On (Proceedings of ISMM'2005), pp. 279-288, (Paris, France, April 2005. Springer), which described a technique using adaptive crossing numbers for downsampling of binary images.
The prior arts described above may have some effects to preserve the topology of the binary images, but they are complex and slow in practice. However, it is still desirable to have a simple and fast method for downsampling of binary images that preserves the topology of the binary images.
The present invention is directed to a method for topology preserving down-sampling of binary images.
An object of the present invention is to provide a simple and fast method for down-sampling of binary images that preserves the topology of the binary images.
Additional features and advantages of the invention will be set forth in the descriptions that follow and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
To achieve these and/or other objects, as embodied and broadly described, the present invention provides a binary image downsampling method which includes the steps of generating a gray-scale image from a binary image having a background and one or more foreground portions, locating skeleton pixels in the one or more foreground portions, manipulating values of certain foreground pixels in the gray-scale image such that the differences between the values of the skeleton pixels and the background pixels become more significant, downsampling the gray-scale image with the manipulated values of the certain foreground pixels, and generating a downsampled binary image from the downsampled gray-scale image.
In another aspect, the present invention provides a non-transitory computer readable recording 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 the process of the above method.
In a further aspect, the present invention provides a system configured to cause a data processing apparatus to execute the process of the above method.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.
a) illustrates the result of a conventional bilinear downsampling of the exemplary text image shown in
b) illustrates the result of a new bilinear downsampling of the exemplary text image shown in
a) illustrates the result of a conventional bicubic downsampling of the exemplary text image shown in
b) illustrates the result of a new bicubic downsampling of the exemplary text image shown in
a) illustrates the result of a conventional bilinear downsampling of the exemplary graphic image shown in
b) illustrates the result of a new bilinear downsampling of the exemplary graphic image shown in
a) illustrates the result of a conventional bicubic downsampling of the exemplary graphic image shown in
b) illustrates the result of a new bicubic downsampling of the exemplary graphic image shown in
a) illustrates pixel values of the exemplary binary image shown in
b) illustrates adjusting pixel values of only the skeleton of the exemplary binary image shown in
c) illustrates adjusting pixel values based on a profile centered on the skeleton of the exemplary binary image shown in
Embodiments of the present invention provide a method for down-sampling of binary images that preserves the topology of the binary images.
Downsampling of an original image having a higher resolution typically involves producing a resulting image of a lower resolution. However, reducing image resolution often results in losing detailed features of the original image in the resulting image.
For example, there is shown in
Another example is shown in
The purposes of the present invention method include the provision of a process for downsampling of a higher resolution original image while preserving the topology of the original image by enhancing the “skeleton” of the original image, to reduce the loss of details in the lower resolution resulting image from the higher resolution original image. Generally an image may have a background portion and one or more foreground portions. In some images the background pixels have a greater value than the pixels of the foreground portions (or objects of interest, such as texts), while in others the opposite is true. For example, if a text document is considered as an image, then it may have a white background portion and one or more black foreground portions which may be black texts on the white background (“black-on-white”), or a black background portion and one or more white foreground portions which may be white texts on the black background (“white-on-black”),In this application, a skeleton is the medial axes of a foreground portion in a binary image.
To achieve these and other purpose, the downsampling method according to the embodiments of the present invention processes an original binary image in both binary and gray-scale spaces. Optionally the binary image may be de-noised by using, e.g., standard morphological operations such as “open” and “close” operations. First, a gray-scale image is created from the binary image, and then those pixels on the skeletons of the original image are enhanced or boosted such that they deviate more from the pixel values in the background, which is the equivalent of weighing the skeleton pixels more than other pixels. This is typically done by increasing or decreasing the pixel values of the skeleton, depending on the image. For example, the skeleton pixel values may be increased if the foreground has greater values than the background, or decreased if the foreground has smaller values than the background. However, while generally it is the values of the skeleton pixels that are manipulated, the pixel values of other foreground portions are also subject to manipulation insofar as the differences between the values of the skeleton pixels and the background pixels become more significant as compared to the differences between the pixel values of the remaining foreground portions and the background portion. Next, a conventional two-dimensional interpolation process is used to downsample the gray-scale image. Afterwards, the downsampled gray-scale image is binarized via a conventional thresholding process to produce the resulting binary image. Additional post-processing may be carried out for various touch-ups, e.g., to remove isolated pixels or fill small unwanted holes.
Referring to
The process begins at Step S10 where an original binary image B0 is to be downsampled. For illustration purposes, an exemplary original binary image B0 of the character or symbol “I” is shown
Referring back to
G0=B0 [1]
Next, at Step S30, the skeletons Bs of the original image B0 is extracted using a standard skeletonization method, such as morphological openings or the hit-or-miss transform:
Bs=FindSkeletons (B0) [2]
For example, in
At Step S40, the values of the skeleton pixels in the gray-scale image G0 corresponding to Bs are adjusted with increased or enhanced values, such as from 1 to 10. First, the locations of the skeleton pixel (i.e., all non-zero pixels in Bs) are identified:
(Xs, Ys)=FindNonZeros (Bs) [3]
Second, these skeleton pixels in G0 are set to a new, increased value such that the pixel locations of gray-scale image G1is the same as G0 but the skeleton pixels have increase values in G1
G1(X, Y)=G0(X, Y) [4]
Gi(Xs, Ys)=k1*DownsampleRatio [5]
where k1 is a parameter that controls the topology-preserving capability of the downsampling.
Referring to
Alternatively at Step 50, the values of pixels in G1 may be adjusted with a profile centered on the skeleton, e.g. a Gaussian or triangular profile that is perpendicular to the orientation of the skeleton. Other examples of the profiles that may be used for this step include, e.g. non-symmetric profiles which will generate some special effects to the resulting image.
Referring to
Next at Step S60, the new gray-scale image G1 is downsampled to a downsampled gray-scale image Gd by using, e.g., an interpolation technique, such as nearest-neighbor, bilinear, bicubic interpolations, and so on
Gd=Downsample (G1) [6]
At Step S70, the downsampled gray-scale image G2 is binarized to a binary image B1 by using, e.g., a thresholding technique
B1=Gd>k2 [7]
where k2 is the threshold, for example:
k2=1/DownsampleRatio [8]
Optionally, other more sophisticated thresholding methods may be used for Step S70, such as hyteresis thresholding by applying a high threshold and a low threshold, where the high threshold is applied in a first thresholding step, and a first binary image is generated. Using the first binary image, it may be assumed that pixels connected to the foreground pixels in the first binary image are also likely to be foreground pixels even if their pixel values are below the high threshold value. Thus, in a second step, the low threshold is applied to these pixels to expand the foreground in the first binary image.
At Step S80, a final downsampled binary image Bd is generated with post-processing, if necessary:
Bd=Post-Processing (B1) [9]
The post-processing may be done by, e.g., morphological operations to remove isolated pixels and/or fill small holes.
Finally at Step S90, the process produces the resulting downsampled binary image Bd.
Referring to
Referring to
Referring to
Referring to
In addition to the above described aspect, the invention may be embodied in a non-transitory computer readable recording 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 the process of the topology-preserving downsampling method according to embodiments of the present invention.
In a further aspect, the present invention may be embodied in a system configured to cause a data processing apparatus to execute the process of the topology-preserving downsampling method according to embodiments of the present invention.
It will be apparent to those skilled in the art that various modification and variations can be made in the method and related apparatus of the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention cover modifications and variations that come within the scope of the appended claims and their equivalents.
Number | Name | Date | Kind |
---|---|---|---|
6563964 | Hallberg | May 2003 | B1 |
7308031 | Yamaguchi et al. | Dec 2007 | B2 |
20080029602 | Burian et al. | Feb 2008 | A1 |
20090262931 | Nakagata et al. | Oct 2009 | A1 |
Entry |
---|
Decenciere et al., “Downsampling of Binary Images using Adaptive Crossing Numbers” in Mathematical Morphology: 40 Years on, Edited by Ronse et al., Paris, France, Apr. 2005, pp. 279-288. |
Number | Date | Country | |
---|---|---|---|
20140147054 A1 | May 2014 | US |