The invention relates generally to processing video images and more particularly to modifying image pixel values using a dithering process.
Many graphic and video displays in use receive an input digital data stream (which may be a digitized analog data stream) that is used to modulate output light intensity, for example in LCD laptop computer displays, and desktop flat panel displays. Typically three channels of data are used to create the display: red, green, and blue primaries, from which a wide spectrum of visible light can be created. More specifically, the display is represented by pixels (picture elements), where each pixel is represented by three colors (red, blue, green), and each color has eight bits of information.
Thus, it is known that to represent images with photo-realistic quality requires at least eight bits of information per color per display pixel. But for reasons that include cost, many LCD displays are manufactured that can accept only fewer than eight bits per color, perhaps only six bits or even fewer bits.
Using fewer than eight bits per color creates an image artifact known as quantizing. This undesired effect is especially noticeable in display areas of gradual change in the image. Although a smooth transition in display output intensity should be presented, the quantized image instead exhibits large jumps in output intensity. The term “quantization error” will be used herein to refer to the difference between a display image represented with eight bits per color and a display image represented with fewer than eight bits per color.
It is known in the art to reduce visibility of the quantization error by storing the difference between eight bit per color pixel values and the quantized image pixel values, and by modifying the quantized image pixel values based on such pixel error. The goal, not always attained, is to create an error pattern that is less visibly noticeable to the human eye. This process of modifying the pixel values is commonly referred to as “dithering” the image.
Representing an image with fewer bits per pixel than the original source data began with development of algorithms intended to enable black and white line printers to make a reasonable representation of photographic and computer generated images. Understandably such printers could only display one bit per pixel, e.g., black or white. Prior art methods beginning with that published in 1976 by Floyd and Steinberg sought to disperse the error between the displayed (or printed) pixel value and the original pixel value to neighboring pixels. This was done by adding the accumulated error from previous pixels to the value of the current pixel before quantizing the current pixel. After quantization, a new error signal (the difference between what was displayed for that pixel and the original pixel value plus incoming error) was applied to the following pixels in a manner intended to make the viewable error less noticeable. How to propagate the accumulated error signal differentiate various dither algorithms from each other.
Typically the error was propagated in two dimensions, using a two-dimensional mask or filter function. In video systems images are displayed on a screen sequentially from left to right, and top to bottom. Thus, propagating the error occurs in the horizontal direction to the right (as the user views the screen) and in the vertical direction downward. Understandably this requires some memory to store a portion of the error signal for use on display lines following the current display line. The need to propagate a portion of the error signal in the vertical direction arises mainly from artifacts generated by the dither process.
Generally, if dither is applied in the horizontal direction only, and an image is displayed in which successive lines are similar, the dither artifact will repeat in the same location on every line. This type of artifact is easily noticeable to the human eye, and appears as an error in the displayed image.
What is needed then is a system and method for dithering image data that preferably requires less memory than existing dithering.
The present invention provides such a method and system for dithering.
The present invention achieves the benefits of two-dimensional dither performance, but without requiring line memory. In one embodiment, vertical artifacts are broken-up and the artifact positions on a display are relocated to different locations on consecutive display lines. For each primary color (red, blue, green) the present invention creates a feedback loop by forming an input signal plus error. This error signal is then bit-limited, e.g., to 255, and the two least significant bits (LSB's) of the eight-bit wide limited signal are coupled to a delay flip-flop.
In contrast to prior art approaches that require a line memory to store vertical components of error signals, the present invention eliminates such memory and preferably presets the error signal to different values on consecutive display lines prior to the active video. So doing advantageously breaks-up the position of vertical artifact. Preferably if the magnitude of the input signal plus error exceeds the dynamic range of the video system, the present invention presets the error for each color as the error was as the start of the display line. In this fashion artifact error is avoided by repositioning, even if magnitude of the input signal plus error is a maximum value. The resultant dither function achieves two dimensional dither performance even with maximum magnitude error, without the use of line memories.
Other features and advantages of the invention will appear from the following description in which the preferred embodiments have been set forth in detail, in conjunction with the accompanying drawing.
The present invention provides an algorithm to implement a dither process that reduces the level of artifact comparable to what is present in a two dimensional system. Advantageously, the present invention can accomplish this without use of a line memory to store the vertical component of the error signal. Table 1, below, provides signal name definitions that are useful in understanding the present invention, especially in conjunction with
Referring now to
The present invention creates a feedback loop for each color primary (Red In, Green In and Blue In) by forming an input signal plus error (RPE, GPE and BPE for red, green, blue colors respectively). Using the Red In—Red Out circuit 20 as an example, RPE is formed using a summer 60 that receives the Red In input signal and a fedback version of the Red Out output signal. The signal that results from the input plus error is preferably limited, for example, to 255, for example by limiter 70. The eight-bit wide limited signal is limited to six-bit width and is stored, preferably by storing the two least significant bits (LSB's) of the eight-bit wide signal. The LSBs (shown in
If the two LSB's were delayed by one system clock cycle and added to the next set of input signals, the result would be similar to a prior art one dimensional dither function. However the present invention modifies the above procedure somewhat to achieve results comparable to a two dimensional dither function.
It is desired to remove the vertical artifact from the one dimensional dither function. As described earlier, undesirable vertical artifact generated by the one dimensional dither function can be avoided by splitting the error signal into two components. A first of the two components is added to the next pixel on the same line, and the second of the two components is added to the same pixel on the next line. This procedure has the effect of shifting the quantization error to a different location on consecutive lines. Although this known technique reduces visible artifact error, implementation requires a line memory to store the vertical component of the error signal. A challenge then is to reduce visible artifact error but without requiring use of a line memory.
Thus, one embodiment of the present invention includes breaking up the vertical artifact and relocating the position of the artifacts to different locations on consecutive lines by presetting the error signal to different values on consecutive lines prior to generating the active video. Presetting the error to different values at the start of each video line, and then accumulating the error pixel-by-pixel results in different error at vertically adjacent display pixels. The desired result is to implement two-dimensional dither performance in which visible artifact error is reduced. However this artifact reduction is attained without using a line memory, in contrast to the prior art implementation described above and earlier herein. In one embodiment, if the magnitude of the input signal plus error exceeds a magnitude determined by the system dynamic range, then the error for that color is preset to the value it had at the beginning of the line of video. Were this not done, then vertically adjacent pixels could undesirably exhibit the same error signal (e.g., maximum signal tolerated by the system), with resultant visible artifact.
Referring to logic system 50 in
Table 2 below shows the operation of logic unit 50 and provides exemplary reset data.
In the operation of logic unit 50, it is assumed that all arithmetic operations are unsigned. With respect to the register control values, DD denotes Dither Defeat, and DM denotes enabled Dither Mode.
However the effect resulting from presetting the error signal to different values on each line may be lost due to some input signal conditions. For example, if the input signal plus error exceeds the dynamic range of the system, all error signals will be set to their maximum value. If this occurs in the same location in consecutive lines, and later pixels in the same line are below this maximum value, then the error signals in consecutive lines will no longer be different from one another. This has the effect of canceling the error signal preset that was performed at the start of each line.
To avoid this undesired result, the present invention preferably compares each input signal plus error to a level that is near maximum, e.g., 252 as tested by unit 100. If this level is exceeded, then the error signal latches are again preset, as they were at the start of each line. For example, the latches holding the error signal are preferably preset at the start of each line, and may be subsequently preset if the error signal exceeds a threshold, for example, >252.
In short, the present inventions successfully implements a dither function that achieves two dimensional dither performance without the use of line memories.
Modifications and variations may be made to the disclosed embodiments without departing from the subject and spirit of the invention as defined by the following claims.
Priority is claimed from now abandoned U.S. provisional patent application Ser. No. 60/332,914 filed on Nov. 5, 2001 entitled “System and Method for Dithering with Reduced Memory”.
Number | Name | Date | Kind |
---|---|---|---|
5122884 | Gilbert et al. | Jun 1992 | A |
7081972 | Fukao | Jul 2006 | B2 |
Number | Date | Country | |
---|---|---|---|
20030122847 A1 | Jul 2003 | US |
Number | Date | Country | |
---|---|---|---|
60332914 | Nov 2001 | US |