Image processing method and device
By performing grayscale transformation and data adjustment processing on the original image of the VA mode liquid crystal display device, the problem of color casting in the display device at a large viewing angle is solved, and more accurate and consistent image color performance is achieved.
Patent Information
- Application Number
- CN202110297688.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-19
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2041-03-19
AI Technical Summary
The existing VA mode liquid crystal display devices are prone to color casting at a large viewing angle, especially under certain polarity driving methods and pixel arrangement methods, especially when 1+2line is reversed, color casting is prone to color casting when ALCS is turned on and medium and low gray levels.
By performing grayscale transformation processing on the original image, the pixel comparison value of each sub-pixel is calculated, and the data adjustment value is adjusted according to the preset threshold value, and finally the pixel data is output to adjust the pixel data of the original image.
The color cast phenomenon of the display device is improved, the color accuracy and consistency of the image is improved, and it is simple and efficient.
Smart Images

Figure CN115116369B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image display, and particularly to an image processing method and an image processing device. Background Art
[0002] With the development of the information society, people's demand for display devices has increased rapidly. To meet this demand, display devices represented by liquid crystal display devices (LCDs, Liquid Crystal Displays), plasma display panels (PDPs, Plasma Display Panels), and organic light emitting diode (OLED) display devices have all developed rapidly. Among flat panel display devices, liquid crystal display devices are being used more and more widely due to their advantages of low weight, small size, and low power consumption.
[0003] Liquid crystal display devices include various display modes such as Twisted Nematic (TN) mode, Electrically Controlled Birefringence (ECB) mode, and Vertical Alignment (VA). Among them, the Vertical Alignment (VA) mode is a common display mode with advantages such as high contrast ratio, wide viewing angle, and no need for a rubbing alignment process. To reduce the problem of image flicker in liquid crystal display devices in the VA mode, the common polarity driving method is to keep the polarities of adjacent pixels opposite. For the driving method of making the polarities of adjacent pixels opposite, there are mainly dot inversion, column inversion, and row inversion, etc. Some liquid crystal display devices in the VA mode will use ALCS (Algorithm Low Color Shift) to reduce the problem of color shift that is likely to occur at large viewing angles.
[0004] However, for liquid crystal display devices in the VA mode, some abnormal phenomena will occur with certain arrangements of the existing polarity driving method and pixels (pixels). When the polarity driving method is 1 + 2 line (one plus two lines) inversion, when ALCS is off for some special arrangements of pixels, the image is normal; when ALCS is on and in the medium and low gray levels, color shift is likely to occur. Summary of the Invention
[0005] In order to solve the above problems existing in the prior art, embodiments of the present invention provide an image processing method and an image processing device, which can improve the color shift phenomenon in existing display devices.
[0006] Specifically, on the one hand, an embodiment of the present invention discloses an image processing method, including:
[0007] Obtain an original image, where the original image includes a plurality of sub-pixels;
[0008] Perform grayscale transformation processing on the original image to obtain first pixel data corresponding to each of the sub-pixels;
[0009] Obtain a pixel comparison value of the corresponding sub-pixel based on the first pixel data;
[0010] Obtain a data adjustment value of the corresponding sub-pixel according to the pixel comparison value and a preset threshold;
[0011] Obtain a pixel data output value of the corresponding sub-pixel based on the first pixel data and the data adjustment value.
[0012] In one embodiment, the first pixel data includes a first data value and a second data value;
[0013] The obtaining a pixel comparison value of the corresponding sub-pixel based on the first pixel data includes:
[0014] Taking the average value of the first data value and the second data value as the pixel data mean value of the corresponding sub-pixel;
[0015] Taking one of the first data value and the second data value as the current pixel data value of the corresponding sub-pixel; and
[0016] Obtaining the pixel comparison value of the corresponding sub-pixel according to the current pixel data value and the pixel data mean value.
[0017] In one embodiment, the plurality of sub-pixels include: a plurality of first color sub-pixels, a plurality of second color sub-pixels, and a plurality of third color sub-pixels;
[0018] The obtaining the pixel comparison value of the corresponding sub-pixel according to the current pixel data value and the pixel data mean value includes:
[0019] Determine at least one calculation matrix based on the plurality of sub-pixels, where the calculation matrix includes: at least one of the first color sub-pixels, at least one of the second color sub-pixels, and at least one of the third color sub-pixels;
[0020] Calculating the pixel comparison value corresponding to at least one of the first color sub-pixels in the calculation matrix based on the current pixel data value and the pixel data mean value corresponding to each of the at least one first color sub-pixels, where the pixel comparison values corresponding to the at least one first color sub-pixels located in the same calculation matrix are the same;
[0021] Calculating the pixel comparison values corresponding to at least one of the second color sub-pixels in the calculation matrix based on the respective current pixel data values and the respective pixel data means corresponding to the at least one second color sub-pixels, wherein the pixel comparison values corresponding to the at least one second color sub-pixels located in the same calculation matrix are the same;
[0022] Calculating the pixel comparison values corresponding to at least one of the third color sub-pixels in the calculation matrix based on the respective current pixel data values and the respective pixel data means corresponding to the at least one third color sub-pixels, wherein the pixel comparison values corresponding to the at least one third color sub-pixels located in the same calculation matrix are the same.
[0023] In one embodiment, the determining at least one calculation matrix based on the plurality of sub-pixels includes:
[0024] Dividing the plurality of sub-pixels into a plurality of calculation matrices, each calculation matrix including n*m first color sub-pixels, n*m second color sub-pixels, and n*m third color sub-pixels;
[0025] The calculating the pixel comparison values corresponding to at least one of the first color sub-pixels in the calculation matrix based on the respective current pixel data values and the respective pixel data means corresponding to the at least one first color sub-pixels includes:
[0026] Summing the n*m current pixel data values corresponding to the n*m first color sub-pixels to obtain a first sum value; summing the n*m pixel data means corresponding to the n*m first color sub-pixels to obtain a second sum value; the pixel comparison value corresponding to the first color sub-pixel is one half of the difference between the first sum value and the second sum value;
[0027] The calculating the pixel comparison values corresponding to at least one of the second color sub-pixels in the calculation matrix based on the respective current pixel data values and the respective pixel data means corresponding to the at least one second color sub-pixels includes:
[0028] Summing the n*m current pixel data values corresponding to the n*m second color sub-pixels to obtain a third sum value; summing the n*m pixel data means corresponding to the n*m second color sub-pixels to obtain a fourth sum value; the pixel comparison value corresponding to the second color sub-pixel is one half of the difference between the third sum value and the fourth sum value;
[0029] Calculating the pixel comparison value corresponding to at least one of the third color sub-pixels in the calculation matrix based on the respective current pixel data values and the respective pixel data means corresponding to at least one of the third color sub-pixels includes:
[0030] Summing the n*m current pixel data values corresponding to the n*m third color sub-pixels to obtain a fifth sum value; summing the n*m pixel data means corresponding to the n*m third color sub-pixels to obtain a sixth sum value; the pixel comparison value corresponding to the second color sub-pixel is one half of the difference between the fifth sum value and the sixth sum value;
[0031] Wherein, both n and m are positive integers greater than 1.
[0032] In one embodiment, the preset threshold includes a first threshold;
[0033] Obtaining the data adjustment value corresponding to the sub-pixel according to the pixel comparison value and the preset threshold includes:
[0034] Comparing the magnitude relationship between the absolute value of the pixel comparison value and the first threshold:
[0035] When the absolute value of the pixel comparison value is less than or equal to the first threshold, the data adjustment value is equal to 0;
[0036] When the absolute value of the pixel comparison value is greater than the first threshold, obtaining the data adjustment value according to the first threshold.
[0037] In one embodiment, the preset threshold further includes a second threshold, and the second threshold is greater than the first threshold;
[0038] Obtaining the data adjustment value according to the first threshold includes:
[0039] Calculating the second threshold according to the first threshold;
[0040] Comparing the magnitude relationship between the absolute value of the pixel comparison value and the second threshold:
[0041] When the absolute value of the pixel comparison value is greater than or equal to the second threshold, the data adjustment value is equal to the pixel comparison value;
[0042] When the absolute value of the pixel comparison value is less than the second threshold, calculating the data adjustment value according to the first threshold and the second threshold.
[0043] In one embodiment, calculating the data adjustment value according to the first threshold and the second threshold includes:
[0044] Take the difference between the pixel comparison value and the first threshold as the first difference;
[0045] Take the difference between the second threshold and the first threshold as the second difference;
[0046] Take the product obtained by multiplying the ratio of the first difference to the second difference by the second threshold as the data adjustment value.
[0047] In one embodiment, the calculating the second threshold according to the first threshold includes:
[0048] Take the sum of the first threshold and a set reference value as the second threshold;
[0049] The set reference value is a positive integer power of 2.
[0050] In one embodiment, the obtaining the pixel data output value of the corresponding sub-pixel based on the first pixel data and the data adjustment value includes:
[0051] Obtain a calculated output value by performing a specific operation on the current pixel data value of the sub-pixel and the data adjustment value;
[0052] When the calculated output value is less than or equal to 255, the pixel data output value of the corresponding sub-pixel is equal to the calculated output value;
[0053] When the calculated output value is greater than 255, the pixel data output value of the corresponding sub-pixel is equal to 255.
[0054] On the other hand, an embodiment of the present invention provides an image processing apparatus, including: an input unit, a timing controller connected to the input unit, a storage unit connected to the timing controller, and a data driving unit connected to the timing controller; wherein,
[0055] The timing controller is configured to cooperate with the storage unit to execute the image processing method according to any one of claims 1-9, and the original image comes from the input unit; and
[0056] The data driving unit is configured to output a voltage signal corresponding to the pixel data output value according to the pixel data output value of each sub-pixel.
[0057] On yet another aspect, an embodiment of the present invention provides an image processing system, including a processor and a memory connected to the processor, the memory storing instructions executed by the processor, and the instructions causing the processor to perform operations to perform the image processing method as described in any one of the foregoing.
[0058] In another aspect, an embodiment of the present invention provides an image processing apparatus, including:
[0059] An image acquisition module, configured to acquire an original image, where the original image includes a plurality of sub-pixels;
[0060] A grayscale processing module, configured to perform grayscale transformation processing on the original image to obtain first pixel data corresponding to each of the sub-pixels;
[0061] A pixel comparison value acquisition module, configured to obtain a pixel comparison value of the corresponding sub-pixel based on the first pixel data;
[0062] A data adjustment value acquisition module, configured to obtain a data adjustment value of the corresponding sub-pixel according to the pixel comparison value and a preset threshold;
[0063] A pixel data output value acquisition module, configured to obtain a pixel data output value of the corresponding sub-pixel based on the first pixel data and the data adjustment value.
[0064] In another aspect, an embodiment of the present invention provides a computer-readable medium storing computer-readable instructions, where the computer-readable instructions include instructions for executing the image processing method described in any one of the foregoing.
[0065] The image processing method and apparatus disclosed in the above embodiments of the present invention can adjust the pixel data of the original image by processing the original image to calculate the data adjustment value of the corresponding sub-pixel and obtaining its pixel data output value according to the data adjustment value, so as to improve the color cast phenomenon of the display device, and has the characteristics of simplicity and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0067] Figure 1 It is a schematic flowchart of an image processing method provided by an embodiment of the present invention;
[0068] Figure 2 It is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present invention;
[0069] Figure 3 It is a schematic diagram of an electronic signal input when ALCS is off in the image processing method provided by an embodiment of the present invention;
[0070] Figure 4 Schematic diagram of electronic signal input when ALCS is on in the image processing method provided by an embodiment of the present invention;
[0071] Figure 5 Schematic diagram of the arrangement of some sub-pixels in the image processing method provided by an embodiment of the present invention. Detailed implementation manners
[0072] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific implementations. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0073] It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0074] In the description of the present invention, it should also be noted that, unless otherwise clearly defined and limited, the terms "set", "installed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0075] The following will describe in detail some embodiments of the present invention with reference to the accompanying drawings. Without conflict, the embodiments and features in the following embodiments can be combined with each other.
[0076] As Figure 1 shown, it is a flowchart of an image processing method provided by an embodiment of the present invention. The image processing method provided by this embodiment may specifically include:
[0077] Step S1: Obtain an original image, where the original image includes a plurality of sub-pixels;
[0078] Step S2: Perform grayscale transformation processing on the original image to obtain first pixel data corresponding to each of the sub-pixels;
[0079] Step S3: Obtain a pixel comparison value of the corresponding sub-pixel based on the first pixel data;
[0080] Step S4: Obtain the data adjustment value of the corresponding sub-pixel according to the pixel comparison value and a preset threshold value;
[0081] Step S5: Obtain the pixel data output value of the corresponding sub-pixel based on the first pixel data and the data adjustment value.
[0082] In this embodiment, when the display device needs to perform screen display, first, the original image (pattern) to be displayed is input into the timing controller. In step S1, the timing controller acquires the original image. The original image includes, for example, N*M pixel points, that is, the original image includes N rows * M columns of pixel points. N and M are positive integers not less than 1. Each pixel point includes, for example, three adjacent color sub-pixels: a first color sub-pixel, a second color sub-pixel, and a third color sub-pixel, which respectively correspond to one of R, G, and B.
[0083] In step S2, the timing controller performs a grayscale transformation process on the original image to obtain the first pixel data corresponding to each sub-pixel. The first pixel data is, for example, the grayscale data of the sub-pixel. The grayscale transformation process means that, according to the original pixel data of the original image, the original grayscale is correspondingly adjusted to a high grayscale or a low grayscale in the conversion modes of HLHL...HLHL and LHLH...LHLH, and the high grayscale and the low grayscale corresponding to the original grayscale of each sub-pixel in the original image are obtained. Here, H represents the high grayscale, and L represents the low grayscale. That is, when a sub-pixel is adjusted to the high grayscale, the next adjacent sub-pixel is adjusted to the low grayscale, and the next adjacent sub-pixel is adjusted to the high grayscale. Its transformation order is determined according to the ALCS processing order. Among two adjacent rows of sub-pixels, when the conversion mode of one row of sub-pixels is HLHL...HLHL, the conversion mode of the next adjacent row of sub-pixels is LHLH...LHLH, and vice versa. It should be noted that here, the high grayscale refers to being higher than (or equal to) the original grayscale, and the low grayscale is lower than (or equal to) the original grayscale, without limiting the size relationship between the actual values of the high grayscale and the low grayscale. Refer to Figure 3 and Figure 4 , when ALCS is off, there is no need to perform color cast improvement processing on the original image, such as Figure 3As shown, img_pre_In represents 4 adjacent pixel points in the (k - 1)-th row of the original image, and img_cur_In represents 4 adjacent pixel points in the k-th row of the original image, where k is a positive integer greater than or equal to 1. For example, when k = 1, img_cur_In represents 4 adjacent pixels in the first row of the original image; when k = 2, img_pre_In represents 4 adjacent pixels in the first row of the original image, and img_cur_In represents 4 adjacent pixels in the second row of the original image. Each pixel point, for example, includes 3 sub-pixels: namely, the first color sub-pixel, the second color sub-pixel, and the third color sub-pixel. For example, the first color sub-pixel, the second color sub-pixel, and the third color sub-pixel are the R sub-pixel, the G sub-pixel, and the B sub-pixel respectively. For example, when k = 2, the original gray levels of the R / G / B sub-pixels in the pixel img_pre_In-P1 at the first column of the first row are R1p, G1p, B1p respectively, and the original gray levels of the R / G / B sub-pixels in the pixel img_cur_In-P1 at the first column of the second row are R1c, G1c, B1c respectively; the original gray levels of the R / G / B sub-pixels in the pixel img_pre_In-P2 at the second column of the first row are R2p, G2p, B2p respectively, and the original gray levels of the R / G / B sub-pixels in the pixel img_cur_In-P2 at the second column of the second row are R2c, G2c, B2c respectively; the original gray levels of the R / G / B sub-pixels in the pixel img_pre_In-P3 at the third column of the first row are R3p, G3p, B3p respectively, and the original gray levels of the R / G / B sub-pixels in the pixel img_cur_In-P3 at the third column of the second row are R3c, G3c, B3c respectively; and the original gray levels of the R / G / B sub-pixels in the pixel img_pre_In-P4 at the fourth column of the first row are R4p, G4p, B4p respectively, and the original gray levels of the R / G / B sub-pixels in the pixel img_cur_In-P4 at the fourth column of the second row are R4c, G4c, B4c respectively.
[0084] When ALCS is on, color cast phenomena will occur in some special pixel arrangements. To improve the color cast of the picture, first perform gray level transformation processing on the entire picture. Refer to Figure 4 , hl_img_pre_In is the data obtained after performing gray level transformation processing on Figure 3 img_pre_In in Figure 3The data obtained after performing grayscale transformation on img_cur_In. Taking the R sub-pixel in the pixel at the first row and first column in the original image when k = 2 mentioned in the previous example as an example, its original grayscale R1p is transformed through grayscale transformation to obtain a corresponding high grayscale value RH1p and a corresponding low grayscale value RL1p. The corresponding relationships of the remaining sub-pixels can be deduced by analogy and will not be elaborated here. In this embodiment, by processing the original image to calculate the data adjustment value corresponding to the sub-pixel and obtaining its pixel data output value according to this data adjustment value to adjust the pixel data of the original image, the color cast phenomenon of the display device can be improved.
[0085] Further, in an embodiment provided by the present invention, the first pixel data includes a first data value and a second data value, and step S3 specifically includes:
[0086] Taking the average value of the first data value and the second data value as the pixel data average value of the corresponding sub-pixel;
[0087] Taking one of the first data value and the second data value as the current pixel data value of the corresponding sub-pixel; and
[0088] Obtaining the pixel comparison value of the corresponding sub-pixel according to the current pixel data value and the pixel data average value.
[0089] Among them, the first data value and the second data value are the grayscale data displayed after grayscale transformation of the corresponding sub-pixel under two different transformation orders. According to the above embodiment, the transformation order is determined according to the transformation order of ALCS. For example, when the first row is processed in the order of HLHL...HLHL transformation and the second row is processed in the order of LHLH...LHLH transformation, the grayscale data displayed by each sub-pixel after grayscale transformation is used as the second data value; then correspondingly, when the first row is processed in the order of LHLH...LHLH transformation and the second row is processed in the order of HLHL...HLHL transformation, the grayscale data displayed by each sub-pixel after grayscale transformation is used as the first data value. At this time, when the first row is in the HLHL...HLHL transformation, the second data value is used as the current pixel data value, and when the first row is in the LHLH...LHLH transformation, the first data value is used as the current pixel data value. For example, referring to Figure 5 , which is the arrangement diagram of some sub-pixels in the image processing method provided by an embodiment of the present invention. The first row is in the LHLH...LHLH transformation. At this time, referring to Figure 4, the first data values of the R / G / B sub-pixels in the pixel at the first row and first column are RL1p, GH1p, and BL1p respectively, the second data values are RH1p, GL1p, and BH1p respectively, and the pixel data means are RHL1p, GHL1p, and BHL1p respectively. The first data values of the R / G / B sub-pixels in the pixel at the first row and second column are RH2p, GL2p, and BH2p respectively, the second data values are RL2p, GH2p, and BL2p respectively, and the pixel data means are RHL2p, GHL2p, and BHL2p respectively. Among them,
[0090] RHL1p = (RL1p + RH1p) / 2,
[0091] GHL1p = (GL1p + GH1p) / 2,
[0092] BHL1p = (BL1p + BH1p) / 2,
[0093] The corresponding relationships of the first data values, second data values, and pixel data means of the remaining sub-pixels can be referred to Figure 4 And so on, which will not be elaborated in this embodiment. In this embodiment, the calculation parameters selected for calculating the pixel comparison value, such as the first data value, the second data value, etc., are all relatively common and easily obtainable parameters in the image processing technology, making the image processing method have the advantage of simple operation.
[0094] Furthermore, in an embodiment of the present invention, the multiple sub-pixels include: multiple first color pixels, multiple second color sub-pixels, and multiple third color sub-pixels.
[0095] Determine at least one calculation matrix based on the multiple sub-pixels, and the calculation matrix includes: at least one of the first color sub-pixels, at least one of the second color sub-pixels, and at least one of the third color sub-pixels. Specifically: divide the multiple sub-pixels into multiple calculation matrices, and each calculation matrix contains n*m first color sub-pixels, n*m second color sub-pixels, and n*m third color sub-pixels. Wherein both n and m are positive integers greater than 1, preferably n is equal to 2 and m is equal to 2, that is, each calculation matrix contains 2 rows * 6 columns of sub-pixels, including 4 first color sub-pixels, 4 second color sub-pixels, and 4 third sub-pixels.
[0096] Calculating the pixel comparison value corresponding to at least one of the first color sub-pixels in the calculation matrix based on the current pixel data value corresponding to each of the at least one first color sub-pixel and the pixel data mean value corresponding to each of them, wherein the pixel comparison values corresponding to at least one of the first color sub-pixels located in the same calculation matrix are the same; specifically: summing the n*m current pixel data values corresponding to the n*m first color sub-pixels to obtain a first sum value; summing the n*m pixel data mean values corresponding to the n*m first color sub-pixels to obtain a second sum value; the pixel comparison value corresponding to the first color sub-pixel is one-half of the difference between the first sum value and the second sum value.
[0097] Taking n equal to 2 and m equal to 2 as an example, as Figure 5 shown, it is an arrangement diagram of partial sub-pixels in the image processing method provided by an embodiment of the present invention, which corresponds to Figure 4 Among them, there are two calculation matrices of the above-mentioned 2-row * 6-column sub-pixels. Taking the first color sub-pixels in the left calculation matrix as an example, for example, the first color sub-pixels are red sub-pixels. The calculation method of the first color comparison value R_sh of the red sub-pixels is to add the current pixel data values RH1c, RL2c, RL1p, and RH2p of the 4 first color sub-pixels to obtain a first sum value R 1 , adding the pixel data mean values RHL1c, RHL2c, RHL1p, and RHL1c of the 4 first color sub-pixels to obtain a second sum value R 2 , then
[0098]
[0099] Calculating the pixel comparison value corresponding to at least one of the second color sub-pixels in the calculation matrix based on the current pixel data value corresponding to each of the at least one second color sub-pixel and the pixel data mean value corresponding to each of them, wherein the pixel comparison values corresponding to at least one of the second color sub-pixels located in the same calculation matrix are the same. Specifically: summing the n*m current pixel data values corresponding to the n*m second color sub-pixels to obtain a third sum value; summing the n*m pixel data mean values corresponding to the n*m second color sub-pixels to obtain a fourth sum value; the pixel comparison value corresponding to the second color sub-pixel is one-half of the difference between the third sum value and the fourth sum value.
[0100] Calculating the pixel comparison values corresponding to at least one of the third color sub-pixels in the calculation matrix based on the respective current pixel data values and the respective pixel data means corresponding to the at least one third color sub-pixels, wherein the pixel comparison values corresponding to the at least one third color sub-pixels located in the same calculation matrix are the same. Specifically: summing the n*m current pixel data values corresponding to the n*m third color sub-pixels to obtain a fifth sum value; summing the n*m pixel data means corresponding to the n*m third color sub-pixels to obtain a sixth sum value; the pixel comparison value corresponding to the second color sub-pixel is one-half of the difference between the fifth sum value and the sixth sum value.
[0101] Referring to the calculation of the pixel comparison value R_sh corresponding to the first color sub-pixel above Figure 5 , similarly, the pixel comparison value G_sh corresponding to the second color sub-pixel can be calculated:
[0102]
[0103] The pixel comparison value B_sh corresponding to the third color sub-pixel:
[0104]
[0105] The derivation will not be repeated here one by one.
[0106] Wherein, the first color sub-pixel, the second color sub-pixel, and the third color sub-pixel are, for example, a red sub-pixel, a green sub-pixel, and a blue sub-pixel respectively. Of course, they can also be other colors. This embodiment is only for illustration and is not limited thereto.
[0107] It should be noted that the pixel comparison values corresponding to the first color sub-pixel, the second color sub-pixel, and the third color sub-pixel in this embodiment are only examples of a specific implementation manner of the present invention. In other embodiments of the present invention, for example, it may also include a fourth color sub-pixel and its corresponding pixel comparison value, and even more color sub-pixels. For example, in multi-primary color display technology, it is not limited to the R / G / B three primary colors, and there may be more colors. Then, the pixel comparison values need to be classified according to the actual situation, and the calculation matrix can also be divided according to actual needs. For example, when using a four-primary color display technology, a fourth color sub-pixel will be added. At this time, the calculation matrix includes, for example, n*4m sub-pixels. The calculation method of the pixel comparison value corresponding to the fourth color sub-pixel can refer to the calculation derivation of the pixel comparison value corresponding to the first color sub-pixel, which will not be elaborated in this embodiment.
[0108] In this embodiment, by dividing the original image into multiple calculation matrices and calculating each calculation matrix separately to obtain the pixel comparison values of all sub-pixels, simple and comprehensive calculation can be ensured.
[0109] Further, in another embodiment of the present invention, the preset threshold includes a first threshold, and step 4 specifically includes: comparing the magnitude relationship between the absolute value of the pixel comparison value and the first threshold: when the absolute value of the pixel comparison value is less than or equal to the first threshold, the data adjustment value is equal to 0; when the absolute value of the pixel comparison value is greater than the first threshold, the data adjustment value is obtained according to the first threshold.
[0110] In this embodiment and the following embodiments, the first threshold is denoted as P_th_sta, the pixel comparison value corresponding to any one sub-pixel is denoted as P_sh, the absolute value of this pixel comparison value is denoted as |P_sh|, and the data adjustment value is denoted as ΔP. Then step 4 can be expressed as:
[0111] If |P_sh| ≤ P_th_sta, then ΔP = 0;
[0112] If |P_sh| > P_th_sta, then ΔP = f(P_th_sta).
[0113] Specifically, the value range of the first threshold P_th_sta can be 0 to 12 times the maximum value of the pixel gray level value of the sub-pixel, that is, the value range of the first threshold P_th_sta is 0 to 12 * 255.
[0114] In this embodiment, by comparing the pixel comparison value of each sub-pixel with the first threshold to determine whether to adjust the pixel data of the sub-pixel, when the pixel comparison value is less than or equal to the first threshold, it is not adjusted, and when it is greater than the first threshold, it is adjusted. Selective adjustment has the effect of saving energy consumption.
[0115] Further, in an embodiment of the present invention, the preset threshold further includes a second threshold, and the second threshold is greater than the first threshold. The obtaining the data adjustment value according to the first threshold includes:
[0116] Calculating the second threshold according to the first threshold:
[0117] Comparing the magnitude relationship between the absolute value of the pixel comparison value and the second threshold: when the absolute value of the pixel comparison value is greater than or equal to the second threshold, the data adjustment value is equal to the pixel comparison value; when the absolute value of the pixel comparison value is less than the second threshold, the data adjustment value is calculated according to the first threshold and the second threshold.
[0118] In this embodiment and the following embodiments, the second threshold is denoted as P_th_end, then there is:
[0119] If P_sh ≥ P_th_end, then ΔP = P_sh;
[0120] If P_th_sta < P_sh < P_th_end, then ΔP = f(P_th_sta, P_th_end).
[0121] Further, in an embodiment provided by the present invention, calculating the data adjustment value according to the first threshold and the second threshold includes:
[0122] Taking the difference between the pixel comparison value and the first threshold as the first difference;
[0123] Taking the difference between the second threshold and the first threshold as the second difference;
[0124] Taking the product obtained by multiplying the ratio of the first difference to the second difference by the second threshold as the data adjustment value.
[0125] In this embodiment and the subsequent embodiments, denote the first difference as D 1 , and the second difference as D 2 . Then when P_th_sta < P_sh < P_th_end, the data adjustment value ΔP can be expressed as:
[0126]
[0127] Further, in an embodiment provided by the present invention, calculating the second threshold according to the first threshold includes: taking the sum of the first threshold and a set reference value as the second threshold; the set reference value is a positive integer power of 2.
[0128] Denote the set reference value as P_th_len, then the second threshold P_th_end can be expressed as P_th_end = P_th_sta + P_th_len, P_th_len = 2 k , where k is a positive integer.
[0129] At this time, according to the calculation formula of the grayscale adjustment value ΔP in the above embodiment, in this embodiment,
[0130] Further, in an embodiment provided by the present invention, step 5 specifically includes:
[0131] Obtaining a calculation output value by performing a specific operation on the current pixel data value of the sub-pixel and the data adjustment value;
[0132] When the calculation output value is less than or equal to 255, the pixel data output value of the corresponding sub-pixel is equal to the calculation output value;
[0133] When the calculated output value is greater than 255, the pixel data output value of the corresponding sub-pixel is equal to 255.
[0134] In this embodiment, the current pixel data value of the corresponding sub-pixel is denoted as P 1 , the data output value is denoted as P_out, and the calculated output value is denoted as C 1 , the specific operation refers to:
[0135] When the current pixel data value P of the corresponding sub-pixel 1 is the low gray level of this sub-pixel, then
[0136] C 1 = P 1 + ΔP,
[0137] When the current pixel data value P of the corresponding sub-pixel 1 is the high gray level of this sub-pixel, then
[0138] C 1 = P 1 - ΔP.
[0139] For example, referring to Figure 5 the 2*6 calculation matrix on the left, the first row is the LHLH...LHLH transformation. The current pixel data value P of the R sub-pixel in the first row and the first column 1 is RL1p, which is the low gray level of this sub-pixel, then
[0140] C 1_RL1p = RL1p + ΔP,
[0141] The current pixel data value P of the G sub-pixel in the first row and the second column 1 is GH1p, which is the high gray level of this sub-pixel, then
[0142] C 1_GH1p = GH1p - ΔP,
[0143] Among them, if C 1 ≤ 255, then P_out = C 1 ;
[0144] If C 1 > 255, then P_out = 255;
[0145] That is, if C 1_RL1p = RL1p + ΔP ≤ 255, then the output data value of the R sub-pixel in the first row and the first column is P_out_RL1p = RL1p + ΔP,
[0146] If C 1_GH1pIf =GH1p - ΔP ≤ 255, then the output data value of the G sub-pixel in the second column of the first row is P_out_GH1p = GH1p - ΔP.
[0147] The calculation of the corresponding data output values of other sub-pixels can refer to the above calculation method, and will not be deduced one by one here.
[0148] Combined with the above embodiments, the working principle and process of a specific implementation manner of an image processing method disclosed by the present invention will be briefly described below.
[0149] Input the original image, which includes multiple R / G / B sub-pixels. First, perform grayscale transformation on the original image to obtain the first data value and the second data value of each sub-pixel, calculate the pixel data mean value according to the first data value and the second data value, and use one of the first data value and the second data value as the current pixel data value of the corresponding sub-pixel. Then divide the pixel matrix into multiple calculation matrices each containing 2 rows * 6 columns of sub-pixels. In each calculation matrix, calculate the pixel comparison values corresponding to the R / G / B sub-pixels in the calculation matrix respectively according to the current pixel data value and the pixel data mean value of the corresponding sub-pixel obtained above, and uniformly denote the pixel comparison values of each sub-pixel as P_sh.
[0150] Compare the absolute value of the pixel comparison value P_sh with the first threshold P_th_sta. When |P_sh| ≤ P_th_sta, the data adjustment value ΔP of this sub-pixel is obtained as 0. When |P_sh| > P_th_sta, continue to compare the pixel comparison value P_sh with the second threshold P_th_end. When P_sh ≥ P_th_end, calculate the data adjustment value ΔP = P_sh. When P_th_sta < P_sh < P_th_end, calculate the data adjustment value According to the data adjustment value ΔP and the current pixel data value P 1 Obtain the pixel calculation output value C 1 , when, C 1 ≤ 255, the pixel data output value P_out = C 1 , since the maximum value of the grayscale value is 255, when C 1 > 255, the pixel data output value P_out can only be adjusted to 255 at most.
[0151] Obtain the pixel data output values of all sub-pixels according to the above calculation method, and finally output the voltage signal corresponding to the pixel data output value by the data driving unit to implement the processing of the original image and improve the color cast phenomenon of the display device.
[0152] Another embodiment of the present invention also discloses an image processing device 100. Refer toFigure 2 , which includes an input unit 10, a timing controller 20, a storage unit 30, and a data driving unit 40. Among them, the input unit 10 includes, for example, a plurality of data input interfaces for inputting a raw image. The timing controller 20 is configured to receive the raw image from the input unit 10, store the raw image in the storage unit 30, and cooperate with the storage unit 30 to execute any one of the image processing methods in the foregoing embodiments. The storage unit 30 may be, for example, a line buffer. The data driving unit 40 outputs a voltage signal corresponding to the pixel data output value according to the pixel data output value of each sub-pixel to implement the processing of the raw image and improve the color cast phenomenon of the display device. Wherein the data driving unit 40 includes, for example, a gate driving circuit and a data driving circuit. The gate driving circuit is configured to output a corresponding gate driving signal, and the data driving circuit is configured to output a voltage signal corresponding to the pixel data output value.
[0153] The image processing apparatus provided by the embodiment of the present invention can execute the above image processing method through the timing controller. The implementation principle and technical effect are similar and will not be described herein again.
[0154] Another embodiment of the present invention further provides an image processing system, including a processor and a memory connected to the processor. The processor is configured to execute the image processing method as described in the foregoing embodiments. The memory stores instructions executed by the processor, and the instructions cause the processor to execute operations to perform the image processing method as described in the foregoing embodiments. The image processing system provided by the present invention can execute the image processing method described in the foregoing embodiments through the processor. The implementation principle and technical effect are similar and will not be described herein again.
[0155] Another embodiment of the present invention further provides another image processing apparatus for executing the image processing method described in the foregoing embodiments, including: an image acquisition module for executing step S1 of the foregoing image processing method; a grayscale processing module for executing step S2 of the foregoing image processing method; a pixel comparison value acquisition module for executing step S3 of the foregoing image processing method; a data adjustment value acquisition module for executing step S4 of the foregoing image processing method; a pixel data output value acquisition module for executing step S5 of the foregoing image processing method. For the detailed process and specific details of the image processing method, please refer to the description of the foregoing embodiments and will not be described herein again. The technical effect of the image processing apparatus provided in this embodiment is the same as that of the image processing method in the foregoing embodiments and will not be described herein again.
[0156] Another embodiment of the present invention provides a computer-readable medium storing computer-readable instructions including instructions for performing the image processing method as described in the foregoing embodiments. The technical effects of the computer-readable medium provided in this embodiment are the same as those of the image processing method in the foregoing embodiments, and will not be elaborated herein.
[0157] It should be noted that in several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and / or methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units / modules is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical, or other forms.
[0158] The units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units / modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] In addition, in each embodiment of the present invention, the functional units / modules can be integrated into one processing unit / module, or each unit / module can exist physically alone, or two or more units / modules can be integrated into one unit / module. The above integrated unit / module can be implemented in the form of hardware or in the form of hardware plus software functional units / modules.
[0160] The above integrated unit / module implemented in the form of software functional units / modules can be stored in a computer-readable storage medium. The above software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which can be a personal computer, a server, or a network device, etc.) to execute some steps of the methods described in each embodiment of the present invention.
[0161] The image processing method and device disclosed in the above embodiments of the present invention can adjust the pixel data of the original image by processing the original image to calculate the data adjustment value corresponding to the sub-pixel and obtaining the pixel data output value according to the data adjustment value, so as to improve the color cast phenomenon of the display device, and has the characteristics of simplicity and high efficiency.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image processing method, characterized in that: include: Acquire an original image, where the original image includes a plurality of sub-pixels; Performing grayscale conversion processing on the original image to obtain first pixel data corresponding to each sub-pixel; Obtaining a pixel comparison value of the corresponding sub-pixel based on the first pixel data; Obtaining the corresponding data adjustment value of the sub-pixel according to the pixel comparison value, the first threshold and the second threshold specifically includes: Compare the absolute value of the pixel comparison value and the first threshold value: When the absolute value of the pixel comparison value is less than or equal to the first threshold, the data adjustment value is equal to 0; When the absolute value of the pixel comparison value is greater than the first threshold, the second threshold is calculated according to the first threshold; the second threshold is greater than the first threshold; the absolute value of the pixel comparison value is compared with the second threshold: when the absolute value of the pixel comparison value is greater than or equal to the second threshold, the data adjustment value is equal to the pixel comparison value; when the absolute value of the pixel comparison value is less than the second threshold, the data adjustment value is calculated according to the first threshold and the second threshold; A pixel data output value of the corresponding sub-pixel is obtained based on the first pixel data and the data adjustment value.
2. The image processing method according to claim 1, characterized in that: The first pixel data includes a first data value and a second data value; The obtaining the pixel comparison value of the corresponding sub-pixel based on the first pixel data includes: Taking the average of the first data value and the second data value as the pixel data mean value of the corresponding sub-pixel; Using one of the first data value and the second data value as the current pixel data value of the corresponding sub-pixel; and The pixel comparison value of the corresponding sub-pixel is obtained according to the current pixel data value and the pixel data average value.
3. The image processing method according to claim 2, characterized in that: The plurality of sub-pixels include: a plurality of first color sub-pixels, a plurality of second color sub-pixels, and a plurality of third color sub-pixels; Obtaining the pixel comparison value of the corresponding sub-pixel according to the current pixel data value and the pixel data average value, comprising: Determine at least one calculation matrix based on the plurality of sub-pixels, the calculation matrix comprising: at least one first color sub-pixel, at least one second color sub-pixel, and at least one third color sub-pixel; The pixel comparison value corresponding to the at least one first color sub-pixel in the calculation matrix is calculated based on the current pixel data value corresponding to each of the at least one first color sub-pixels and the pixel data average value corresponding to each of the at least one first color sub-pixels, wherein the pixel comparison values corresponding to the at least one first color sub-pixel in the same calculation matrix are the same; The pixel comparison value corresponding to the at least one second color sub-pixel in the calculation matrix is calculated based on the current pixel data value corresponding to each of the at least one second color sub-pixels and the pixel data mean value corresponding to each of the at least one second color sub-pixels, wherein the pixel comparison values corresponding to the at least one second color sub-pixel in the same calculation matrix are the same; The pixel comparison value corresponding to at least one third color sub-pixel in the calculation matrix is calculated based on the current pixel data value corresponding to each of the at least one third color sub-pixels and the corresponding pixel data mean value, wherein the pixel comparison values corresponding to the at least one third color sub-pixel in the same calculation matrix are the same.
4. The image processing method according to claim 3, characterized in that: The determining at least one calculation matrix based on the plurality of sub-pixels comprises: Divide the multiple sub-pixels into multiple calculation matrices, each of the calculation matrices includes n*m first color sub-pixels, n*m second color sub-pixels and n*m third color sub-pixels; The step of calculating the pixel comparison value corresponding to the at least one first color sub-pixel in the calculation matrix based on the current pixel data value corresponding to each of the at least one first color sub-pixels and the pixel data mean value corresponding to each of the at least one first color sub-pixels comprises: The n*m current pixel data values corresponding to the n*m first color sub-pixels are summed to obtain a first sum value; the n*m pixel data mean values corresponding to the n*m first color sub-pixels are summed to obtain a second sum value; the pixel comparison value corresponding to the first color sub-pixel is half of the difference between the first sum value and the second sum value; The step of calculating the pixel comparison value corresponding to the at least one second color sub-pixel in the calculation matrix based on the current pixel data value corresponding to each of the at least one second color sub-pixels and the pixel data mean value corresponding to each of the at least one second color sub-pixels comprises: The n*m current pixel data values corresponding to the n*m second color sub-pixels are summed to obtain a third sum value; the n*m pixel data mean values corresponding to the n*m second color sub-pixels are summed to obtain a fourth sum value; the pixel comparison value corresponding to the second color sub-pixel is half of the difference between the third sum value and the fourth sum value; The step of calculating the pixel comparison value corresponding to the at least one third color sub-pixel in the calculation matrix based on the current pixel data value corresponding to each of the at least one third color sub-pixels and the pixel data mean value corresponding to each of the at least one third color sub-pixels comprises: The n*m current pixel data values corresponding to the n*m third color sub-pixels are summed to obtain a fifth sum value; the n*m pixel data mean values corresponding to the n*m third color sub-pixels are summed to obtain a sixth sum value; the pixel comparison value corresponding to the second color sub-pixel is half of the difference between the fifth sum value and the sixth sum value; Wherein, n and m are both positive integers greater than 1.
5. The image processing method according to claim 1, wherein: The calculating the data adjustment value according to the first threshold and the second threshold includes: taking the difference between the pixel comparison value and the first threshold as a first difference; taking the difference between the second threshold and the first threshold as a second difference; The product obtained by multiplying the ratio of the first difference to the second difference by the second threshold is used as the data adjustment value.
6. The image processing method according to claim 1, characterized in that: Calculating the second threshold according to the first threshold includes: The sum of the first threshold value and a set reference value is used as the second threshold value; The set reference value is a positive integer power of 2.
7. The image processing method according to claim 2, characterized in that: The step of obtaining the corresponding pixel data output value of the sub-pixel based on the first pixel data and the data adjustment value comprises: The current pixel data value of the sub-pixel and the data adjustment value are subjected to a specific operation to obtain a calculated output value; When the calculated output value is less than or equal to 255, the pixel data output value of the corresponding sub-pixel is equal to the calculated output value; When the calculated output value is greater than 255, the pixel data output value of the corresponding sub-pixel is equal to 255.
8. An image processing device, characterized in that: include: An input unit, a timing controller connected to the input unit, a storage unit connected to the timing controller, and a data driving unit connected to the timing controller; wherein, The timing controller is used to cooperate with the storage unit to execute the image processing method according to any one of claims 1 to 7, and the original image comes from the input unit; as well as The data driving unit is used to output a voltage signal corresponding to the pixel data output value according to the pixel data output value of each sub-pixel.
Citation Information
Patent Citations
Video image quality enhancement method and related equipment thereof
CN110996174A