A method for processing an image includes the following steps. A data of the image including a first pixel and a second pixel adjacent to each other is provided. A first subpixel of the first pixel and a second subpixel of the second pixel are set as a higher subpixel and a lower subpixel. A lookup process is performed to determine a shifted gray level of the higher subpixel and a shifted gray level of the lower subpixel in accordance with the gray level of the higher subpixel and the gray level of the lower subpixel respectively. A gray level of the higher subpixel and a gray level of the lower subpixel are updated in accordance with the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel.
|
1. A method for processing an image, comprising:
providing a data of the image, wherein the image comprises a first pixel and a second pixel adjacent to each other, wherein each of the first pixel and the second pixel has a plurality of subpixels, wherein the data comprises a gray level of each of the subpixels;
setting a first subpixel of the subpixels of the first pixel and a second subpixel of the subpixels of the second pixel as a higher subpixel and a lower subpixel, wherein the color of the first subpixel is the same as the color of the second subpixel;
performing a lookup process to determine a shifted gray level of the higher subpixel and a shifted gray level of the lower subpixel in accordance with the gray level of the higher subpixel and the gray level of the lower subpixel respectively, wherein the shifted gray level of the higher subpixel is greater than the shifted gray level of the lower subpixel; and
updating the gray level of the first subpixel and the gray level of the second subpixel in accordance with the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel;
wherein setting the first subpixel and the second subpixel as the higher subpixel and the lower subpixel comprises,
calculating a gray-level difference which is a difference between the gray level of the first subpixel and the gray level of the second subpixel;
determining the first subpixel and the second subpixel as the higher subpixel and the lower subpixel if the gray-level difference is less than a difference threshold; and
determining the first subpixel and the second subpixel as the lower subpixel and the higher subpixel if the gray-level difference is greater than or equal to the difference threshold.
21. A method for processing an image, comprising:
providing a data of the image, wherein the image comprises a plurality of pixels, wherein each of the pixels has a plurality of subpixels, the data comprises a gray level of each of the subpixels, wherein the pixels comprise a first pixel and a second pixel positioned at a first column in sequence, wherein the pixels further comprise a third pixel and a fourth pixel positioned at a second column in sequence, wherein the first column is adjacent to the second column, wherein the first pixel is adjacent to the third pixel;
setting a first subpixel of the subpixels of the first pixel, a second subpixel of the subpixels of the second pixel, a third subpixel of the subpixels of the third pixel, and a fourth subpixel of the subpixels of the fourth pixel as a first higher subpixel, a first lower subpixel, a second higher subpixel, and a second lower subpixel, wherein the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel have the same color;
performing a lookup process to determine a shifted gray level of the first higher subpixel and a shifted gray level of the first lower subpixel in accordance with the gray level of the first higher subpixel and the gray level of the first lower subpixel, respectively;
performing a recovery process to determine a shifted gray level of the second higher subpixel and a shifted gray level of the second lower subpixel in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively; and
updating the gray level of the first subpixel, the gray level of the second subpixel, the gray level of the third subpixel, and the gray level of the fourth subpixel in accordance with the shifted gray level of the first subpixel, the shifted gray level of the second subpixel, the shifted gray level of the third subpixel, and the shifted gray level of the fourth subpixel, respectively.
11. A device for processing an image, comprising:
a receiving circuit configured to receive a data of the image, wherein the image comprises a first pixel and a second pixel adjacent to each other, wherein each of the first pixel and the second pixel has a plurality of subpixels, wherein the data comprises a gray level of each of the subpixels;
a setting circuit configured to set a first subpixel of the subpixels of the first pixel and a second subpixel of the subpixels of the second pixel as a higher subpixel and a lower subpixel, wherein the color of the first subpixel is the same as the color of the second subpixel;
a lookup circuit configured to perform a lookup process to determine a shifted gray level of the higher subpixel and a shifted gray level of the lower subpixel in accordance with the gray level of the higher subpixel and the gray level of the lower subpixel respectively, wherein the shifted gray level of the higher subpixel is greater than the shifted gray level of the lower subpixel; and
an updating circuit configured to update the gray level of the first subpixel and the gray level of the second subpixel in accordance with the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel;
wherein the setting circuit is configured to perform the following steps:
calculating a gray-level difference which is a difference between the gray level of the first subpixel and the gray level of the second subpixel;
determining the first subpixel and the second subpixel as the higher subpixel and the lower subpixel if either the gray-level difference is less than a difference threshold or the gray level of the first subpixel is greater than or equal to the gray level of the second subpixel; and
determining the first subpixel and the second subpixel as the lower subpixel and the higher subpixel if the gray-level difference is greater than or equal to the difference threshold and the gray level of the first subpixel is less than the gray level of the second subpixel.
27. A device for processing an image, comprising:
a receiving circuit configured to receive a data of the image, wherein the image comprises a plurality of pixels, wherein each of the pixels has a plurality of subpixels, the data comprises a gray level of each of the subpixels, wherein the pixels comprise a first pixel and a second pixel positioned at a first column in sequence, wherein the pixels further comprise a third pixel and a fourth pixel positioned at a second column in sequence, wherein the first column is adjacent to the second column, wherein the first pixel is adjacent to the third pixel;
a setting circuit configured to set a first subpixel of the subpixels of the first pixel, a second subpixel of the subpixels of the second pixel, a third subpixel of the subpixels of the third pixel, and a fourth subpixel of the subpixels of the fourth pixel as a first higher subpixel, a first lower subpixel, a second higher subpixel, and a second lower subpixel, wherein the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel have the same color;
a lookup circuit configured to perform a lookup process to determine a shifted gray level of the first higher subpixel and a shifted gray level of the first lower subpixel in accordance with the gray level of the first higher subpixel and the gray level of the first lower subpixel, respectively;
a recovery lookup circuit configured to perform a recovery process to determine a shifted gray level of the second higher subpixel and a shifted gray level of the second lower subpixel in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively; and
an updating circuit configured to update the gray level of the first subpixel, the gray level of the second subpixel, the gray level of the third subpixel, and the gray level of the fourth subpixel in accordance with the shifted gray level of the first subpixel, the shifted gray level of the second subpixel, the shifted gray level of the third subpixel, and the shifted gray level of the fourth subpixel, respectively.
2. The method of
performing an edge detection on the first subpixel and on the second subpixel respectively to determine whether an edge is presented;
decreasing the shifted gray level of the higher subpixel to obtain a decreased shifted gray level, and increasing the shifted gray level of the lower subpixel to obtain an increased shifted gray level, if the edge is presented; and
replacing the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel with the decreased shifted gray level and the increased shifted gray level, respectively, before updating the gray level of the first subpixel and the gray level of the second subpixel, if the edge is presented.
3. The method of
wherein performing the edge detection on the first subpixel and on the second subpixel respectively to determine whether the edge is presented comprises:
calculating a gray level difference of the first subpixel which is a difference between the gray level of the first subpixel and a gray level of a third subpixel of the subpixels of the neighboring pixels of the first pixel, wherein the color of the third subpixel is the same as the color of the first subpixel;
calculating a gray level difference of the second subpixel which is the difference between the gray level of the second subpixel and a gray level of a fourth subpixel of the subpixels of the neighboring pixels of the second pixel, wherein the color of the fourth subpixel is the same as the color of the second subpixel; and
determining the edge is presented if either a greatest value of the gray level differences of the first subpixel is larger than or equal to an edge threshold or a greatest value of the gray level differences of the second subpixel is larger than or equal to the edge threshold.
4. The method of
wherein a formula of decreasing the shifted gray level of the higher subpixel to obtain the decreased shifted gray level is as follows:
wherein a function of “ROUND” means to round up to a nearest integer, wherein a function of “LUT” means to perform the lookup process, wherein an input of “SGLH” means the shifted gray level of the higher subpixel, wherein an input of “GLH” means the gray level of the higher subpixel, wherein a higher pixel comprising the higher subpixel has a plurality of neighboring pixels, wherein each of the neighboring pixels has a plurality of subpixels, and the neighboring pixels of the higher pixel do not comprise the other pixels positioned in a next row of the higher pixel, wherein an input of “MAXH” means a greatest value of the gray levels of the higher subpixel and each of a gray level of a fifth subpixel of the subpixels of the neighboring pixels of the higher pixel, wherein the color of the fifth subpixel is the same as the color of the higher subpixel.
5. The method of
wherein a formula of increasing the shifted gray level of the lower subpixel to obtain the increased shifted gray level is as follows:
wherein a function of “ROUND” means to round up to a nearest integer, wherein a function of “LUT” means to perform the lookup process, wherein an input of “SGLL” means the shifted gray level of the lower subpixel, wherein an input of “GLL” means the gray level of the lower subpixel, wherein a lower pixel comprising the lower subpixel has a plurality of neighboring pixels, wherein each of the neighboring pixels has a plurality of subpixels, and the neighboring pixels of the lower pixel do not comprise the other pixels positioned in a next row of the lower pixel, wherein an input of “MAXL” means a greatest value of the gray levels of the lower subpixel and each of a gray level of a sixth subpixel of the subpixels of the neighboring pixels of the lower pixel, wherein the color of the sixth subpixel is the same as the color of the lower subpixel.
6. The method of
performing a color conversion to obtain a plurality of color values of the first pixel and a plurality of color values of the second pixel in accordance with the gray levels of the subpixels of the first pixel and the gray levels of the subpixels of the second pixel respectively;
performing a color lookup process to determine a corrected gain of the first subpixel and a corrected gain of the second subpixel in accordance with the color values of the first pixel and the color values of the second pixel respectively; and
multiplying the gray level of the first subpixel by the corrected gain of the first subpixel, and multiplying the gray level of the second subpixel by the corrected gain of the second subpixel, before performing the lookup process.
7. The method of
8. The method of
9. The method of
10. The method of
performing an RGB-to-RGBW conversion before setting the first subpixel and the second subpixel.
12. The device of
an edge detection circuit configured to perform an edge detection on the first subpixel and on the second subpixel respectively to determine whether an edge is presented;
an edge correction circuit configured to decrease the shifted gray level of the higher subpixel to obtain a decreased shifted gray level and to increase the shifted gray level of the lower subpixel to obtain an increased shifted gray level, and to replace the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel with the decreased shifted gray level and the increased shifted gray level before updating the gray level of the first subpixel and the gray level of the second subpixel, respectively, if the edge is presented.
13. The device of
wherein the edge detection circuit is configured to perform the following steps:
calculating a gray level difference of the first subpixel which is a difference between the gray level of the first subpixel and a gray level of a third subpixel of the subpixels of the neighboring pixels of the first pixel, wherein the color of the third subpixel is the same as the color of the first subpixel;
calculating a gray level difference of the second subpixel which is the difference between the gray level of the second subpixel and a gray level of a fourth subpixel of the subpixels of the neighboring pixels of the second pixel, wherein the color of the fourth subpixel is the same as the color of the second subpixel; and
determining the edge is presented if either a greatest value of the gray level differences of the first subpixel is larger than or equal to an edge threshold or a greatest value of the gray level differences of the second subpixel is larger than or equal to the edge threshold.
14. The device of
wherein a formula of decreasing the shifted gray level of the higher subpixel to obtain the decreased shifted gray level is as follows:
wherein a function of “ROUND” means to round up to a nearest integer, wherein a function of “LUT” means to perform the lookup process, wherein an input of “SGLH” means the shifted gray level of the higher subpixel, wherein an input of “GLH” means the gray level of the higher subpixel, wherein a higher pixel comprising the higher subpixel has a plurality of neighboring pixels, wherein each of the neighboring pixels has a plurality of subpixels, and the neighboring pixels of the higher pixel do not comprise the other pixels positioned in a next row of the higher pixel, wherein an input of “MAXH” means a greatest value of the gray levels of the higher subpixel and each of a gray level of a fifth subpixel of the subpixels of the neighboring pixels of the higher pixel, wherein the color of the fifth subpixel is the same as the color of the higher subpixel.
15. The device of
wherein a formula of increasing the shifted gray level of the lower subpixel to obtain the increased shifted gray level is as follows:
wherein a function of “ROUND” means to round up to a nearest integer, wherein a function of “LUT” means to perform the lookup process, wherein an input of “SGLL” means the shifted gray level of the lower subpixel, wherein an input of “GLL” means the gray level of the lower subpixel, wherein a lower pixel comprising the lower subpixel has a plurality of neighboring pixels, wherein each of the neighboring pixels has a plurality of subpixels, and the neighboring pixels of the lower pixel do not comprise the other pixels positioned in a next row of the lower pixel, wherein an input of “MAXL” means a greatest value of the gray levels of the lower subpixel and each of a gray level of a sixth subpixel of the subpixels of the neighboring pixels of the lower pixel, wherein the color of the sixth subpixel is the same as the color of the lower subpixel.
16. The device of
a color conversion circuit configured to perform a color conversion to obtain a plurality of color values of the first pixel and a plurality of color values of the second pixel in accordance with the gray levels of the subpixels of the first pixel and the gray levels of the subpixels of the second pixel respectively;
a color lookup circuit configured to perform a color lookup process to determine a corrected gain of the first subpixel and a corrected gain of the second subpixel in accordance with the color values of the first pixel and the color values of the second pixel respectively; and
wherein the updating circuit is further configured to multiply the gray level of the first subpixel by the corrected gain of the first subpixel and to multiply the gray level of the second subpixel by the corrected gain of the second subpixel, before performing the lookup process.
17. The device of
18. The device of
19. The device of
20. The device of
an RGB-to-RGBW conversion circuit configured to perform an RGB-to-RGBW conversion before setting the first subpixel and the second subpixel.
22. The method of
performing a recovery lookup process to determine a second higher gain value and a second lower gain value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively;
multiplying the shifted gray level of the first higher subpixel by the second higher gain value to determine the shifted gray level of the second higher subpixel; and
multiplying the shifted gray level of the first lower subpixel by the second lower gain value to determine the shifted gray level of the second lower subpixel.
23. The method of
performing a recovery lookup process to determine a second higher difference value and a second lower difference value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively;
adding the second higher difference value to the shifted gray level of the first higher subpixel to determine the shifted gray level of the second higher subpixel; and
adding second lower difference value to the shifted gray level of the first lower subpixel to determine the shifted gray level of the second lower subpixel.
24. The method of
setting the first subpixel as the first higher subpixel;
setting the second subpixel as the first lower subpixel;
setting the third subpixel as the second lower subpixel; and
setting the fourth subpixel as the second higher subpixel.
25. The method of
setting the first subpixel as the first lower subpixel;
setting the second subpixel as the first higher subpixel;
setting the third subpixel as the second higher subpixel; and
setting the fourth subpixel as the second lower subpixel.
26. The method of
28. The device of
performing a recovery lookup process to determine a second higher gain value and a second lower gain value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively;
multiplying the shifted gray level of the first higher subpixel by the second higher gain value to determine the shifted gray level of the second higher subpixel; and
multiplying the shifted gray level of the first lower subpixel by the second lower gain value to determine the shifted gray level of the second lower subpixel.
29. The device of
performing a recovery lookup process to determine a second higher difference value and a second lower difference value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively;
adding the second higher difference value to the shifted gray level of the first higher subpixel to determine the shifted gray level of the second higher subpixel; and
adding the second lower difference value to the shifted gray level of the first lower subpixel to determine the shifted gray level of the second lower subpixel.
30. The device of
setting the first subpixel as the first higher subpixel;
setting the second subpixel as the first lower subpixel;
setting the third subpixel as the second lower subpixel; and
setting the fourth subpixel as the second higher subpixel.
31. The device of
setting the first subpixel as the first lower subpixel;
setting the second subpixel as the first higher subpixel;
setting the third subpixel as the second higher subpixel; and
setting the fourth subpixel as the second lower subpixel.
32. The device of
|
The present invention relates to a method and a device for processing an image. More particularly, the present invention relates to a method and a device for reducing color shift when displayed on a display.
Liquid crystal displays (LCDs), characterized in low radiation, small size and low power consumption, have gradually replaced traditional cathode ray tube (CRT) devices and become the mainstream display. However, the deviation of the display effects when viewed directly in front and viewed at an angle is known as “color shift”.
The so-called 2D1G technology is one of the techniques to reduce color shift at present. Each of the subpixels is divided into a primary pixel area and a secondary pixel area. The primary pixel area and the secondary pixel area are connected to different data lines and a same scan line. The primary pixel area and the secondary pixel area are inputted different data signals to have different gray levels, thus resulting in different brightness when viewed directly in front and viewed at an angle, thereby reducing the color shift problems. However, for each of the subpixels, the number of the data lines is doubled, thus greatly reducing the aperture ratio of the LCD.
In the invention, a method and a device for processing an image are provided. In the method, a gray level of each of the subpixels is corrected, so as to converge to a standard gamma curve using a gamma value of 2.2, thereby reducing color shift when displayed on a display.
One aspect of the invention is directed to a method for processing an image. The method includes the following steps. A data of the image is provided. The image includes a first pixel and a second pixel adjacent to each other. Each of the first pixel and the second pixel has plural subpixels. The data includes a gray level of each of the subpixels. A first subpixel of the subpixels of the first pixel and a second subpixel of the pixels of the second pixel are set as a higher subpixel and a lower subpixel. The color of the first subpixel is the same as the color of the second subpixel. A lookup process is performed to determine a shifted gray level of the higher subpixel and a shifted gray level of the lower subpixel in accordance with the gray level of the higher subpixel and the gray level of the lower subpixel respectively. The shifted gray level of the higher subpixel is greater than the shifted gray level of the lower subpixel. The gray level of the first subpixel and the gray level of the second subpixel are updated in accordance with the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel.
In accordance with one or more embodiments of the invention, the method further includes the following steps. An edge detection is performed on the first subpixel and on the second subpixel respectively to determine whether an edge is presented. The shifted gray level of the higher subpixel is decreased to obtain a decreased shifted gray level, and the shifted gray level of the lower subpixel is increased to obtain an increased shifted gray level, if the edge is presented. The shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel are replaced with the decreased shifted gray level and the increased shifted gray level, respectively, before updating the gray level of the first subpixel and the gray level of the second subpixel, if the edge is presented.
In accordance with one or more embodiments of the invention, each of the first pixel and the second pixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the first pixel do not include the other pixels positioned in a next row of the first pixel. The neighboring pixels of the second pixel do not include the other pixels positioned in the next row of the second pixel. The edge detection is performed on the first subpixel and on the second subpixel respectively to determine whether the edge is presented includes the following steps. A gray level difference of the first subpixel which is a difference between the gray level of the first subpixel and a gray level of a third subpixel of the subpixels of the neighboring pixels of the first subpixel is calculated. The color of the third subpixel is the same as the color of the first subpixel. A gray level difference of the second subpixel which is the difference between the gray level of the second subpixel and a gray level of a fourth subpixel of the subpixels of the neighboring pixels of the second pixel is calculated. The color of the fourth subpixel is the same as the color of the second subpixel. The edge is determined to be presented if either a greatest value of the gray level differences of the first subpixel is larger than or equal to an edge threshold or a greatest value of the gray level differences of the second subpixel is larger than or equal to the edge threshold.
In accordance with one or more embodiments of the invention, setting the first subpixel and the second subpixel as the higher subpixel and the lower subpixel includes the following steps. A gray level difference which is a difference between the gray level of the first subpixel and the gray level of the second subpixel is calculated. The first subpixel and the second subpixel are determined as the higher subpixel and the lower subpixel if either the gray level difference is less than a difference threshold or the gray level of the first subpixel is greater than or equal to the gray level of the second subpixel. The first subpixel and the second subpixel are determined as the lower subpixel and the higher subpixel if the gray level difference is greater than or equal to the difference threshold and the gray level of the first subpixel is less than the gray level of the second subpixel.
In accordance with one or more embodiments of the invention, a formula of decreasing the shifted gray level of the higher subpixel to obtain the decreased shifted gray level is as follows:
A function of “ROUND” means to round up to a nearest integer. A function of “LUT” means to perform the lookup process. An input of “SGLH” means the shifted gray level of the higher subpixel. An input of “GLH” means the gray level of the higher subpixel. A higher pixel including the higher subpixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the higher pixel do not include the other pixels positioned in a next row of the higher pixel. An input of “MAXH” means a greatest value of the gray levels of the higher subpixel and each of a gray level of a fifth subpixel of the subpixels of the neighboring pixels of the higher pixel. The color of the fifth subpixel is the same as the color of the higher subpixel.
In accordance with one or more embodiments of the invention, a formula of increasing the shifted gray level of the lower subpixel to obtain the increased shifted gray level is as follows:
A function of “ROUND” means to round up to a nearest integer. A function of “LUT” means to perform the lookup process. An input of “SGLL” means the shifted gray level of the lower subpixel. An input of “GLL” means the gray level of the lower subpixel. A lower pixel including the lower subpixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the lower pixel do not include the other pixels positioned in a next row of the lower pixel. An input of “MAXL” means a greatest value of the gray levels of the lower subpixel and each of a gray level of a sixth subpixel of the subpixels of the neighboring pixels of the lower pixel. The color of the sixth subpixel is the same as the color of the lower subpixel.
In accordance with one or more embodiments of the invention, the method further includes a following step. A color conversion is performed to obtain plural color values of the first pixel and plural color values of the second pixel in accordance with the gray levels of the subpixels of the first pixel and the gray levels of the subpixels of the second pixel respectively. A color lookup process is performed to determine a corrected gain of the first subpixel and a corrected gain of the second subpixel in accordance with the color values of the first pixel and the color values of the second pixel respectively. The gray level of the first subpixel is multiplied by the corrected gain of the first subpixel, and the gray level of the second subpixel is multiplied by the corrected gain of the second subpixel, before performing the lookup process.
In accordance with one or more embodiments of the invention, each of the first subpixel and the second subpixel is one of a red subpixel, a green subpixel, and a blue subpixel.
In accordance with one or more embodiments of the invention, each of the first subpixel and the second subpixel is one of a red subpixel, a green subpixel, a blue subpixel, and a white subpixel.
In accordance with one or more embodiments of the invention, the color conversion is an RGB-to-HSV conversion or an RGB-to-HSL conversion.
In accordance with one or more embodiments of the invention, the method further includes a following step: an RGB-to-RGBW conversion is performed before setting the first subpixel and the second subpixel.
Another aspect of the invention is directed to a device for processing an image. The device includes a receiving unit, a setting unit, a lookup unit, and an updating unit. The receiving unit is configured to receive a data of the image. The image includes a first pixel and a second pixel adjacent to each other. Each of the first pixel and the second pixel has plural subpixels. The data includes a gray level of each of the subpixels. The setting unit is configured to set a first subpixel of the subpixels of the first pixel and a second subpixel of the pixels of the second pixel as a higher subpixel and a lower subpixel. The color of the first subpixel is the same as the color of the second subpixel. The lookup unit is configured to perform a lookup process to determine a shifted gray level of the higher subpixel and a shifted gray level of the lower subpixel in accordance with the gray level of the higher subpixel and the gray level of the lower subpixel respectively. The shifted gray level of the higher subpixel is greater than the shifted gray level of the lower subpixel. The updating unit is configured to update the gray level of the first subpixel and the gray level of the second subpixel in accordance with the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel.
In accordance with one or more embodiments of the invention, the device further includes an edge detection unit and an edge correction unit. The edge detection unit is configured to perform an edge detection on the first subpixel and on the second subpixel respectively to determine whether an edge is presented. The edge correction unit is configured to decrease the shifted gray level of the higher subpixel obtain a decreased shifted gray level, and to increase the shifted gray level of the lower subpixel to obtain an increased shifted gray level, and to replace the shifted gray level of the higher subpixel and the shifted gray level of the lower subpixel with the decreased shifted gray level and the increased shifted gray level, respectively, before updating the gray level of the first subpixel and the gray level of the second subpixel, if the edge is presented.
In accordance with one or more embodiments of the invention, each of the first pixel and the second pixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the first pixel do not include the other pixels positioned in a next row of the first pixel. The neighboring pixels of the second pixel do not include the other pixels positioned in the next row of the second pixel. The edge detection is performed on the first subpixel and on the second subpixel respectively to determine whether the edge is presented includes the following steps. A gray level difference of the first subpixel which is a difference between the gray level of the first subpixel and a gray level of a third subpixel of the subpixels of the neighboring pixels of the first subpixel is calculated. The color of the third subpixel is the same as the color of the first subpixel. A gray level difference of the second subpixel which is the difference between the gray level of the second subpixel and a gray level of a fourth subpixel of the subpixels of the neighboring pixels of the second pixel is calculated. The color of the fourth subpixel is the same as the color of the second subpixel. The edge is determined to be presented if either a greatest value of the gray level differences of the first subpixel is larger than or equal to an edge threshold or a greatest value of the gray level differences of the second subpixel is larger than or equal to the edge threshold.
In accordance with one or more embodiments of the invention, the setting unit is configured to perform the following steps. A gray level difference which is a difference between the gray level of the first subpixel and the gray level of the second subpixel is calculated. The first subpixel and the second subpixel are determined as the higher subpixel and the lower subpixel if either the gray level difference is less than a difference threshold or the gray level of the first subpixel is greater than or equal to the gray level of the second subpixel. The first subpixel and the second subpixel are determined as the lower subpixel and the higher subpixel if the gray level difference is greater than or equal to the difference threshold and the gray level of the first subpixel is less than the gray level of the second subpixel.
In accordance with one or more embodiments of the invention, a formula of decreasing the shifted gray level of the higher subpixel to obtain the decreased shifted gray level is as follows:
A function of “ROUND” means to round up to a nearest integer. A function of “LUT” means to perform the lookup process. An input of “SGLH” means the shifted gray level of the higher subpixel. An input of “GLH” means the gray level of the higher subpixel. A higher pixel including the higher subpixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the higher pixel do not include the other pixels positioned in a next row of the higher pixel. An input of “MAXH” means a greatest value of the gray levels of the higher subpixel and each of a gray level of a fifth subpixel of the subpixels of the neighboring pixels of the higher pixel. The color of the fifth subpixel is the same as the color of the higher subpixel.
In accordance with one or more embodiments of the invention, a formula of increasing the shifted gray level of the lower subpixel to obtain the increased shifted gray level is as follows:
A function of “ROUND” means to round up to a nearest integer. A function of “LUT” means to perform the lookup process. An input of “SGLL” means the shifted gray level of the lower subpixel. An input of “GLL” means the gray level of the lower subpixel. A lower pixel including the lower subpixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the lower pixel do not include the other pixels positioned in a next row of the lower pixel. An input of “MAXL” means a greatest value of the gray levels of the lower subpixel and each of a gray level of a sixth subpixel of the subpixels of the neighboring pixels of the lower pixel. The color of the sixth subpixel is the same as the color of the lower subpixel.
In accordance with one or more embodiments of the invention, the device further includes a color conversion unit and a color lookup unit. The color conversion unit is configured to perform a color conversion to obtain plural color values of the first pixel and plural color values of the second pixel in accordance with the gray levels of the subpixels of the first pixel and the gray levels of the subpixels of the second pixel respectively. The color lookup unit is configured to perform a color lookup process to determine a corrected gain of the first subpixel and a corrected gain of the second subpixel in accordance with the color values of the first pixel and the color values of the second pixel respectively. The updating unit is further configured to multiply the gray level of the first subpixel by the corrected gain of the first subpixel and to multiply the gray level of the second subpixel by the corrected gain of the second subpixel, before performing the lookup process.
In accordance with one or more embodiments of the invention, each of the first subpixel and the second subpixel is one of a red subpixel, a green subpixel, and a blue subpixel.
In accordance with one or more embodiments of the invention, each of the first subpixel and the second subpixel is one of a red subpixel, a green subpixel, a blue subpixel, and a white subpixel.
In accordance with one or more embodiments of the invention, the color conversion is an RGB-to-HSV conversion or an RGB-to-HSL conversion.
In accordance with one or more embodiments of the invention, the device further includes an RGB-to-RGBW conversion unit configured to perform an RGB-to-RGBW conversion before setting the first subpixel and the second subpixel.
Another aspect of the invention is directed to a method for processing an image. The method includes the following steps. A data of the image is provided. The image includes plural pixels, and each of the pixels has plural subpixels. The data includes a gray level of each of the subpixels. The pixels include a first pixel and a second pixel positioned at a first column in sequence. The pixels further include a third pixel and a fourth pixel positioned at a second column in sequence. The first column is adjacent to the second column. The first pixel is adjacent to the third pixel. A first subpixel of the subpixels of the first pixel, a second subpixel of the subpixels of the second pixel, a third subpixel of the subpixels of the third pixel, and a fourth subpixel of the subpixels of the fourth pixel are set as a first higher subpixel, a first lower subpixel, a second higher subpixel, and a second lower subpixel. The first subpixel, the second subpixel, the third subpixel, and the fourth subpixel have the same color. A lookup process is performed to determine a shifted gray level of the first higher subpixel and a shifted gray level of the first lower subpixel in accordance with the gray level of the first higher subpixel and the gray level of the first lower subpixel, respectively. A recovery process is performed to determine a shifted gray level of the second higher subpixel and a shifted gray level of the second lower subpixel in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively. The gray level of the first subpixel, the gray level of the second subpixel, the gray level of the third subpixel, and the gray level of the fourth subpixel are updated in accordance with the shifted gray level of the first subpixel, the shifted gray level of the second subpixel, the shifted gray level of the third subpixel, and the shifted gray level of the fourth subpixel, respectively.
In accordance with one or more embodiments of the invention, the recovery process includes the following steps. A recovery lookup process is performed to determine a second higher gain value and a second lower gain value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively. The shifted gray level of the first higher subpixel is multiplied by the second higher gain value to determine the shifted gray level of the second higher subpixel. The shifted gray level of the first lower subpixel is multiplied by the second lower gain value to determine the shifted gray level of the second lower subpixel.
In accordance with one or more embodiments of the invention, the recovery process includes the following steps. A recovery lookup process is performed to determine a second higher difference value and a second lower difference value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively. The second higher difference value is added to the shifted gray level of the first higher subpixel to determine the shifted gray level of the second higher subpixel. The second lower difference value is added to the shifted gray level of the first lower subpixel to determine the shifted gray level of the second lower subpixel.
In accordance with one or more embodiments of the invention, setting the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel as the first higher subpixel, the first lower subpixel, the second higher subpixel, and the second lower subpixel includes the following steps. The first subpixel is set as the first higher subpixel. The second subpixel is set as the first lower subpixel. The third subpixel is set as the second lower subpixel. The fourth subpixel is set as the second higher subpixel.
In accordance with one or more embodiments of the invention, setting the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel as the first higher subpixel, the first lower subpixel, the second higher subpixel, and the second lower subpixel includes the following steps. The first subpixel is set as the first lower subpixel. The second subpixel is set as the first higher subpixel. The third subpixel is set as the second higher subpixel. The fourth subpixel is set as the second lower subpixel.
In accordance with one or more embodiments of the invention, each of the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel is one of a red subpixel, a green subpixel, and a blue subpixel.
Another aspect of the invention is directed to a device for processing an image. The device includes a receiving unit, a setting unit, a lookup unit, a recovery lookup unit, and an updating unit. The receiving unit is configured to receive a data of the image. The image includes plural pixels, and each of the pixels has plural subpixels. The data includes a gray level of each of the subpixels. The pixels include a first pixel and a second pixel positioned at a first column in sequence. The pixels further include a third pixel and a fourth pixel positioned at a second column in sequence. The first column is adjacent to the second column. The first pixel is adjacent to the third pixel. The setting unit is configured to set a first subpixel of the subpixels of the first pixel, a second subpixel of the subpixels of the second pixel, a third subpixel of the subpixels of the third pixel, and a fourth subpixel of the subpixels of the fourth pixel as a first higher subpixel, a first lower subpixel, a second higher subpixel, and a second lower subpixel. The first subpixel, the second subpixel, the third subpixel, and the fourth subpixel have the same color. The lookup unit is configured to perform a lookup process to determine a shifted gray level of the first higher subpixel and a shifted gray level of the first lower subpixel in accordance with the gray level of the first higher subpixel and the gray level of the first lower subpixel, respectively. The recovery lookup unit is configured to perform a recovery process to determine a shifted gray level of the second higher subpixel and a shifted gray level of the second lower subpixel in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively. The updating unit is configured to update the gray level of the first subpixel, the gray level of the second subpixel, the gray level of the third subpixel, and the gray level of the fourth subpixel in accordance with the shifted gray level of the first subpixel, the shifted gray level of the second subpixel, the shifted gray level of the third subpixel, and the shifted gray level of the fourth subpixel, respectively.
In accordance with one or more embodiments of the invention, the recovery process includes the following steps. A recovery lookup process is performed to determine a second higher gain value and a second lower gain value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively. The shifted gray level of the first higher subpixel is multiplied by the second higher gain value to determine the shifted gray level of the second higher subpixel. The shifted gray level of the first lower subpixel is multiplied by the second lower gain value to determine the shifted gray level of the second lower subpixel.
In accordance with one or more embodiments of the invention, the recovery process includes the following steps. A recovery lookup process is performed to determine a second higher difference value and a second lower difference value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel, respectively. The second higher difference value is added to the shifted gray level of the first higher subpixel to determine the shifted gray level of the second higher subpixel. The second lower difference value is added to the shifted gray level of the first lower subpixel to determine the shifted gray level of the second lower subpixel.
In accordance with one or more embodiments of the invention, setting the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel as the first higher subpixel, the first lower subpixel, the second higher subpixel, and the second lower subpixel includes the following steps. The first subpixel is set as the first higher subpixel. The second subpixel is set as the first lower subpixel. The third subpixel is set as the second lower subpixel. The fourth subpixel is set as the second higher subpixel.
In accordance with one or more embodiments of the invention, setting the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel as the first higher subpixel, the first lower subpixel, the second higher subpixel, and the second lower subpixel includes the following steps. The first subpixel is set as the first lower subpixel. The second subpixel is set as the first higher subpixel. The third subpixel is set as the second higher subpixel. The fourth subpixel is set as the second lower subpixel.
In accordance with one or more embodiments of the invention, each of the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel is one of a red subpixel, a green subpixel, and a blue subpixel.
The invention can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows:
Specific embodiments of the present invention are further described in detail below with reference to the accompanying drawings, however, the embodiments described are not intended to limit the present invention and it is not intended for the description of operation to limit the order of implementation. Moreover, any device with equivalent functions that is produced from a structure formed by a recombination of elements shall fall within the scope of the present invention. Additionally, the drawings are only illustrative and are not drawn to actual size.
It will be understood that, although the terms “first,” “second,” and “third” may be used herein to describe various elements, components, areas, layers and/or regions, these elements, components, areas, layers and/or regions, should not be limited by these terms. These terms are only used to distinguish elements, components, areas, layers and/or regions.
In step S1002, as shown in
In step S1003, as shown in
First, a gray level difference is calculated, in which the gray level difference is a difference between the gray level of the first subpixel (i.e., the red subpixel 221) and the gray level of the second subpixel (i.e., the red subpixel 231). Next, the first subpixel (i.e., the red subpixel 221) and the second subpixel (i.e., the red subpixel 231) are respectively determined as the higher subpixel and the lower subpixel if either the gray level difference is less than a difference threshold or the gray level of the first subpixel (i.e., the red subpixel 221) is greater than or equal to the gray level of the second subpixel (i.e., the red subpixel 231). In contrast, the first subpixel (i.e., the red subpixel 221) and the second subpixel (i.e., the red subpixel 231) are respectively determined as the lower subpixel and the higher subpixel if the gray level difference is greater than or equal to the difference threshold and the gray level of the first subpixel (i.e., the red subpixel 221) is less than the gray level of the second subpixel (i.e., the red subpixel 231). It is noted that the difference threshold may be determined by a manufacturer.
In step S1004, as shown in
In step S1005, as shown in
In step S2001, as shown in
First, plural gray level differences of the first subpixel (i.e., the red subpixel 221) of the first pixel (i.e., the pixel 22) are calculated. Each of the gray level differences of the first subpixel (i.e., the red subpixel 221) is a difference between a gray level of the first subpixel (i.e., the red subpixel 221) of the first pixel (i.e., the pixel 22) and each of the gray levels of plural third subpixels (i.e., the red subpixels 111, 211, 311, 121, and 321) of plural neighboring pixels (i.e., the pixels 11, 21, 31, 12 and 32) of the first pixel (i.e., the pixel 22). It is noted that the neighboring pixels of the first pixel (i.e., the pixel 22) mentioned above do not include the other pixels positioned in a next row of the first pixel (i.e., the pixel 22), such as the pixels 13, 23, and 33. Next, plural gray level differences of the second subpixel (i.e., the red subpixel 231) of a second pixel (i.e., the pixel 23) are calculated. Each of the gray level differences of the second subpixel (i.e., the red subpixel 231) is a difference between a gray level of the second subpixel (i.e., the red subpixel 231) of the second pixel (i.e., the pixel 23) and each of the gray levels of plural fourth subpixels (i.e., the red subpixels 121, 221, 321, 131, and 331) of plural neighboring pixels (i.e., the pixels 12, 22, 32, 13 and 33) of the second pixel (i.e., the pixel 23). It is noted that the neighboring pixels of the second pixel (i.e., the pixel 23) mentioned above do not include the other pixels positioned in a next row of the first pixel (i.e., the pixel 23). Then, it is determined that an edge is presented if either a greatest value of the gray level differences of the first subpixel is larger than or equal to an edge threshold of the first subpixel or a greatest value of the gray level differences of the second subpixel is larger than or equal to an edge threshold of the second subpixel. It is noted that the edge threshold of the first subpixel (i.e., the red subpixel 221) may be a fixed constant or a weight value of a greatest value of the gray levels of the first subpixel (i.e., the red subpixel 221) of the first pixel (i.e., the pixel 22) and the third subpixels (i.e., the red subpixels 111, 211, 311, 121, and 321) of the neighboring pixels (i.e., the pixel 11, 21, 31, 12 and 32) of the first pixel (i.e., the pixel 22). It is noted that the edge threshold of the second subpixel (i.e., the red subpixel 231) may be a fixed constant or a weight value of a greatest value of the gray levels of the second subpixel (i.e., the red subpixel 231) of the second pixel (i.e., the pixel 23) and the fourth subpixels (i.e., the red subpixels 121, 221, 321, 131, and 331) of the neighboring pixels (i.e., the pixel 12, 22, 32, 13 and 33) of the second pixel (i.e., the pixel 23).
In step S2002, as shown in
In step S2003, as shown in
A formula of decreasing the shifted gray level of the higher subpixel to obtain the decreased shifted gray level is as follows:
It is noted that a function of “ROUND” means to round up to a nearest integer, a function of “H_LUT” means to perform the lookup process according to the higher lookup table (as mentioned in step S1004), an input of “SGLH” means the shifted gray level of the higher subpixel, an input of “GLH” means the gray level of the higher subpixel. A higher pixel including the higher subpixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the higher pixel do not include the other pixels positioned in the next row of the higher pixel. An input of “MAXH” means a greatest value of the gray levels of the higher subpixel and plural fifth subpixels of the subpixels of the neighboring pixels of the higher pixel. It is note that the color of the fifth subpixel is the same as the color of the higher subpixel.
A formula of increasing the shifted gray level of the lower subpixel to obtain the increased shifted gray level is as follows:
It is noted that a function of “L_LUT” means to perform the lookup process according to the lower lookup table (as mentioned in step S1004), an input of “SGLL” means the shifted gray level of the lower subpixel, an input of “GLL” means the gray level of the lower subpixel. A lower pixel including the lower subpixel has plural neighboring pixels. Each of the neighboring pixels has plural subpixels. The neighboring pixels of the lower pixel do not include the other pixels positioned in the next row of the lower pixel. An input of “MARL” means a greatest value of the gray levels of the lower subpixel and plural sixth subpixels of the subpixels of the neighboring pixels of the lower pixel. It is note that the color of the sixth subpixel is the same as the color of the lower subpixel.
In step S3001, as shown in
It is noted that the method and the device for processing the image of the present invention as mentioned above are not limited to be used for a RGB display. The method and the device for processing the image of the present invention may be used for a RGBW display. It is worth mentioning that the color shift problems of the RGBW display draw more attention than the RGB display.
In step S1001, as shown in
In the followings, the red subpixels of the pixels are taken as an example to illustrate the setting of the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel. Referring to
In the followings, the green subpixels of the pixels are taken as an example to illustrate the setting of the first subpixel, the second subpixel, the third subpixel, and the fourth subpixel. Referring to
In step S6004, as shown in
In step S6005, as shown in
On the other hand, an operation of performing the recovery process on the second higher subpixel and the second lower subpixel is described as follows. A recovery lookup process is performed to determine a second higher difference value and a second lower difference value in accordance with the shifted gray level of the first higher subpixel and the shifted gray level of the first lower subpixel. Specifically, a second higher difference value is determined according to a second higher lookup table (H2_LUT) based on the shifted gray level of the first higher subpixel, and a second lower difference value is determined according to a second lower lookup table (L2_LUT) based on the shifted gray level of the first lower subpixel. A shifted gray level of the second higher subpixel may be a sum of the shifted gray level of the first higher subpixel and a second higher difference value. A shifted gray level of the second lower subpixel may be a sum of the shifted gray level of the first lower subpixel and a second lower difference value. It is noted that the recovery process is configured to let the gray levels of the second higher subpixel and the second lower subpixel to be converged to a standard gamma curve using a gamma value of 2.2, thereby reducing color shift when displaying the image on a RGB display.
In step S1005, as shown in
It is noted that the step S2001 is not limited to a sequence as shown in
It is noted that the step S3001 is not limited to a sequence as shown in
From the above description, the method and the device for processing the image of the present invention may be used for a RGB display or a RGBW display to effectively reduce the color shift problems of the RGB display or the RGBW display. The present invention further performs an edge correction thereby reducing a saw-tooth phenomenon occurred on the subpixels which are within the edge. The present invention further performs a color correction thereby improving a color performance of the display.
Although the present invention has been described in considerable detail with reference to certain embodiments thereof, other embodiments are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the embodiments contained herein. It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
9734750, | Apr 29 2015 | SHENZHEN CHINA STAR OPTOELECTRONICS TECHNOLOGY CO , LTD | Method of setting grey levels of pixels on LCD panel |
20040061711, | |||
20060221030, | |||
20110242149, | |||
20110254759, | |||
20110254879, | |||
20130088528, | |||
20140232741, | |||
20140285511, | |||
20160267874, | |||
CN105184746, | |||
CN105321485, | |||
CN105374018, | |||
TW537873, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 22 2017 | WU, TUNG-YING | Himax Technologies Limited | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 044919 | /0451 | |
Feb 13 2018 | Himax Technologies Limited | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Feb 13 2018 | BIG: Entity status set to Undiscounted (note the period is included in the code). |
Sep 28 2023 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Apr 14 2023 | 4 years fee payment window open |
Oct 14 2023 | 6 months grace period start (w surcharge) |
Apr 14 2024 | patent expiry (for year 4) |
Apr 14 2026 | 2 years to revive unintentionally abandoned end. (for year 4) |
Apr 14 2027 | 8 years fee payment window open |
Oct 14 2027 | 6 months grace period start (w surcharge) |
Apr 14 2028 | patent expiry (for year 8) |
Apr 14 2030 | 2 years to revive unintentionally abandoned end. (for year 8) |
Apr 14 2031 | 12 years fee payment window open |
Oct 14 2031 | 6 months grace period start (w surcharge) |
Apr 14 2032 | patent expiry (for year 12) |
Apr 14 2034 | 2 years to revive unintentionally abandoned end. (for year 12) |