This patent application is based on a Taiwan, R.O.C. patent application No. 97138824 filed on Oct. 9, 2008.
The present invention relates to image processing, and more particularly, to a de-ringing device and a method thereof.
Referring to
In view of the foregoing issues, one object of the present invention is to provide a de-ringing device capable of determining a proper de-ringing intensity to improve an overall display effect of an image, and a method thereof.
The present invention discloses a de-ringing device, operative with a lookup table. The de-ringing device comprises a buffer, and a de-ringing intensity determining unit. The buffer temporarily stores an input pixel sequence. The lookup table stores a plurality of intensity coefficients. The de-ringing intensity determining unit, coupled to the buffer and the lookup table, detects a pixel complexity of a first pixel group and a second pixel group associated with a target pixel in the input pixel sequence, and looks up the lookup table according to the pixel complexities of the first pixel group and the second pixel group, so as to determine a de-ringing intensity coefficient corresponding to the target pixel.
The present invention further discloses a de-ringing method, comprising steps of providing a lookup table for storing a plurality of intensity coefficients, receiving an input pixel sequence, detecting a plurality of pixel complexities of a first pixel group and a second pixel group associated with a target pixel in the input pixel sequence, and looking up the lookup table according to the pixel complexities of the first pixel group and the second pixel group to determine a de-ringing intensity coefficient corresponding to the target pixel. A pixel length of the first pixel group and a pixel length of the second pixel group are determined according to an image resolution of the input pixel sequence.
The de-ringing intensity controller 22 comprises a buffer 221, a lookup table 222 and a de-ringing intensity determining unit 223. The buffer 221 receives the input video signal, and temporarily stores a part of the input pixel sequence, such as a display window. The lookup table 222 stores a plurality of intensity coefficients. The de-ringing intensity determining unit 223 defines two input pixel subsets associated with a target pixel of the input pixel sequence. The two input pixel subsets are respectively called a first pixel group and a second pixel group, of which a pixel complexity C1 and a pixel complexity C2 are detected respectively. A de-ringing intensity coefficient corresponding to the target pixel is then determined according to the pixel complexities C1 and C2. The de-ringing intensity determining unit 223 determines a de-ringing intensity coefficient corresponding to each pixel of the input pixel sequence. For example, each pixel of the input pixel sequence is regarded as the target pixel. The de-ringing intensity coefficients are generated to the blending unit 23 to perform blending to be described in detail. In this embodiment, the first pixel group comprises M pixels before the target pixel, and the second pixel group comprises N pixels after the target pixel, where M and N are positive integers. C1 and C2 respectively represent the pixel complexities of the pixels in the input pixel sequence before and after the target pixel. Preferably, values of M and N are programmed in a register (not shown) of the de-ringing intensity controller 22. Alternatively, the values of M and N are automatically adjusted according to an image resolution of the image. For instance, when the image resolution is high, differences between the neighboring pixels are increased and hence smaller values of M and N are enough to reflect the pixel complexities of the pixels in the input pixel sequence before and after the target pixel. When the image resolution is low, M and N are preferably greater.
For example, the pixel complexity C1 of the first pixel group is determined according to a difference between a greatest pixel value and a smallest pixel value in the first pixel group. The pixel complexity C2 of the second pixel group is determined according to a difference between a greatest pixel value and a smallest pixel value in the second pixel group. Alternatively, the pixel complexity C1 is determined according to a standard deviation of the pixel value in the first pixel group, and the pixel complexity C2 is determined according to a standard deviation of the pixel value in the second pixel group. Alternatively, the pixel complexities C1 and C2 are determined according to a sum of absolute differences between adjacent pixel values. According to the foregoing disclosure, a person having ordinary skills in the art can make various modifications with respect to detecting the pixel complexities of the first pixel group and the second pixel group. The spirit and scope of the appended claims shall encompass all various modifications and similar arrangements.
The blending unit 23, coupled to the sharpness enhancement circuit 21 and the de-ringing intensity controller 22, performs alpha blending on the input video signal and the enhanced video signal generated by the sharpness enhancement circuit 21, according to a de-ringing intensity coefficient called a generated by the de-ringing intensity controller 22, to generate an output video signal. Therefore, the blending unit 23 performs alpha blending on the target pixel of the input pixel sequence and an enhanced target pixel of an enhanced pixel sequence, to generate the output video signal with removed ringing effect. For example, the blending unit 23 comprises a multiplier 231, a multiplier 232 and an adder 233. The multiplier 231 multiplies the enhanced video signal generated by the sharpness enhancement circuit 21 by the de-ringing intensity coefficient α generated by the de-ringing intensity determining unit 22. The multiplier 232 multiplies the target pixel by a difference between 1 and the de-ringing intensity coefficient α, i.e., 1−α. The adder 233 sums up outputs of the multiplier 231 and 232 to complete alpha blending. Accordingly, when the de-ringing intensity coefficient becomes greater, the proportion of the enhanced video signal in alpha blending is greater. That is, when the proportion of the input video signal becomes smaller, it means that the tendency to enhance the sharpness stands more dominant. Accordingly, the de-ringing effect becomes weaker. Conversely, when the de-ringing intensity coefficient becomes smaller, the proportion of the enhanced video signal in the alpha blending calculation is smaller. That is, when the proportion of the input video signal becomes greater, it means that the tendency to remain at an original appearance of the input video signal prevails. Accordingly, the de-ringing effect becomes stronger. It should be noted that, the type of blending performed by the blending unit 23 is not limited to alpha blending. Provided that the proportions of the input video signal and the enhanced video signal in the output video signal generated by the calculation performed by the blending unit 23 vary along with changes of the de-ringing intensity coefficient, various blending algorithms may be applied and are included within the scope of invention.
In this embodiment, the de-ringing intensity determining unit 223 determines the de-ringing intensity coefficient, according to a comparison result of the pixel complexity C1 in the first pixel group and a first threshold T1 and a comparison result of the pixel complexity C2 in the second pixel group and a second threshold T2. Refer to
On the contrary, when C1 is smaller than T1 and C2 is smaller than T2, the pixel complexities of the input pixel sequence before and after the target pixel are both low. That is, the pixels before and after the target pixel are both in the flat area, meaning that the target pixel is in the flat area. Since the input pixel sequence positions in the flat area, the ringing effect caused by the sharpness enhancement circuit 21 is not obvious such that de-ringing is not needed much. Therefore, the de-ringing intensity determining unit 223 generates a de-ringing intensity coefficient corresponding to a low de-ringing intensity, so as to increase the proportion of the enhanced video signal when the blending unit 23 performs alpha blending. Furthermore, when C1 is greater than T1 and C2 is greater than T2, the pixel complexities of the input pixel sequence before and after the target pixel are both high. The pixels before and after the target pixel are both in the flat area, meaning that the target pixel positions in the complex area. Since the input pixel sequence is in the complex area, the ringing effect caused by the sharpness enhancement circuit 21 may further enhance the sharpness of the image without resulting in an undesirable effect, namely, the abrupt edges. Therefore, the de-ringing intensity determining unit 223 generates a de-ringing intensity coefficient corresponding to a low de-ringing intensity, so as to increase the proportion of the enhanced video signal when the blending unit 23 performs alpha blending.
Referring to
In this embodiment, the pixels represented by the first pixel group and the second pixel group are partially overlapped. Preferably, the overlapped pixels between the first pixel group and the second pixel group are programmable in a register (not shown in
For example, suppose that the target pixel positions at the image edge, and the pixels before and after the target pixel are respectively the flat area and the complex area. When the first pixel group and the second pixel group, respectively representing pixel subsets before and after the target pixel, do not overlap with one another, the first pixel group and the second pixel group are respectively the flat area and the complex area. When the number of overlapped pixels between the first pixel group and the second pixel group becomes greater, pixels of originally in the first pixel group of the flat area may extend to the complex area covering the target pixel originally at the image edge and the second pixel group originally in the complex area. However, the second pixel group originally in the complex area remains in the complex area, and does not change when the number of the overlapped pixels becomes greater. Consequently, the target pixel which is originally determined as being at an edge of the image shall be determined as being in the complex area due to increasing the number of overlapped pixels. The blending unit 23 then performs alpha blending having a low de-ringing intensity, and hence the ringing of the output video signal becomes wider. Preferably, the number of overlapped pixels between the first pixel group and the second pixel group is configurable.
The input video signal received in Step 60 can be represented by a pixel sequence comprising a plurality of pixels, such as a horizontal line, a vertical line or a diagonal line of an image. In Step 61, differences between the pixels of the pixel sequence and adjacent pixels are enlarged to enhance the sharpness.
In Step 62, pixel complexities of a first pixel group and the second pixel group associated with a target pixel in the pixel sequence are respectively detected to determine the de-ringing intensity coefficient corresponding to the target pixel. For example, the pixel complexities of the first pixel group and the second pixel group respectively correspond to those of the pixels before and after the target pixel. The first pixel group comprises M pixels before the target pixel, and the second pixel group comprises N pixels after the target pixel, where M and N are positive integers and are determined according to an image resolution. In other words, the pixel length of the first pixel group and the pixel length of the second pixel group may vary with the image resolution of the input pixel sequence. Furthermore, in order to widen a ringing included in the output video signal in Step 63, the number of overlapped pixels between the first pixel group and the second pixel group is increased in Step 62. The ringing gets wider as the number of overlapped pixels gets greater. For example, the pixel complexity of the first pixel group is determined according a difference between a greatest pixel value and a smallest pixel value of the first pixel group. The pixel complexity of the second pixel group can be similarly determined according to a difference between a greatest pixel value and a smallest pixel value of the second pixel group.
The de-ringing intensity coefficient is further determined according to a comparison result of a pixel complexity C1 and a first threshold T1 and a comparison result of a pixel complexity C2 and a second threshold T2 in Step 62. For example, when C1 is smaller than T1 and C2 is greater than T2, the de-ringing intensity coefficient corresponds to a high de-ringing intensity. When C1 is smaller than T1 and C2 is smaller than T2, the de-ringing intensity coefficient corresponds to a low de-ringing intensity. When C1 is greater than T1 and C2 is greater than T2, the de-ringing intensity coefficient corresponds to a low de-ringing intensity. When C1 is greater than T1 and C2 is smaller than T2, the de-ringing intensity coefficient corresponds to a high de-ringing intensity. For example, the de-ringing intensity coefficient is quickly determined by looking up a lookup table, which stores de-ringing intensity coefficients corresponding to different pixel complexities of the first pixel group and the second pixel group.
In Step 63, alpha blending can be applied, but the invention is not limited thereto. Provided that the proportions of the input video signal and the enhanced video signal in the output video signal generated by the blending vary along with changes of the de-ringing intensity coefficient, various blending algorithms may be applied.
While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it should be understood that the invention needs not to be limited to the above embodiments. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.
Number | Date | Country | Kind |
---|---|---|---|
097138824 | Oct 2008 | TW | national |