This application claims the benefit of Taiwan application Serial No. 101107236, filed Mar. 3, 2012, the subject matter of which is incorporated herein by reference.
1. Field of the Invention
The invention relates in general to image processing, and more particularly to an image processing apparatus and associated method applied to a liquid crystal overdrive technique.
2. Description of the Related Art
An overdrive technique is prevalent in current liquid crystal displays (LCD) for enhancing a response speed of liquid crystal molecules. In the overdrive technique, an overdrive process is performed according to a previous frame and a current frame to obtain a corresponding overdrive voltage for driving liquid crystal molecules. Therefore, data of the previous frame needs to be temporarily stored in a memory when applying the overdrive technique.
To minimize a usage amount of the memory, data of the previous frame is truncated before being stored into the memory. For example, assuming each pixel in the previous frame contains 8 bits of data, but only data of 4 most significant bits out of the 8 bits is stored into the memory. Thus, information on image details of the previous frame is lost due to the truncated data of the previous frame stored in the memory. For example, due to the lost data of the least significant bits, an original continuous grayscale gradient appears as a discontinuous gradient. In other words, the overdrive technique has a tendency of downgrading the quality of an output frame by sacrificing details of a previous frame.
The invention is directed to a solution for mitigating and eliminating the foregoing issue of an unsatisfactory quality of an output frame caused by reduced memory usage amount in the overdrive technique.
According to an aspect the present invention, an image processing apparatus is provided. The apparatus comprises a memory, a processing unit and an overdriving unit. The memory stores a data-truncated previous frame. The processing unit performs an image smoothing process on the previous frame. The overdriving unit performs an overdriving process according to the processed previous frame and a current frame to generate an output frame.
According to another aspect of the present invention, an image processing method, applied to an image processing apparatus, is provided. The method comprises steps of: storing a data-truncated previous frame; performing an image smoothing process on the previous frame; and performing an overdriving process according to the processed previous frame and a current frame to generate an output frame.
The above and other aspects of the invention will become better understood with regard to the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings.
To eliminate a discontinuous gradient caused by truncated data, an image processing apparatus and associated method is provided by an embodiment below. The image processing apparatus according to an embodiment of the present invention comprises a memory, a processing unit and an overdriving unit. The memory stores a previous frame, which is data-truncated before being stored into the memory. The processing unit performs edge detection on the previous frame, and performs an image smoothing process on the previous frame according to an edge detection result. The overdriving unit performs an overdriving process according to the processed previous frame and a current frame to generate an output frame.
The image processing method according to an embodiment of the present invention comprises steps of: storing a previous frame into a memory, the previous frame being data-truncated before being stored into the memory; performing edge detection on the previous frame, and performing an image smoothing process on the previous frame according to an edge detection result; and performing an overdriving process according to the processed previous frame and a current frame to generate an output frame.
In one embodiment, the processing unit of the present invention comprises an edge detecting unit, a coefficient selecting unit and a low-pass filter. The edge detecting unit performs edge detection on a target block in a plurality of blocks of the data-truncated previous frame to generate the edge detection result. The coefficient selecting unit determines a set of filter coefficients according to the edge detection result. The low-pass filter performs the image smoothing process according to the set of filter coefficients to repair the truncated data of the previous frame.
Referring to
The image processing method is applicable to the image processing apparatus 10, and comprises the following steps. In Step 21, the memory 11 stores the previous frame F(n−1)[7:4], which contains only data of bit 7 to bit 4 of each pixel. That is to say, data of bit 3 to bit 0 in each pixel in the previous frame F(n−1) is truncated. In Step 22, the processing unit 12 performs edge detection on the previous frame F(n−1)[7:4], and performs an image smoothing process on the previous frame F(n−1)[7:4] according to an edge detection result to repair the truncated data of the previous frame. Accordingly, each pixel in the processed previous frame F′(n−1)[7:0] is provided with complete 8 bits of data. In Step 23, the overdriving unit 13 performs an overdriving process according to the repaired previous frame F′(n−1)[7:0] and the current frame F(n)[7:0] to generate an output frame OD_out.
Referring to
In Step 222, the coefficient selecting unit 122 determines a set of filter coefficients according to the edge detection result. More specifically, the coefficient selecting unit 122 determines a pixel value distribution of the target block according to the edge detection result, so as to determine a filter interval from the target block and a set of filter coefficients. The coefficient selecting unit 122 further determines whether the pixel value distribution detected in the interval is monotonically increasing or monotonically decreasing. When the pixel value distribution is concurrently increasing and decreasing, it means the interval contains real image edges. Thus, by determining whether the pixel value distribution is monotonically increasing or monotonically decreasing, the coefficient selecting unit 122 identifies the discontinuous gradient caused by the truncated image data in the previous frame F(n−1)[7:4].
A coefficient sum of the set of filter coefficients corresponds to a ratio of a grayscale resolution of the current frame F(n)[7:0] and a grayscale resolution of the previous frame F(n−1)[7:4]. More specifically, the current frame F(n)[7:0] has a grayscale resolution of 256 by having 8 bits of data, whereas the previous frame F(n−1)[7:4] has a grayscale resolution of 16 by having only 4 bits of data. Thus, the grayscale resolution ratio of the current frame F(n)[7:0] and the previous frame F(n−1)[7:4] is 16, and so the sum of each set of filter coefficients corresponds to 16. In fact, the grayscale resolution ratio of the current frame F(n)[7:0] and the previous frame F(n−1)[7:4] equals the grayscale resolution of the truncated data of the previous frame. In this embodiment, the previous frame is truncated by 4 bits of data, which represents 16 levels of grayscale. It is concluded that the sum of each set of filter coefficients is physically determined by the bit count of the truncated data of the previous frame. In Step 223, the low-pass filter 223 performs the image smoothing process on the target block according to the set of filter coefficients to eliminate the discontinuous gradient and to repair the data of the previous frame F(n−1)[7:4].
For example, the target block includes pixels Pn−7 to Pn+7. The coefficient selecting unit 122 determines the pixel value distribution of the pixels Pn−1 to Pn+7 of the target block according to the edge detection result to accordingly determine a filter interval from the target block and a set of filter coefficients. When performing Step 221, the edge detecting unit 121 subtracts a pixel value of every two neighboring pixels from the other in the pixels Pn−7 to Pn+7 to respectively obtain a pixel difference. The pixel differences may be represented by pixel differences Dn−6 to Dn+7. For example, the pixel difference Dn−6 equals the pixel value Pn−5 subtracted from Pn−6, the pixel difference Dn+7 equals the pixel value Pn+6 subtracted from Pn+7, and so forth.
The coefficient selecting unit 122 determines whether the pixel value distribution of the pixels Pn−7 to Pn+7 is monotonically increasing or monotonically decreasing according to the pixel differences Dn−6 to Dn+7, and determines whether an absolute value of the pixel difference between the pixel Pn+7 and the pixel Pn−7 is not greater than a threshold. The pixel difference between the pixel Pn+7 and the pixel Pn−7 is the foregoing neighboring pixel difference. When the pixel value distribution of the pixels Pn−7 to Pn+7 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixel Pn+7 and the pixel Pn−7 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[1 1 1 1 1 1 1 2 1 1 1 1 1 1 1]. The coefficient selecting unit 122 further determines that the filter interval is 15 taps. After determining the filter coefficients and the filter interval, the low-pass filter 223 generates a pixel value of a target pixel in the target interval according to the set of filter coefficients and the pixel values of the pixels in the filter interval. In this example, the low-pass filter 223 generates the pixel value of a target pixel according to the pixel values of 15 pixels in the filter interval and the corresponding filter coefficients. For example, the target pixel is a middle pixel in the filter interval.
Conversely, when the pixel value distribution of the pixels Pn−7 to Pn+7 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−7 and Pn+7 is greater than the threshold, the coefficient selecting unit 122 decreases the filter interval.
The coefficient selecting unit 122 then determines whether the pixel value distribution of the pixels Pn−6 to Pn+6 is monotonically increasing or monotonically decreasing according to the pixel differences Dn−5 to Dn+6, and determines whether the neighboring pixel difference between the pixels Pn−6 and Pn+6 is not greater than a threshold. When the pixel value distribution of the pixels Pn−6 to Pn+6 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixels Pn−6 and Pn+6 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 1 1 1 1 1 2 2 2 1 1 1 1 1 0]. The coefficient selecting unit 122 further changes the filter interval from 15 taps to 13 taps.
Conversely, when the pixel value distribution of the pixels Pn−6 to Pn+6 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−6 and Pn+6 is greater than the threshold, the coefficient selecting unit 122 determines whether the pixel value distribution of the pixels Pn−5 to Pn+5 is monotonically increasing or monotonically decreasing according to the pixel differences Dn−4 to Dn+5, and determines whether the neighboring pixel difference between the pixels Pn−5 and Pn+5 is not greater than a threshold. When the pixel value distribution of the pixels Pn−5 to Pn+5 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixels Pn−5 and Pn+5 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 0 1 1 1 2 2 2 2 2 1 1 1 0 0]. The coefficient selecting unit 122 further changes the filter interval from 13 taps to 11 taps.
Conversely, when the pixel value distribution of the pixels Pn−5 to Pn+5 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−5 and Pn+5 is greater than the threshold, the coefficient selecting unit 122 determines whether the pixel value distribution of the pixels Pn−4 to Pn+4 is monotonically increasing or monotonically decreasing according to the pixel differences Dn−3 to Dn+4, and determines whether the neighboring pixel difference between the pixels Pn−4 and Pn+4 is not greater than a threshold. When the pixel value distribution of the pixels Pn−4 to Pn+4 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixels Pn−4 and Pn+4 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 0 0 1 2 2 2 2 2 2 2 1 0 0 0]. The coefficient selecting unit 122 further changes the filter interval from 11 taps to 9 taps.
Conversely, when the pixel value distribution of the pixels Pn−4 to Pn+4 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−4 and Pn+4 is greater than the threshold, the coefficient selecting unit 122 determines whether the pixel value distribution of the pixels Pn−3 to Pn+3 is monotonically increasing or monotonically decreasing according to the pixel differences Dn−2 to Dn+3, and determines whether the neighboring pixel difference between the pixels Pn−3 and Pn+3 is not greater than a threshold. When the pixel value distribution of the pixels Pn−3 to Pn+3 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixels Pn−3 and Pn+3 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 0 0 0 2 2 2 4 2 2 2 0 0 0 0]. The coefficient selecting unit 122 further changes the filter interval from 9 taps to 7 taps.
Conversely, when the pixel value distribution of the pixels Pn−3 to Pn+3 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−3 and Pn+3 is greater than the threshold, the coefficient selecting unit 122 determines whether the pixel value distribution of the pixels Pn−2 to Pn+2 is monotonically increasing or monotonically decreasing according to the pixel differences Dn−1 to Dn+2, and determines whether the neighboring pixel difference between the pixels Pn−2 and Pn+2 is not greater than a threshold. When the pixel value distribution of the pixels Pn−2 to Pn+2 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixels Pn−2 and Pn+2 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 0 0 0 0 2 4 4 4 2 0 0 0 0 0]. The coefficient selecting unit 122 further changes the filter interval from 7 taps to 5 taps.
Conversely, when the pixel value distribution of the pixels Pn−2 to Pn+2 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−2 and Pn+2 is greater than the threshold, the coefficient selecting unit 122 determines whether the pixel value distribution of the pixels Pn−1 to Pn+1 is monotonically increasing or monotonically decreasing according to the pixel differences Dn to Dn+1, and determines whether the neighboring pixel difference between the pixels Pn−1 and Pn+1 is not greater than a threshold. When the pixel value distribution of the pixels Pn−1 to Pn+1 is monotonically increasing or monotonically decreasing and the neighboring pixel difference between the pixels Pn−1 and Pn+1 is not greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 0 0 0 0 0 4 8 4 0 0 0 0 0 0]. The coefficient selecting unit 122 further changes the filter interval from 5 taps to 3 taps.
Conversely, when the pixel value distribution of the pixels Pn−1 to Pn+1 is not monotonically increasing or monotonically decreasing, or when the neighboring pixel difference between the pixels Pn−1 and Pn+1 is greater than the threshold, the coefficient selecting unit 122 selects a corresponding set of filter coefficients Coef=[0 0 0 0 0 0 0 16 0 0 0 0 0 0 0]. The coefficient selecting unit 122 further changes the filter interval from 3 taps to 1 tap. When the coefficient selecting unit 122 selects the set of filter coefficients Coef=[0 0 0 0 0 0 0 16 0 0 0 0 0 0 0], it means the low-pass filter 123 does not perform low-pass filter.
The above examples can be implemented by a processor executing the code below:
Dn=Pn−Pn−1
Coef=[1 1 1 1 1 1 1 2 1 1 1 1 1 1 1]
else if {(((Dn−5˜Dn+6)>=0 or ((Dn−5˜Dn+6)<=0))&abs(Pn+6-Pn−6)<=1))}
Coef=[0 1 1 1 1 1 2 2 2 1 1 1 1 1 0]
else if {(((Dn−4˜Dn+5)>=0 or ((Dn−4˜Dn+5)<=0))&(abs(Pn+5-Pn−5)<=1))}
Coef=[0 0 1 1 1 2 2 2 2 2 1 1 1 0 0]
else if {(((Dn−3˜Dn+4)>=0 or ((Dn−3˜Dn+4)<=0))&(abs(Pn+4-Pn−4)<=1))}
Coef=[0 0 0 1 2 2 2 2 2 2 2 1 0 0 0]
else if {(((Dn−2˜Dn+3)>=0 or ((Dn−2˜Dn+3)<=0))&(abs(Pn+3-Pn−3)<=1))}
Coef=[0 0 0 0 2 2 2 4 2 2 2 0 0 0 0]
else if {(((Dn−1˜Dn+2)>=0 or ((Dn−1˜Dn+2)<=0))&(abs(Pn+2-Pn−2)<=1))}
Coef=[0 0 0 0 0 2 4 4 4 2 0 0 0 0 0]
else if {(((Dn˜Dn+1)>=0 or ((Dn˜Dn+1)<=0))&(abs(Pn+1-Pn−1)<=1))}
Coef=[0 0 0 0 0 0 4 8 4 0 0 0 0 0 0]
else Coef=[0 0 0 0 0 0 0 16 0 0 0 0 0 0 0]
With the above description of the embodiment, it is illustrated that the image processing apparatus and the image processing method of the present invention are capable of eliminating the discontinuous gradient caused by the truncated data in the previous frame, thereby effectively enhancing the image quality as well as increasing product competitiveness.
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.
Number | Date | Country | Kind |
---|---|---|---|
101107236 | Mar 2012 | TW | national |