1. Field of the Invention
The present invention relates to image processing techniques, and more particularly, to methods and apparatus for non-linear dithering of images.
2. Description of the Prior Art
The bit numbers employed to express the respective pixels of an image, also known as the bit depth, determines the color depth of the image. In general, the visual quality of the image increases with the color depth.
The bit depth of the conventional display medium is limited; such as the computer monitor, the PDA display panel, and so forth. Conventionally, if the bit depth of the display medium is less than the color depth of the image to be displayed, then a technique is to be employed to display the image having more color depth on the display medium having less color depth. This technique, when applied to a display medium, is called dithering. In a printing context the same process is referred to as half toning. For example, when a 6 bits display medium is utilized to display an 8 bits image, the dithering technique is employed to display the image having more color depth on the display medium with lower bit depth.
Please refer to
However, the conventional linear dithering operations cannot satisfy the requirements of many display media.
It is therefore an objective of the claimed invention to provide a non-linear dithering method and apparatus.
According to an exemplary embodiment of the present invention, a method for dithering an image is disclosed comprising: storing a plurality of dithering parameters corresponding to a predetermined function for a predetermined input intensity range; and dithering pixels of the predetermined input intensity range according to the plurality of dithering parameters.
According to an exemplary embodiment of the present invention, another method for dithering an image is disclosed comprising: generating a plurality of dithering parameters corresponding to a predetermined input intensity range according to a predetermined function; and dithering pixels of the predetermined input intensity range according to the plurality of dithering parameters.
According to an exemplary embodiment of the present invention, an image dithering device is disclosed comprising: a storage medium for storing a plurality of dithering parameters corresponding to a predetermined function for a predetermined input intensity range; and a processing unit for dithering pixels of the predetermined input intensity range according to the plurality of dithering parameters.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
In the following embodiment, an image with P-bit color depth is to be dithered into an image with Q-bit color depth, where Q can be any integer while P is another integer being greater than Q. For convenient descriptions and illustrations, P is herein assumed to be 8 and Q is assumed to be 6. In other words, after the dithering processes in the following embodiment, the bit number utilized to express each pixel is reduced to 6 bits from 8 bits. Note that the dithering method and apparatus disclosed below may be applied in various image output devices including image display devices and image printing devices such as CRT monitors, LCD displays, printers, and the like.
Please refer to
In step 410, the dithering matrix generator 310 of the image dithering device 300 generates at least one dithering matrix corresponding to a predetermined intensity range according to a function of a predetermined curve. For convenient elaborations, the predetermined curve is herein assumed to be the gamma characteristic curve corresponding to the image output device. In practice, the dithering matrix generator 310 may create a corresponding dithering matrix for each intensity interval within the predetermined intensity range or merely create a dithering matrix for a specific intensity interval within the predetermined intensity range. In this embodiment, the dithering matrix generator 310, in step 410, generates a first dithering matrix 322 as shown in
Before the dithering operations, each intensity, from intensities k through k+4 (including intensities k, k+1, k+2, k+3, and k+4), of the original image, Image_in, input to the image dithering device 300 are represented in 8 bits. Since the dithered image, Image_out, can only represent those intensities in 6 bits, only intensities k and k+4 can be expressed. Therefore, the dithering method should be applied to simulate those intensities between k and k+4, so as to compensate for the color depth. In this embodiment, the information required for dithering the original image is contained in the first dithering matrix 322 shown in
As shown in
Typically, the function of the target curve 510 is known. In this embodiment, for example, the target curve 510 is the gamma characteristic curve of the image output device, so that the function is depending upon the characteristic of the image output device and is well known to those of ordinary skill in the art. Accordingly, the appearance probabilities of respective values within the first dithering matrix 322 are easily obtained according to the positions on the target curve 510 with respect to the intensities k+1, k+2 and k+3. For example, the target curve 510 is vertically divided into M equal intervals and the appearance probabilities of respective values within the first dithering matrix 322 can be obtained according to the intervals where the points of the target curve 510 corresponding to the intensities k+1, k+2 and k+3 are located. The value of M is adjustable based on the design choice and not limited to any specific number.
In this embodiment, the target curve 510 of
P#3=the interval where the point of the target curve 510 with respect to the intensity k+1 is located/M= 1/12 (1)
In
P#2+P#3=the interval where the point of the target curve 510 with respect to the intensity k+2 is located/M= 3/12 (2)
Additionally, a point (k+3,a3) on the target curve 510 with respect to the intensity k+3 is located in the sixth interval from the bottom, this means that when dithering M pixels to simulate the intensity k+3, six of the M pixels should be assigned the intensity k+4 while the other M−6 pixels should be assigned the intensity k. Accordingly, a sum of the appearance probabilities of the values 1, 2, and 3 within the first dithering matrix 322 can be expressed as:
P#1+P#2+P#3=the interval where the point of the target curve 510 with respect to the intensity k+3 is located/M= 6/12 (3)
According to the formulas (1), (2), and (3), it can be calculated that the appearance probability of the value 3 P#3= 1/12, the appearance probability of the value 2 P#2=⅙, the appearance probability of the value 1 P#1=¼, and the appearance probability of the value 0 P#0=1−(P#1+P#2+P#3)=½.
Once the appearance probabilities of the values within the first dithering matrix 322 are obtained, the dithering matrix generator 310, in step 410, can utilize a random number generator to generate the first dithering matrix 322 according to the obtained appearance probabilities. Note that the first dithering matrix 322 shown in
In this embodiment, the second dithering matrix 324 is also composed of values 0˜3. The second dithering matrix 324 is utilized to dither pixels within the other intensity intervals. Since the characteristic of the target curve 510 may be different in different intensity intervals, the values within respective dithering matrixes recorded in the storage medium 320 may be different.
In step 420, the dithering matrix generator 310 then temporarily stores the first dithering matrix 322 and the second dithering matrix 324 into the storage medium 320.
In step 430, the processing unit 330 performs dithering operations on pixels located within the predetermined intensity range according to the first dithering matrix 322 or the second dithering matrix 324. In this embodiment, the processing unit 330 performs dithering operations on pixels located within the specific intensity interval (k, k+4) according to the first dithering matrix 322 and performs dithering operations on pixels located within the other intensity intervals within the predetermined intensity range according to the second dithering matrix 324.
Please refer to
In general, utilizing a large-sized dithering matrix to perform dithering operations can avoid periodic artifacts from appearing in the dithered image, Image_out. If the available memory space is a concern, the dithering matrix generator 310 can generate small-sized dithering matrix to be employed in the dithering operations. In order to reduce the possibility of periodic artifacts when utilizing the small-sized dithering matrix, the dithering matrix generator 310 can then intermittently adjust the entries of the first dithering matrix 322, or the second dithering matrix 324, or both the first dithering matrix 322 and the second dithering matrix 324. For example, the dithering matrix generator 310 may randomly rearrange the values within the dithering matrix or store a plurality of dithering matrixes corresponding to a single intensity interval. Preferably, during the above processes, the appearance probabilities of respective values within the dithering matrix accessed by the processing unit 330 are retained in an effort to maintain the dithering performance.
Note that the non-linear dithering methods disclosed above can be applied in some predetermined intensity intervals, or applied in each intensity interval. In addition, the aforementioned non-linear dithering methods can be implemented in the spatial domain, or the temporal domain, or both the spatial domain and the temporal domain. For example, when the non-linear dithering method is implemented in the temporal domain, the appearance frequencies of the intensities k and k+4 of a specific pixel location are determined according to the appearance probabilities of respective values within the dithering matrix decided by the function of the target curve 510.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
93133531 A | Nov 2004 | TW | national |
Number | Name | Date | Kind |
---|---|---|---|
5264840 | Wells et al. | Nov 1993 | A |
5371515 | Wells et al. | Dec 1994 | A |
5404427 | Cawley et al. | Apr 1995 | A |
5745259 | Ulichney | Apr 1998 | A |
5777599 | Poduska, Jr. | Jul 1998 | A |
5917952 | Noh | Jun 1999 | A |
5946452 | Spaulding et al. | Aug 1999 | A |
6469708 | Wu et al. | Oct 2002 | B1 |
6862111 | Lin et al. | Mar 2005 | B2 |
6995863 | Miguel | Feb 2006 | B1 |
7012717 | Easwar | Mar 2006 | B1 |
7253819 | Ganea | Aug 2007 | B1 |
7330193 | Bhattacharjya | Feb 2008 | B2 |
7330291 | Abe | Feb 2008 | B2 |
20020163528 | Cooper | Nov 2002 | A1 |
20030035146 | Yu et al. | Feb 2003 | A1 |
20040051717 | Naiki | Mar 2004 | A1 |
20040080521 | Nose et al. | Apr 2004 | A1 |
20050174360 | Daly et al. | Aug 2005 | A1 |
20060221239 | Thebault et al. | Oct 2006 | A1 |
Number | Date | Country | |
---|---|---|---|
20060092172 A1 | May 2006 | US |