Image processing device and method thereof, display device and computer readable storage medium
By performing grayscale mapping and partition contrast enhancement processing in the image processing device, the problems of insufficient brightness and low contrast when converting RGB data into RGBW data in the prior art are solved, and the display brightness can be improved without increasing power consumption. and contrast effects.
Patent Information
- Application Number
- CN202011537468.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-23
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-12-23
AI Technical Summary
The existing method of converting RGB data into RGBW data suffers from insufficient display brightness and low contrast, resulting in poor display quality of the display screen.
Using an image processing device including a brightness and saturation calculation unit, a normalization processing unit, an RGBW determination unit, a denormalization processing unit and a sub-pixel rendering unit, the gain coefficient is calculated and the external configuration is performed through grayscale mapping processing and partition contrast enhancement processing Configurable coefficients to convert RGB data to RGBW data.
The brightness of the display screen is increased without changing the power consumption, and the contrast of the display screen is enhanced while increasing the brightness, thereby improving the overall quality of the display screen.
Smart Images

Figure CN112884661B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of display technology, and in particular to an image processing device and method thereof, a display device and a computer-readable storage medium. Background Art
[0002] At present, in the field of display technology, for example, in image display devices such as Liquid Crystal Display (LCD) and Organic Light Emitting Diode (OLED), in order to display higher brightness while reducing display power consumption, RGBW display technology is often used. RGBW display technology is a new pixel arrangement (RGBW arrangement) technology composed of red (R) sub-pixels, green (G) sub-pixels, blue (B) sub-pixels and white sub-pixels (W). When the backlight brightness is the same, the RGBW screen can display higher brightness; when the display brightness is the same, the RGBW screen has lower power consumption.
[0003] Since the commonly used video signals, such as Video Graphics Array (VGA) interface or Digital Visual Interface (DVI), transmit RGB format data, it is necessary to convert the RGB data to RGBW data to drive the RGBW display to correctly display color images. Currently, FPGA or customized IC is often used to realize data processing and display module driving.
[0004] However, the method of converting RGB data into RGBW data in the prior art has the problem of insufficient display brightness and low contrast, thereby reducing the display quality of the display picture. Summary of the invention
[0005] The embodiments of the present invention provide an image processing device and method thereof, a display device and a computer-readable storage medium, which are used to improve the brightness of a display picture without changing power consumption, and to enhance the contrast of a display picture while ensuring the improvement of display brightness.
[0006] To achieve the above-mentioned purpose, an embodiment of the present invention provides an image processing device, comprising: a brightness and saturation calculation unit, used to calculate the brightness value and saturation value of the current frame according to the input RGB pixel data; a normalization processing unit, used to normalize the input RGB pixel data; an RGBW determination unit, used to determine the RGBW pixel data according to the normalized RGB pixel data and the brightness value and saturation value; a denormalization processing unit, used to denormalize the RGBW pixel data; and a sub-pixel rendering unit, used to arrange the denormalized RGBW pixel data to determine the output RGBW pixel data.
[0007] Optionally, the RGBW determination unit includes: a grayscale mapping processing unit: used to perform grayscale mapping processing on the RGB pixel data after normalization processing; a partition contrast enhancement processing unit: used to perform partition contrast enhancement processing on the RGB pixel data after grayscale mapping processing; and an RGBW conversion unit: used to convert the RGB pixel data after the partition contrast enhancement processing into RGBW pixel data.
[0008] Optionally, the grayscale mapping processing unit is configured to: calculate a gain coefficient K_scaler, and use the calculated gain coefficient K_scaler to perform grayscale mapping processing on the normalized RGB pixel data, wherein the gain coefficient K_scaler is calculated by the following formula:
[0009] K_scaler=128+scaler_in×S×V / 255
[0010] Among them, scaler_in is an externally configurable coefficient with a value range of 0 to 2, S is the saturation value, and V is the brightness value.
[0011] Optionally, the grayscale mapping processing unit is configured to: perform grayscale mapping processing on the normalized RGB pixel data according to the following formula:
[0012] R1=K_scaler×R0
[0013] G1=K_scaler×G0
[0014] B1=K_scaler×B0
[0015] Among them, R0 is the grayscale value of the red sub-pixel after normalization, G0 is the grayscale value of the green sub-pixel after normalization, B0 is the grayscale value of the blue sub-pixel after normalization, R1 is the grayscale value of the red sub-pixel after grayscale mapping processing, G1 is the grayscale value of the green sub-pixel after grayscale mapping processing, and B1 is the grayscale value of the blue sub-pixel after grayscale mapping processing.
[0016] Optionally, the partition contrast enhancement processing unit is configured to: convert the RGB image after grayscale mapping processing into a YUV color space to obtain a YUV image including a YUV component, keep the UV component unchanged, divide the Y component image into multiple partitions of the same size, and count the number s(i) of sub-pixels of different grayscales in each partition, where i=0,1,2...255; and when s(i) is greater than a first threshold, set the value of s(i) to the first threshold, and when s(i) is less than a second threshold, set the value of s(i) to the second threshold.
[0017] Optionally, the partition contrast enhancement processing unit is configured to: accumulate the number of sub-pixels with different grayscales in each partition s(i) to obtain the number of sub-pixels with different grayscales in the current frame image p(i),
[0018]
[0019] Then, the grayscale distribution of the current frame image is used to map the next frame image using the following formula:
[0020] y_out(i)=255×p(i) / p(255)i=0,1,2……255
[0021] Among them, i is the input grayscale value, y_out(i) is the grayscale value of the Y component after the partition contrast enhancement processing, and then the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component is converted back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing, among which R1' is the grayscale value of the red sub-pixel after the partition contrast enhancement processing, G1' is the grayscale value of the green sub-pixel after the partition contrast enhancement processing, and B1' is the grayscale value of the blue sub-pixel after the partition contrast enhancement processing.
[0022] Optionally, the RGBW conversion unit is configured to: convert the RGB pixel data after the partition contrast enhancement process into RGBW pixel data by using the following formula:
[0023] W=min(R1′,G1′,B1′)
[0024]
[0025] R O =k×R1′-W
[0026] G O =k×G1′-W
[0027] B O =k×B1′-W
[0028] W O =w_scaler×W
[0029] Among them, w_scaler is an externally configurable coefficient, and its value range is 0 to 2.
[0030] An embodiment of the present invention also provides an image processing method, the method comprising: calculating the brightness value and saturation value of the current frame image according to the input RGB pixel data; normalizing the input RGB pixel data; determining RGBW pixel data according to the normalized RGB pixel data and the brightness value and saturation value; denormalizing the RGBW pixel data; and arranging the denormalized RGBW pixel data to determine output RGBW pixel data.
[0031] Optionally, the step of determining RGBW pixel data based on the normalized RGB pixel data and the brightness value and saturation value includes: performing grayscale mapping on the normalized RGB pixel data; performing partition contrast enhancement on the RGB pixel data after the grayscale mapping; and converting the partition contrast enhancement-processed RGB pixel data into RGBW pixel data.
[0032] Optionally, the step of performing grayscale mapping on the normalized RGB pixel data includes: calculating a gain coefficient K_scaler, and performing grayscale mapping on the normalized RGB pixel data using the calculated gain coefficient K_scaler, wherein the gain coefficient K_scaler is calculated by the following formula:
[0033] K_scaler=128+scaler_in×S×V / 255
[0034] Among them, scaler_in is an externally configurable coefficient with a value range of 0 to 2, S is the saturation value, and V is the brightness value.
[0035] Optionally, the step of performing grayscale mapping on the normalized RGB pixel data includes: performing grayscale mapping on the normalized RGB pixel data according to the following formula:
[0036] R1=K_scaler×R0
[0037] G1=K_scaler×G0
[0038] B1=K_scaler×B0
[0039] Among them, R0 is the grayscale value of the red sub-pixel after normalization, G0 is the grayscale value of the green sub-pixel after normalization, B0 is the grayscale value of the blue sub-pixel after normalization, R1 is the grayscale value of the red sub-pixel after grayscale mapping processing, G1 is the grayscale value of the green sub-pixel after grayscale mapping processing, and B1 is the grayscale value of the blue sub-pixel after grayscale mapping processing.
[0040] Optionally, the step of performing partition contrast enhancement processing on the RGB pixel data after grayscale mapping processing includes: converting the RGB image after grayscale mapping processing into a YUV color space to obtain a YUV image including a YUV component, keeping the UV component unchanged, dividing the Y component image into multiple partitions of the same size, and counting the number s(i) of pixels of different grayscales in each partition, where i=0, 1, 2...255; and when s(i) is greater than a first threshold, setting the value of s(i) to the first threshold, and when s(i) is less than a second threshold, setting the value of s(i) to the second threshold.
[0041] Optionally, the step of performing a partition contrast enhancement process on the RGB pixel data after the grayscale mapping process includes: accumulating the number of pixels with different grayscales in each partition s(i) to obtain the number of pixels with different grayscales in the current frame image p(i),
[0042]
[0043] Then, the grayscale distribution of the current frame image is used to map the next frame image using the following formula:
[0044] y_out(i)=255×p(i) / p(255)i=0,1,2……255
[0045] Among them, i is the input grayscale value, y_out(i) is the grayscale value of the Y component after the partition contrast enhancement processing, and then the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component is converted back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing, R1' is the grayscale value of the red sub-pixel after the partition contrast enhancement processing, G1' is the grayscale value of the green sub-pixel after the partition contrast enhancement processing, and B1' is the grayscale value of the blue sub-pixel after the partition contrast enhancement processing.
[0046] Optionally, the step of converting the RGB pixel data after the partition contrast enhancement process into RGBW pixel data includes: converting the RGB pixel data after the partition contrast enhancement process into RGBW pixel data by using the following formula:
[0047] W=min(R1′,G1′,B1′)
[0048]
[0049] R O =k×R1′-W
[0050] G O =k×G1′-W
[0051] B O =k×B1′-W
[0052] W O =w_scaler×W
[0053] Among them, w_scaler is an externally configurable coefficient, and its value range is 0 to 2.
[0054] An embodiment of the present invention also provides a display device, a memory; one or more processors; the memory and the one or more processors are connected to each other; and the memory stores computer executable instructions for controlling the one or more processors to implement the above-mentioned image processing method when executed.
[0055] An embodiment of the present invention further provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and the computer program implements the above-mentioned image processing method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A schematic diagram of the structure of an image processing device provided by an embodiment of the present invention;
[0057] Figure 2 The original image and image grayscale distribution without grayscale mapping processing provided by the embodiment of the present invention;
[0058] Figure 3 An image and image grayscale distribution after grayscale mapping processing provided by an embodiment of the present invention;
[0059] Figure 4 The original image and image grayscale distribution without grayscale mapping processing, the image and image grayscale distribution after grayscale mapping processing, and the image and image grayscale distribution after partition contrast enhancement processing provided in the embodiment of the present invention;
[0060] Figure 5 Schematic diagram of a calculation method for weighted average processing of grayscale values of a neighborhood partition image in an embodiment of the present invention;
[0061] Figure 6 is a flow chart of an image processing method according to an embodiment of the present invention;
[0062] Figure 7 The figure is a flowchart of an image processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to enable those skilled in the art to better understand the technical solution of the present invention, the image processing device and method thereof, the display device and the computer-readable storage medium provided by the present invention are described in detail below with reference to the accompanying drawings.
[0064] Figure 1 A schematic diagram of the structure of an image processing device provided in Embodiment 1 of the present invention is shown in FIG. Figure 1 As shown, the device includes: a brightness and saturation calculation unit 11, a normalization processing unit 12, an RGBW determination unit 13, a denormalization processing unit 17 and a sub-pixel rendering unit 18. The brightness and saturation calculation unit 11 is used to calculate the brightness value and saturation value of the current frame according to the input RGB pixel data, the normalization processing unit 12 is used to normalize the input RGB pixel data; the RGBW determination unit 13 is used to determine the RGBW pixel data according to the normalized RGB pixel data and the brightness value and saturation value; the denormalization processing unit 17 is used to denormalize the RGBW pixel data; and the sub-pixel rendering unit 18 is used to arrange the denormalized RGBW pixel data to determine the output RGBW pixel data.
[0065] It should be noted that, in the present embodiment, the brightness and saturation calculation unit 11 is used to calculate the brightness and saturation values of the current frame according to the input RGB pixel data. In image processing, commonly used color spaces include RGB model, CMYK model, HSV model and HSL model. Among them, the RGB model adopts a three-dimensional coordinate form and is commonly used in color display and image processing. The HSV model is a color model for user perception, which defines color by hue, value and saturation, and is closer to the human eye's definition of color. It focuses on color representation. In computer graphics applications and display fields, the RGB model is often converted to the HSV model for calculation. The embodiment of the present invention uses a conventional conversion formula in the prior art to convert the RGB model to the HSV model to obtain the brightness value and saturation value of the current frame.
[0066] In addition, in this embodiment, the normalization processing unit 12 is used to normalize the input RGB pixel data. Each sub-pixel in the RGB pixel data has a value range of 0 to 225. In order to facilitate data processing, it is more convenient and fast to map the RGB pixel data to a range of 0 to 1 for processing. The normalization processing unit 12 is configured to normalize the input RGB pixel data (Rin / Gin / Bin) through the following formula:
[0067]
[0068]
[0069]
[0070] Among them, γ=2.2.
[0071] Further, the RGBW determination unit 13 includes: a grayscale mapping processing unit 14, a partition contrast enhancement processing unit 15 and an RGBW conversion unit 16. The grayscale mapping processing unit 14 is used to perform grayscale mapping processing on the RGB pixel data after the normalization processing; the partition contrast enhancement processing unit 15 is used to perform partition contrast enhancement processing on the RGB pixel data after the grayscale mapping processing; and the RGBW conversion unit 16 is used to convert the RGB pixel data after the partition contrast enhancement processing into RGBW pixel data.
[0072] Specifically, the grayscale mapping processing unit 14 is configured to calculate a gain coefficient K_scaler, and use the calculated gain coefficient K_scaler to perform grayscale mapping processing on the normalized RGB pixel data. The gain coefficient K_scaler is calculated by the following formula:
[0073] K_scaler=128+scaler_in×S×V / 255
[0074] Among them, scaler_in is an externally configurable coefficient with a value range of 0 to 2, S is the saturation value obtained after converting the RGB model to the HSV model, and V is the brightness value obtained after converting the RGB model to the HSV model. And using the calculated gain coefficient K_scaler, the normalized RGB pixel data is grayscale mapped using the following formula:
[0075] R1=K_scaler×R0
[0076] G1=K_scaler×G0
[0077] B1=K_scaler×B0
[0078] Among them, R0 is the grayscale value of the red sub-pixel after normalization, G0 is the grayscale value of the green sub-pixel after normalization, B0 is the grayscale value of the blue sub-pixel after normalization, R1 is the grayscale value of the red sub-pixel after grayscale mapping processing, G1 is the grayscale value of the green sub-pixel after grayscale mapping processing, and B1 is the grayscale value of the blue sub-pixel after grayscale mapping processing.
[0079] It should be noted that the purpose of setting the grayscale mapping processing unit 14 in the present invention is to increase the grayscale value and improve the brightness of the picture within a certain range. Figure 2 The original image and image grayscale distribution without grayscale mapping processing provided by the embodiment of the present invention, Figure 3 The image and image grayscale distribution after grayscale mapping provided by the embodiment of the present invention are compared Figure 2 and Figure 3 , it can be seen that the grayscale value of the image is improved through grayscale mapping processing, so that the overall display brightness is improved.
[0080] Furthermore, the partition contrast enhancement processing unit 15 is configured to convert the RGB image after grayscale mapping processing into the YUV color space to obtain a YUV image including a YUV component, keep the UV component unchanged, and divide the Y component image into multiple partitions of the same size. The partitions are related to the size and resolution of the screen, etc., and can be reasonably partitioned according to actual conditions. The number s(i) of sub-pixels of different grayscales in each partition is counted separately, where i=0,1,2...255; and when s(i) is greater than a first threshold, the value of s(i) is set to the first threshold, and when s(i) is less than a second threshold, the value of s(i) is set to the second threshold, and the first threshold is greater than the second threshold. Further, the number s(i) of sub-pixels of different grayscales in each partition is accumulated to obtain the number p(i) of sub-pixels of different grayscales in the current frame image.
[0081]
[0082] Then, the grayscale distribution of the current frame image is used to map the next frame image using the following formula:
[0083] y_out(i)=255×p(i) / p(255)i=0,1,2……255
[0084] Among them, i is the input grayscale value, y_out(i) is the grayscale value of the Y component after the partition contrast enhancement processing, and then the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component is converted back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing, R1' is the grayscale value of the red sub-pixel after the partition contrast enhancement processing, G1' is the grayscale value of the green sub-pixel after the partition contrast enhancement processing, and B1' is the grayscale value of the blue sub-pixel after the partition contrast enhancement processing.
[0085] Since the present application performs grayscale mapping processing on the red (R) sub-pixel, green (G) sub-pixel, and blue (B) sub-pixel in the RGB pixel data, respectively, and then converts the RGB image to the YUV color space to obtain a YUV image including YUV components, Y represents brightness (Luminance), U represents chrominance (Chrominance), and V represents saturation (Chroma). The image video file encoded in the YUV format occupies a smaller bandwidth during transmission, and can save more brightness information and less color difference information. The present application keeps the UV component unchanged, only performs partition contrast enhancement processing on the Y component image, and then converts it back to the RGB color space using the enhanced Y component and the original UV value, so that the overall contrast of the image is more balanced, and the contrast of the display screen is enhanced while ensuring the improvement of the display brightness. Unless otherwise specified, the pixel points recorded below refer to sub-pixel points.
[0086] Specifically, the setting of the first threshold and the second threshold in the embodiment of the present invention is explained as follows: The present invention takes into account the changes in the actual image, avoids the problem that the image is too bright as a whole or the target point is weakened, and adopts the setting of the first threshold (upper threshold) and the second threshold (lower threshold) to limit the number of pixels of different grayscales in each partition, thereby limiting the number of pixels of different grayscales in the overall image. Specifically, when the grayscale values of most pixels in the image are distributed at a position close to 0, if the upper threshold is not set, the grayscale values of a large number of low-grayscale pixels may become very high after processing, thereby causing the image to be too bright as a whole; and when most of the content in the image is background pixels and the number of target pixels is very small, if the lower threshold is not set, the processing results of the target pixels with a small number of targets will be very close to the background pixels after processing, thereby causing the target in the image to be weakened or even disappear.
[0087] The following is a simple example to illustrate the specific calculation method of the partition contrast enhancement processing unit, in order to more clearly explain the overall trend change of the image after setting the upper and lower thresholds. For ease of understanding, the entire image is divided into a partition for example. Assume that there is a 25×25 partition, and the grayscale distribution of the original image in the partition is:
[0088] There are 100 pixels with a gray value of 10;
[0089] There are 200 pixels with a grayscale value of 20;
[0090] There are 200 pixels with a gray value of 30;
[0091] There are 100 pixels with a grayscale value of 200;
[0092] There are 25 pixels with a grayscale value of 255;
[0093] If the threshold limit is not set, the result after contrast enhancement is:
[0094] The gray value of the pixel with a gray value of 10 in the original image becomes:
[0095] 255×100 / 625=40,
[0096] Similarly, the grayscale values of pixels with grayscale values of 20 / 30 / 200 / 255 in the original image are as follows after processing:
[0097] 255×300 / 625=120,
[0098] 255×500 / 625=200,
[0099] 255×600 / 625=240,
[0100] 255×625 / 625=255.
[0101] If the upper threshold is set to 100 (first take the upper threshold as an example for explanation), the grayscale values of pixels with grayscale values of 10 / 20 / 30 / 200 / 255 in the original image after processing are:
[0102] 255×100 / 425=60,
[0103] 255×200 / 425=120,
[0104] 255×300 / 425=180,
[0105] 255×400 / 425=240,
[0106] 255×425 / 425=255.
[0107] Among them, 425=100 (the number of pixels with a grayscale of 10)+100 (the number of pixels with a grayscale of 20)+100 (the number of pixels with a grayscale of 30)+100 (the number of pixels with a grayscale of 200)+25 (the number of pixels with a grayscale of 255).
[0108] It can be seen from the above example that the overall contrast of the image after being processed by the partition contrast enhancement processing unit is more balanced, and the contrast of the display screen is enhanced while ensuring the improvement of display brightness.
[0109] in addition, Figure 4 The original image and image grayscale distribution without grayscale mapping processing, the image and image grayscale distribution after grayscale mapping processing, and the image and image grayscale distribution after subarea contrast enhancement processing provided by the embodiment of the present invention are shown. Figure 4 It can be seen that after the partition contrast enhancement processing, compared with the original image grayscale distribution, the brightness of the display screen is improved without changing the power consumption, and the contrast of the display screen is enhanced while ensuring the improvement of the display brightness. In addition, the grayscale distribution of the image after the partition contrast enhancement processing is more balanced than that of the image directly processed by grayscale mapping, which enhances the contrast of the display screen.
[0110] It should be noted that in order to avoid the problem of different grayscale values of pixels at the partition boundary causing image distortion and to ensure that the image at the partition boundary can transition smoothly, each partition boundary position needs to be weighted averaged according to the grayscale value of the neighboring partition (if there is a neighboring partition) image to ensure the smoothness of the entire displayed image. The calculation formula for weighted average can refer to the following formula:
[0111] Result=k1*I1+(1–k1)*I2
[0112] Among them, I1 and I2 represent the pixel grayscale values of the same position of the pixel in two adjacent partitions, I1 is the pixel grayscale value of the pixel in the left partition, I2 is the pixel grayscale value of the pixel in the right partition, k1 is the weighting coefficient, which is related to the distance between the current pixel and the partition boundary position, as shown in the following figure: Figure 5 As shown, Figure 5 Schematic diagram of a calculation method for weighted average processing of grayscale values of a neighborhood partition image in an embodiment of the present invention; Figure 5 The left and right boxes represent the adjacent left and right partitions respectively. The horizontal overlap width is L pixels. The final pixel value of each pixel in the overlapping area is the weighted average calculated by the above formula. Figure 5 The calculation method of the weight coefficient k1 of the pixel position in is:
[0113] k1=L2 / L=(L–L1) / L
[0114] Among them, L is the number of pixels of the horizontal overlapping width, L1 is the number of pixels from the current pixel (for example, the current pixel is located in the right partition) to the left boundary, L2 is the number of pixels from the current pixel to the right boundary, L1+L2=L.
[0115] In order to explain the weight setting more clearly, we assume that Figure 5 The number of pixels from the pixel point in the left partition (for example, the current pixel point is located in the left partition) to the right boundary is greater than the number of pixels from the pixel point (for example, the current pixel point is located in the right partition) to the left boundary, that is, L2>L1. This means that the pixel point is closer to the center point of the left partition and farther from the center point of the right partition. Therefore, the result generated by the left partition should be given a higher weight coefficient. Therefore, through the above formula, the value of k1 is greater than the value of 1-k1, that is, I1 is given a larger weight and I2 is given a smaller weight value. Further, the pixel grayscale value of the partition boundary can be determined more reasonably to ensure that the image at the partition boundary can transition smoothly.
[0116] Furthermore, the RGBW conversion unit 16 is used to convert the RGB pixel data after the partition contrast enhancement process into RGBW pixel data. Since the input signal is RGB data and the display panel is an RGBW pixel architecture, RGB to RGBW data conversion is required. Currently, the commonly used RGB to RGBW algorithms in the industry include replacement and enhancement. An RGBW conversion unit 16 provided in an embodiment of the present invention is configured to convert the RGB pixel data after the partition contrast enhancement process into RGBW pixel data through the following formula:
[0117] W=min(R1′,G1′,B1′)
[0118]
[0119] R O =k×R1′-W
[0120] G O =k×G1′-W
[0121] B O =k×B1′-W
[0122] W O =w_scaler×W
[0123] Among them, w_scaler is an externally configurable coefficient, and its value range is 0 to 2. By setting the external gain coefficient w_scaler, the display brightness of the image can be increased.
[0124] Furthermore, the denormalization processing unit 17 is used to perform denormalization processing on the RGBW pixel data, and after the processing is completed, the data is displayed through the display driving device. The denormalization processing unit 17 is configured to perform the following Gamma processing:
[0125]
[0126]
[0127]
[0128]
[0129] Among them, γ=2.2.
[0130] Furthermore, the sub-pixel rendering unit 18 is used to arrange the RGBW pixel data after the denormalization process to determine the output RGBW pixel data. Each main pixel is composed of four sub-pixels, which are composed of "red + green + blue + white", and sub-pixel rendering (Sub Pixel Rendering) is a pixel rendering technology that arranges sub-pixels in a reasonable order and periodically, for example, "red + green" or "green + blue" or "blue + red" and other different arrangements to output pixel data that meets the visual effect. By adopting the sub-pixel rendering unit 18, the penetration rate of the display device can be further improved, the power consumption of the display device can be reduced, the PPI (Pixels Per Inch) of the display device can be improved, and the picture details can be enriched.
[0131] The second embodiment of the present invention further provides an image processing method, such as Figure 6 As shown, Figure 6 A flowchart of an image processing method provided by Embodiment 2 of the present invention is shown, and the method includes:
[0132] Step 101, calculating the brightness and saturation of the current frame according to the input RGB pixel data;
[0133] Step 102: normalize the input RGB pixel data;
[0134] Step 103: Determine RGBW pixel data according to the normalized RGB pixel data and the brightness value and saturation value;
[0135] Step 104: Denormalize the RGBW pixel data; and
[0136] Step 105: Arrange the RGBW pixel data after the denormalization process to determine the output RGBW pixel data.
[0137] Among them, Figure 7 As shown, Figure 7 A flowchart of an image processing method provided by the second embodiment of the present invention is shown, and step 103 may include:
[0138] Step 201, performing grayscale mapping processing on the normalized RGB pixel data;
[0139] Step 202: convert the RGB pixel data after the grayscale mapping process into the YUV color space to obtain a YUV image including a YUV component, keep the UV component unchanged, and perform a partition contrast enhancement process on the Y component image;
[0140] Step 203, converting the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing; and
[0141] Step 204: convert the RGB pixel data after the subarea contrast enhancement process into RGBW pixel data.
[0142] Wherein, step 201 specifically includes:
[0143] The gain coefficient K_scaler is calculated, and the normalized RGB pixel data is subjected to grayscale mapping using the calculated gain coefficient K_scaler. The gain coefficient K_scaler is calculated using the following formula:
[0144] K_scaler=128+scaler_in×S×V / 255
[0145] Among them, scaler_in is an externally configurable coefficient with a value range of 0 to 2, S is the saturation value, and V is the brightness value.
[0146] The normalized RGB pixel data is grayscale mapped using the following formula:
[0147] R1=K_scaler×R0
[0148] G1=K_scaler×G0
[0149] B1=K_scaler×B0
[0150] Among them, R0 is the grayscale value of the red sub-pixel after normalization, G0 is the grayscale value of the green sub-pixel after normalization, B0 is the grayscale value of the blue sub-pixel after normalization, R1 is the grayscale value of the red sub-pixel after grayscale mapping processing, G1 is the grayscale value of the green sub-pixel after grayscale mapping processing, and B1 is the grayscale value of the blue sub-pixel after grayscale mapping processing.
[0151] Wherein, step 202 specifically includes:
[0152] Convert the grayscale mapped RGB image to the YUV color space to obtain a YUV image including a YUV component, keep the UV component unchanged, divide the Y component image into a plurality of partitions of the same size, and count the number of sub-pixels of different grayscales in each partition s(i), where i=0,1,2...255; and
[0153] When s(i) is greater than a first threshold, the value of s(i) is set to the first threshold,
[0154] When s(i) is less than the second threshold, the value of s(i) is set to the second threshold.
[0155] The number of sub-pixels with different grayscales in each partition s(i) is accumulated to obtain the number of sub-pixels with different grayscales in the current frame image p(i).
[0156]
[0157] Then, the grayscale distribution of the current frame image is used to map the next frame image using the following formula:
[0158] y_out(i)=255×p(i) / p(255)i=0,1,2……255
[0159] Among them, i is the input grayscale value, y_out(i) is the grayscale value of the Y component after the partition contrast enhancement processing, and then the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component is converted back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing, R1' is the grayscale value of the red sub-pixel after the partition contrast enhancement processing, G1' is the grayscale value of the green sub-pixel after the partition contrast enhancement processing, and B1' is the grayscale value of the blue sub-pixel after the partition contrast enhancement processing.
[0160] Wherein, step 203 comprises:
[0161] The RGB pixel data after the partition contrast enhancement process is converted into RGBW pixel data using the following formula:
[0162] W=min(R1′,G1′,B1′)
[0163]
[0164]
[0165] Among them, w_scaler is an externally configurable coefficient, and its value range is 0 to 2.
[0166] In addition, for the description of the implementation details and technical effects of the above methods, please refer to the description of the aforementioned device embodiments, which will not be repeated here.
[0167] It should be understood that each unit of the image processing device in the first embodiment can be implemented by hardware or by a combination of hardware and software. Figure 1 Each unit of the device shown may be a central processing unit (CPU), an application processor (AP), a digital signal processor (DSP), a field programmable logic circuit (FPGA), a microprocessor (MCU), a filter, an integrated circuit (IC) or an application specific integrated circuit (ASIC) having the corresponding functions described in the embodiments of the present disclosure. For example, Figure 1 Each unit of the device shown in the figure can be implemented by combining a processor, a memory and a computer program. The computer program is stored in the memory, and the processor reads and executes the computer program from the memory, thereby serving as Figure 1 The various units of the device shown.
[0168] Embodiment 3 of the present invention also provides a display device, comprising a memory; one or more processors; the memory and the one or more processors are connected to each other; and the memory stores computer executable instructions for controlling the one or more processors to implement the image processing method of the aforementioned embodiment 2.
[0169] Embodiment 4 of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the image processing method of the aforementioned embodiment 2 is implemented.
[0170] An image processing device and method thereof, a display device and a computer-readable storage medium provided by the embodiments of the present invention avoid the problems of insufficient display brightness and low contrast in the prior art, thereby reducing the display quality of the display screen. First, the input RGB image is preprocessed, and a certain degree of grayscale mapping is performed during the preprocessing process. At the same time, in order to ensure the image contrast after grayscale mapping, the proposal uses a partitioned contrast enhancement method to process the image after grayscale mapping to improve the contrast, and then performs RGBW conversion and SPR processing. Finally, the processing result is output to drive the RGBW display module to display the RGBW signal. The technical effect of increasing the brightness of the display screen without changing the power consumption and enhancing the contrast of the display screen while ensuring the increase in display brightness is achieved.
[0171] It should be noted that, in the absence of explicit conflict, the above-mentioned embodiments of the present disclosure may be combined with each other.
[0172] It should be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the protection scope of the present disclosure defined by the attached claims, and these modifications and improvements also belong to the protection scope of the present disclosure.
Claims
1. An image processing device, characterized in that: include: A brightness and saturation calculation unit, used to calculate the brightness and saturation values of the current frame according to the input RGB pixel data; A normalization processing unit, used for normalizing the input RGB pixel data; an RGBW determination unit, configured to determine the RGBW pixel data according to the normalized RGB pixel data and the brightness value and the saturation value; A denormalization processing unit, used for performing denormalization processing on the RGBW pixel data; as well as A sub-pixel rendering unit, used to arrange the RGBW pixel data after the denormalization process to determine the output RGBW pixel data; The RGBW determination unit comprises: A grayscale mapping processing unit, used for performing grayscale mapping processing on the normalized RGB pixel data; A partition contrast enhancement processing unit, used to perform partition contrast enhancement processing on the RGB pixel data after the grayscale mapping processing; and An RGBW conversion unit, used for converting the RGB pixel data after the partition contrast enhancement process into RGBW pixel data; The subarea contrast enhancement processing unit is configured as follows: Convert the grayscale mapped RGB image to the YUV color space to obtain a YUV image including a YUV component, keep the UV component unchanged, divide the Y component image into multiple partitions of the same size, and count the number of sub-pixels of different grayscales in each partition s(i), where i = 0, 1, 2...255; and When s(i) is greater than a first threshold, the value of s(i) is set to the first threshold, When s(i) is less than a second threshold, setting the value of s(i) to the second threshold; and The subarea contrast enhancement processing unit is configured as follows: The number of sub-pixels with different grayscales in each partition s(i) is accumulated to obtain the number of sub-pixels with different grayscales in the current frame image p(i). Then, the grayscale distribution of the current frame image is used to map the next frame image using the following formula: y_out(i)=255×p(i) / p(255) i=0,1,2……255 Where i is the input grayscale value, y_out(i) is the grayscale value of the Y component after the partition contrast enhancement process, Then, the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component is converted back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing.
2. The image processing device according to claim 1, wherein: The grayscale mapping processing unit is configured as follows: The gain coefficient K_scaler is calculated, and the normalized RGB pixel data is subjected to grayscale mapping using the calculated gain coefficient K_scaler. The gain coefficient K_scaler is calculated using the following formula: K_scaler=128+scaler_in×S×V / 255 Among them, scaler_in is an externally configurable coefficient with a value range of 0 to 2, S is the saturation value, and V is the brightness value.
3. The image processing device according to claim 2, wherein: The grayscale mapping processing unit is configured as follows: The normalized RGB pixel data is grayscale mapped using the following formula: R1=K_scaler×R0 G1=K_scaler×G0 B1=K_scaler×B0 Among them, R0 is the grayscale value of the red sub-pixel after normalization, G0 is the grayscale value of the green sub-pixel after normalization, B0 is the grayscale value of the blue sub-pixel after normalization, R1 is the grayscale value of the red sub-pixel after grayscale mapping processing, G1 is the grayscale value of the green sub-pixel after grayscale mapping processing, and B1 is the grayscale value of the blue sub-pixel after grayscale mapping processing.
4. The image processing device according to claim 1, wherein: The RGBW conversion unit is configured as follows: The RGB pixel data after the partition contrast enhancement process is converted into RGBW pixel data using the following formula: W=min(R1′,G1′,B1′) R O =k×R1′-W G O =k×G1′-W B O =k×B1′-W IN O =w_scaler×W Among them, w_scaler is an externally configurable coefficient, and its value range is 0 to 2, among which R1′ is the grayscale value of the red sub-pixel after the partition contrast enhancement processing, G1′ is the grayscale value of the green sub-pixel after the partition contrast enhancement processing, and B1′ is the grayscale value of the blue sub-pixel after the partition contrast enhancement processing.
5. An image processing method, characterized in that: The method comprises: Calculate the brightness and saturation of the current frame based on the input RGB pixel data; Normalize the input RGB pixel data; Determine RGBW pixel data according to the normalized RGB pixel data and the brightness value and saturation value; Denormalizing the RGBW pixel data; and Arranging the RGBW pixel data after the denormalization process to determine the output RGBW pixel data; The step of determining RGBW pixel data according to the normalized RGB pixel data and the brightness value and saturation value comprises: Perform grayscale mapping on the normalized RGB pixel data; Performing a partition contrast enhancement process on the RGB pixel data after the grayscale mapping process; and Convert the RGB pixel data after the partition contrast enhancement process into RGBW pixel data; The step of performing a partition contrast enhancement process on the RGB pixel data after the grayscale mapping process comprises: Convert the grayscale mapped RGB image to the YUV color space to obtain a YUV image including a YUV component, keep the UV component unchanged, divide the Y component image into a plurality of partitions of the same size, and count the number of sub-pixels of different grayscales in each partition s(i), where i=0,1,2...255; and When s(i) is greater than a first threshold, the value of s(i) is set to the first threshold, When s(i) is less than a second threshold, setting the value of s(i) to the second threshold; The step of performing a partition contrast enhancement process on the RGB pixel data after the grayscale mapping process comprises: The number of sub-pixels with different grayscales in each partition s(i) is accumulated to obtain the number of sub-pixels with different grayscales in the current frame image p(i). Then, the grayscale distribution of the current frame image is used to map the next frame image using the following formula: y_out(i)=255×p(i) / p(255) i=0,1,2……255 Where i is the input grayscale value, y_out(i) is the grayscale value of the Y component after the partition contrast enhancement process, Then, the processed YUV pixel data formed by the Y component after the partition contrast enhancement processing and the original UV component is converted back to the RGB color space to obtain the RGB pixel data after the partition contrast enhancement processing.
6. The image processing method according to claim 5, characterized in that: The step of performing grayscale mapping on the normalized RGB pixel data comprises: The gain coefficient K_scaler is calculated, and the normalized RGB pixel data is subjected to grayscale mapping using the calculated gain coefficient K_scaler. The gain coefficient K_scaler is calculated using the following formula: K_scaler=128+scaler_in×S×V / 255 Among them, scaler_in is an externally configurable coefficient with a value range of 0 to 2, S is the saturation value, and V is the brightness value.
7. The image processing method according to claim 6, characterized in that: The step of performing grayscale mapping on the normalized RGB pixel data comprises: The normalized RGB pixel data is grayscale mapped using the following formula: R1=K_scaler×R0 G1=K_scaler×G0 B1=K_scaler×B0 Among them, R0 is the grayscale value of the red sub-pixel after normalization, G0 is the grayscale value of the green sub-pixel after normalization, B0 is the grayscale value of the blue sub-pixel after normalization, R1 is the grayscale value of the red sub-pixel after grayscale mapping processing, G1 is the grayscale value of the green sub-pixel after grayscale mapping processing, and B1 is the grayscale value of the blue sub-pixel after grayscale mapping processing.
8. The image processing method according to claim 5, characterized in that: The step of converting the RGB pixel data after the partition contrast enhancement process into RGBW pixel data comprises: The RGB pixel data after the partition contrast enhancement process is converted into RGBW pixel data using the following formula: W=min(R1′,G1′,B1′) R O =k×R1′-W G O =k×G1′-W B O =k×B1′-W IN O =w_scaler×W Among them, w_scaler is an externally configurable coefficient, and its value range is 0 to 2, among which R1′ is the grayscale value of the red sub-pixel after the partition contrast enhancement processing, G1′ is the grayscale value of the green sub-pixel after the partition contrast enhancement processing, and B1′ is the grayscale value of the blue sub-pixel after the partition contrast enhancement processing.
9. A display device, characterized in that: include: Memory; one or more processors; wherein the memory and the one or more processors are connected to each other; as well as The memory stores computer executable instructions for controlling the one or more processors to implement the image processing method according to any one of claims 5 to 8 when executed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image processing method according to any one of claims 5 to 8 is implemented.
