The invention generally relates to an image processing circuit and an image processing method. More particularly, the invention relates to the image processing circuit and the image processing method for processing.
Traditionally, in order to increase the continuity of the gradient zone of the LED display, the color depth would be increased to eliminate the contour phenomenon. Since increasing the color depth requires higher costs, a dither computing is usually adopted. The dither computing adds various dithering values to grayscale data to make grayscale data changes smoothly, thereby visually equivalently increasing the color depth to compensate for the contour phenomenon.
However, the dither computing results in a flicker phenomenon. The dither computing includes truncating lower bit(s) of original grayscale data that is with the expected bit depth and adding dithering value(s) to the truncated grayscale data, so as to generate a plurality of dithered grayscale data to be displayed according to a given time sequence. Please referring to
The invention is directed to an image processing circuit and an image processing method, by which the flicker phenomenon can be reduced while dithering is applied.
An embodiment of the invention provides an image processing circuit. The image processing circuit includes a dither computing circuit and a blending circuit. The dither computing circuit is configured to receive an input grayscale data, and perform a dither computing on the input grayscale data to generate a dithered grayscale data. The blending circuit is coupled to the dither computing circuit. The blending circuit is configured to receive the input grayscale data and the dithered grayscale data, generate a blending weight by comparing the input grayscale data with a first threshold, and perform a blending computing on the input grayscale data and the dithered grayscale data based on the blending weight to output an output grayscale data.
In an embodiment of the invention, the dither computing circuit truncates the input grayscale data to generate a truncated input graysc ale data and adds a dithering value to the truncated input grayscale data according to a lookup table, to generate the dithered grayscale data.
In an embodiment of the invention, the blending circuit calculates a difference between the input grayscale data and the first threshold, multiplies the difference by a gain value, and truncates a result of the difference multiplied by the gain value to generate the blending weight.
In an embodiment of the invention, the blending circuit outputs the input grayscale data as the output grayscale data in response to that the blending weight equals zero.
In an embodiment of the invention, the blending circuit generates zero as the blending weight in response to the difference indicating that the input grayscale data is not greater than the first threshold.
In an embodiment of the invention, the blending circuit outputs the dithered grayscale data as the output grayscale data in response to that the blending weight equals a predetermined value which is the maximum value of the blending weight.
In an embodiment of the invention, the blending circuit generates the predetermined value as the blending weight in response to the difference indicating that the input grayscale data is greater than a second threshold, and wherein the predetermined value is the maximum value of the blending weight and the second threshold is determined based on the first threshold, the maximum value of the blending weight and the gain value.
In an embodiment of the invention, the blending circuit performs the blending computing based on a following equation.
OUT represents the output grayscale data, IN represents the input grayscale data, IND represents the dithered grayscale data, BWMAX represents a maximum of the blending weight, and BW represents the blending weight.
In an embodiment of the invention, the image processing circuit is disposed in a driving controller of a light emitting diode display.
An embodiment of the invention provides an image processing method. The image processing method includes: performing a dither computing on the input grayscale data to generate a dithered grayscale data; generating a blending weight by comparing the input grayscale data with a first threshold value; and performing a blending computing on the input grayscale data and the dithered grayscale data based on the blending weight to output an output grayscale data.
In an embodiment of the invention, the step of performing the dither computing on the input grayscale data to generate the dithered grayscale data includes: truncating the input grayscale data to generate a truncated input grayscale data and adding a dithering value to the truncated input grayscale data according to a lookup table to generate the dithered grayscale data.
In an embodiment of the invention, the step of generating the blending weight by comparing the input grayscale data with the first threshold includes: calculating a difference between the input grayscale data and the first threshold, multiplying the difference by a gain value, and truncating a result of the difference multiplied by the gain value to generate the blending weight.
In an embodiment of the invention, the image processing method further includes outputting the input grayscale data as the output grayscale data in response to that the blending weight equals zero.
In an embodiment of the invention, the image processing method further includes generating zero as the blending weight in response to the difference indicating that the input data is not greater than the first threshold.
In an embodiment of the invention, the step of generating the blending weight by comparing the input grayscale data with the first threshold further includes: outputting the dithered grayscale data as the output grayscale data in response to that the blending weight equals a predetermined value which is the maximum value of the blending weight.
In an embodiment of the invention, the step of generating the blending weight by comparing the input grayscale data with the first threshold further includes: generating the predetermined value as the blending weight in response to the difference indicating that the input grayscale data is greater than a second threshold, and wherein the predetermined value is the maximum value of the blending weight and the second threshold is determined based on the first threshold, the maximum value of the blending weight and the gain value.
In an embodiment of the invention, the step of performing the blending computing is based on a following equation.
OUT represents the output grayscale data, IN represents the input grayscale data, IND represents the dithered grayscale data, BWMAX represents a maximum of the blending weight, and BW represents the blending weight.
To make the aforementioned more comprehensible, several embodiments accompanied with drawings are described in detail as follows.
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification. The drawings illustrate exemplary embodiments of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Embodiments are provided below to describe the disclosure in detail, though the disclosure is not limited to the provided embodiments, and the provided embodiments can be suitably combined. The term “coupling/coupled” or “connecting/connected” used in this specification (including claims) of the application may refer to any direct or indirect connection means. For example, “a first device is coupled to a second device” should be interpreted as “the first device is directly connected to the second device” or “the first device is indirectly connected to the second device through other devices or connection means.” The term “signal” can refer to a current, a voltage, a charge, a temperature, data, electromagnetic wave or any one or multiple signals. In addition, the term “and/or” can refer to “at least one of”. For example, “a first signal and/or a second signal” should be interpreted as “at least one of the first signal and the second signal”.
In the present embodiment, the image processing circuit 100 may be an electronic device having an image processing function. In an embodiment, the image processing circuit 100 may be, but not limited to, a central processing unit (CPU) or a programmable microprocessor, a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC) or other similar devices or a combination of above-mentioned devices disposed in a driving controller of a light emitting diode (LED) display. The image processing circuit 100 receives input grayscale data IN of an image and performs the image processing function on the input grayscale data IN to generate output grayscale data OUT for improving the continuity of the gradient zone of the image through a digital signal processing. Each of the input grayscale data IN and the output grayscale data OUT may include a set of bits indicating a grayscale value, such as the grayscale 1 and the grayscale 4 shown in
Next, in step S220, the blending circuit 120 receives the input grayscale data IN and dithered grayscale data IND, and the blending circuit 120 compares the dithered grayscale data IND with a first threshold TH1 to generate a blending weight BW. The first threshold TH1 is a reference grayscale for comparing and may be preset according to a design requirement, and the blending weight BW is computed to determine the weights of the input grayscale data IN and the dithered grayscale data IND. Specifically, the blending circuit 120 generates a blending weight BW by means of the dithered grayscale data IND, the first threshold TH1, and a gain value M1. The detail will be discussed in
In step S230, the blending circuit 120 performs a blending computing on the input grayscale data IN and the dithered grayscale data IND based on the blending weight BW to generate an output grayscale data OUT. In particular, the blending circuit 120 computes the output grayscale data OUT by blending the input grayscale data IN and the dithered grayscale data IND through the blending weight BW. The detail will be discussed thereafter.
Next, in step S320, the dither computing circuit 110 adds a dithering value to the truncated input grayscale data INT according to a lookup table (LUT), to generate the dithered grayscale data IND. There may be a plurality of dithering values in the lookup table, and the dithering values may be selected sequentially or randomly to be added into the each truncated input grayscale data INT, but not limited. For example, in
BW=(IN−TH1)*M1>>X (1)
When the difference (IN−TH1) indicates that the input grayscale data IN is not greater than the first threshold TH1, the blending circuit 120 generates zero as the blending weight BW. When the blending weight BW equals zero, the blending circuit 120 stops the dither computing and directly outputs the input grayscale data IN as the output grayscale data OUT, so as to save computer resource. In other words, when the input grayscale data IN is small enough, the output grayscale data OUT includes less part from the dithered grayscale data IND but includes more part from the input grayscale data IN. When the difference (IN−TH1) indicates that the input grayscale data IN is greater than the first threshold TH1 and not greater the second threshold TH2, the blending weight BW will be gradually increased to a maximum value of the blending weigh BWMAX with the input grayscale data IN, and the slope M of the blending weight BW versus the input grayscale data IN can be obtained through the grain value M1>>X. In other words, when the input grayscale data IN is greater, there is more part from the dithered grayscale data IND (while less part from the input grayscale data IN) included in the output grayscale data OUT.
When the difference (IN−TH1) indicates that the input grayscale data IN is greater than a second threshold TH2 (by comparing (IN−TH1) with (TH2−TH1)), the blending circuit 120 generates the predetermined value as the blending weight BW. It is noted that the maximum value of the blending weight BWMAX and the gain value M are preset according design requirements, and the second threshold TH2 could be computed by means of the first threshold TH1, the maximum value of the blending weight BWMAX and the gain value M.
When the blending weight BW equals a predetermined value which is the maximum value of the blending weigh BWMAX, the blending circuit 120 outputs the dithered grayscale data IND as the output grayscale data OUT, so as to save computer resource.
Based on above, the blending computing of the invention decreases the dither ratio under the low input grayscale, leading to reduce the flicker phenomenon shown in LED display. Therefore, the side effect of the dither computing would be solved with a smooth gradient zone, so as to improve the user experience.
It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments without departing from the scope or spirit of the disclosure. In view of the foregoing, it is intended that the disclosure covers modifications and variations provided that they fall within the scope of the following claims and their equivalents.
Number | Name | Date | Kind |
---|---|---|---|
8300890 | Gaikwad | Oct 2012 | B1 |
8648959 | Capata | Feb 2014 | B2 |
9349161 | Tamura | May 2016 | B2 |
20020089514 | Kitahara | Jul 2002 | A1 |
20080001975 | Obara | Jan 2008 | A1 |
20150269904 | Tsai | Sep 2015 | A1 |