Image enhancement processing method and device

Through the color gamut conversion matrix coefficient processing, the color difference problem in image processing is solved. Especially when displaying at low color gamut terminals, the brightness and saturation of the image are improved and the display effect is significantly improved.

CN119068844APending Publication Date: 2024-12-03SANECHIPS TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310603790.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, there is a significant color difference problem in the image processing process, especially when the color display effect is lower than the true color of the original image when the low color gamut terminal is displayed.

Method used

By determining the color gamut conversion matrix coefficients of the input image and the terminal display screen, the image is converted in color gamut, and the brightness and saturation enhancement processing is performed in the YUV color space to obtain the output image.

Benefits of technology

It realizes efficient conversion between different color gamuts, better restores the real color of the image, and quickly enhances the brightness and saturation of the image, improving the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068844A_ABST
    Figure CN119068844A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image enhancement processing method and device. The method comprises the following steps: determining a color gamut conversion matrix coefficient according to the color gamut of an input image and the color gamut of a display screen of a terminal; performing color gamut conversion on the input image according to the color gamut conversion matrix coefficient to obtain a converted input image; and performing brightness and saturation enhancement processing on the converted input image to obtain an output image, thereby solving the problems that the image display has obvious chromatic aberration in the image processing process and the color display effect is lower than the real color of the original image when the image is displayed at a low-color-gamut terminal in the prior art, and improving the image quality through the color gamut conversion matrix coefficient. Conversion between different input image color gamuts and terminal color gamuts with different color gamut coverage rates is achieved, the real color of the image can be highly restored, and the brightness and saturation of the image can be rapidly enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing, and more specifically, to an image enhancement processing method and device. Background Art

[0002] In the current image processing field, the color gamut conversion relationship and conversion parameters are calculated based on the display color gamut and the target color gamut three primary color coordinate information, and the image display has obvious color difference problems; when displayed on a low color gamut (80% and below SRGB color gamut coverage) terminal, the color display effect is lower than the true color of the original image.

[0003] There has been no solution to the problem that the image display has obvious color difference during the image processing process in the related art, and the color display effect is lower than the real color of the original image when displayed on a low color gamut terminal. Summary of the invention

[0004] The embodiments of the present application provide an image enhancement processing method and device to at least solve the problem in the related art that the image display has obvious color difference during the image processing process, and the color display effect is lower than the real color of the original image when displayed on a low color gamut terminal.

[0005] According to an embodiment of the present application, an image enhancement processing method is provided, the method comprising:

[0006] Determine the color gamut conversion matrix coefficients according to the color gamut of the input image and the color gamut of the terminal display screen;

[0007] Performing color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image;

[0008] The converted input image is subjected to brightness and saturation enhancement processing to obtain an output image.

[0009] According to another embodiment of the present application, an image enhancement processing device is also provided, the device comprising:

[0010] A determination module, used to determine the color gamut conversion matrix coefficients according to the color gamut of the input image and the color gamut of the display screen of the terminal;

[0011] A color gamut conversion module, used for performing color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image;

[0012] The enhancement processing module is used to enhance the brightness and saturation of the converted input image to obtain an output image.

[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0014] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0015] In the embodiment of the present application, color gamut conversion matrix coefficients are determined according to the color gamut of an input image and the color gamut of a display screen of a terminal; color gamut conversion is performed on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image; brightness and saturation enhancement processing is performed on the converted input image to obtain an output image. This can solve the problem in the related art that the image display has obvious color difference during image processing, and when displayed on a low color gamut terminal, the color display effect is lower than the true color of the original image. The color gamut conversion matrix coefficients can be used to realize conversion between different input image color gamuts and terminal color gamuts with different color gamut coverage rates, which can restore the true color of the image to a higher degree and can quickly enhance the brightness and saturation of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a hardware structure block diagram of a computer device for the image enhancement processing method according to an embodiment of the present application;

[0017] Figure 2 is a flowchart of an image enhancement processing method according to an embodiment of the present application;

[0018] Figure 3 is a flowchart of an image enhancement processing method according to an optional embodiment of the present application;

[0019] Figure 4 is a flow chart of a method for color enhancement display of a terminal across color gamut according to an embodiment of the present application;

[0020] Figure 5 is a block diagram of an image enhancement processing device according to an embodiment of the present application;

[0021] Figure 6 It is a block diagram of an image enhancement processing device according to an optional embodiment of the present application. DETAILED DESCRIPTION

[0022] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0024] The method embodiments provided in the embodiments of the present application can be executed in a computer device or a similar computing device. Taking running on a computer device as an example, Figure 1 is a hardware structure block diagram of a computer device for the image enhancement processing method of an embodiment of the present application, such as Figure 1 As shown, the computer device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device) and a memory 104 for storing data, wherein the above-mentioned computer device may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the image enhancement processing method in the embodiment of the present application. The processor 102 executes various functional applications and single board matching by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0026] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0027] In this embodiment, an image enhancement processing method running on the above-mentioned computer device is provided. Figure 2 is a flowchart of an image enhancement processing method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0028] Step S202, determining color gamut conversion matrix coefficients according to the color gamut of the input image and the color gamut of the display screen of the terminal;

[0029] In this embodiment, the above step S202 may specifically include:

[0030] S2021, respectively detecting the three primary colors and white point coordinate information of the color gamut of the input image, and the three primary colors and white point coordinate information of the color gamut of the display screen of the terminal;

[0031] S2022, determining a conversion matrix for converting the color gamut of the input image into an XYZ color space according to the three primary colors of the color gamut of the input image and the white point coordinate information, and determining a conversion matrix for converting the color gamut of the display screen of the terminal into the XYZ color space according to the three primary colors of the color gamut of the display screen of the terminal and the white point coordinate information;

[0032] S2023: Determine the color gamut conversion matrix coefficient as the product of the conversion matrix of the color gamut of the input image to the XYZ color space and the inverse matrix of the conversion matrix of the display screen of the terminal to the XYZ color space.

[0033] Furthermore, the above step S2022 may specifically include:

[0034] The conversion matrix from the color gamut of the input image to the XYZ color space is determined by the following formula:

[0035]

[0036]

[0037] The conversion matrix from the terminal's display color gamut to the XYZ color space is determined by the following formula:

[0038]

[0039]

[0040] Among them, M 1 M is the conversion matrix from the color gamut of the input image to the XYZ color space. 2 is the conversion matrix from the terminal display color gamut to the XYZ color space. The three primary colors and white point coordinate information of the color gamut of the input image are represented by R 1 (r x1 ,r y1 ,r z1), G 1 (g x1 ,g y1 ,g z1 ), B 1 (b x1 ,b y1 ,b z1 )、W 1 (w x1 ,w y1 ,w z1 ), the three primary colors and white point coordinate information of the terminal display screen color gamut are represented as R 2 (r x2 ,r y2 ,r z2 ), G 2 (g x2 ,g y2 ,g z2 ), B 2 (b x2 ,b y2 ,b z2 )、W 2 (w x2 ,w y2 ,w z2 ).

[0041] Step S204, performing color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image;

[0042] Step S206, performing brightness and saturation enhancement processing on the converted input image to obtain an output image.

[0043] In this embodiment, the above step S206 may specifically include:

[0044] S2061, converting the processed normalized nonlinear RGB electrical signal into a YUV domain to obtain a Y channel value, a U channel value, and a V channel value of the input image;

[0045] S2062, performing brightness and saturation enhancement processing on the Y channel value, U channel value, and V channel value of the input image according to the pre-configured brightness enhancement coefficient and the set saturation enhancement coefficient to obtain enhanced Y channel value, U channel value, and V channel value;

[0046] Furthermore, the above S2062 may specifically include: determining the enhanced Y channel value by multiplying the above brightness enhancement coefficient and the Y channel value of the input image; determining the enhanced U channel value by multiplying the saturation enhancement coefficient and the U channel value of the input image; and determining the enhanced V channel value by multiplying the saturation enhancement coefficient and the V channel value of the input image.

[0047] S2063, converting the enhanced Y channel value, U channel value, and V channel value into the RGB domain to obtain an output image.

[0048] Through the above steps S202 to S206, the problem that the image display has obvious color difference during the image processing process in the related technology, and the color display effect is lower than the real color of the original image when displayed on a low color gamut terminal can be solved. The conversion between different input image color gamuts and terminal color gamuts with different color gamut coverage rates can be realized through the color gamut conversion matrix coefficient, which can restore the real color of the image to a higher degree and can quickly enhance the brightness and saturation of the image.

[0049] Figure 3 is a flowchart of an image enhancement processing method according to an optional embodiment of the present application. Figure 3 As shown, the above step S204 may specifically include:

[0050] Step S302, performing electro-optical conversion on the input image to obtain a linear RGB display light signal of the input image;

[0051] In an optional embodiment, the above step S302 may specifically include:

[0052] S3021, normalizing the nonlinear RGB electrical signal of the input image according to the digital RGB value of the input image to obtain a normalized nonlinear RGB electrical signal. Specifically, a maximum pixel value is determined according to the bit width of the input image, and a ratio of the digital RGB value of the input image to the maximum pixel value is determined as the normalized nonlinear RGB electrical signal.

[0053] S3022, performing electro-optical conversion on the normalized nonlinear RGB electrical signal to obtain a linear RGB display light signal. Specifically, when the input image is a standard dynamic range (Stander Dynamic Range, referred to as SDR) image, performing electro-optical conversion on the normalized nonlinear RGB electrical signal to obtain a linear RGB display light signal by the following formula:

[0054] When the input image is a high dynamic range (HDR) image, the normalized nonlinear RGB electrical signal is electro-optically converted to obtain a linear RGB display light signal using the following formula:

[0055] Among them, E 1 ' represents the normalized nonlinear RGB electrical signal, O 1 , Y 1 represents the linear RGB display light signal, γ is a preset constant, m 1 =0.1593017578125, m 2=78.84375, c 1 =0.8359375, c 2 =18.8515625, c 3 =18.6875.

[0056] Step S304, performing color gamut conversion on the linear RGB display light signal according to the color gamut conversion matrix coefficient to obtain a converted linear RGB display light signal;

[0057] Furthermore, the linear RGB display light signal is converted into a color gamut by the following formula to obtain a converted linear display light signal:

[0058]

[0059] Among them, R in , G in , B in is a linear RGB display light signal, R out , G out , B out is the converted linear RGB display light signal, M 1 M is the conversion matrix from the color space of the RGB image to the XYZ color space. 2 is a conversion matrix for converting the terminal's display screen color gamut to an XYZ color space, and the color gamut conversion matrix coefficient is the product of the conversion matrix for converting the input image's color gamut to an XYZ color space and the inverse matrix of the conversion matrix for converting the terminal's display screen color gamut to an XYZ color space.

[0060] Step S306, performing photoelectric conversion on the converted linear RGB display light signal to obtain a processed normalized nonlinear RGB electrical signal, wherein the converted input image is the processed normalized nonlinear RGB electrical signal.

[0061] Furthermore, when the converted linear RGB display light signal is SDR, the converted linear RGB display light signal is photoelectrically converted by the following formula to obtain a processed normalized nonlinear RGB electrical signal: E' 2 =O 2 Υ ;

[0062] When the converted linear RGB display light signal is HDR, the converted linear RGB display light signal is photoelectrically converted by the following formula to obtain a processed normalized nonlinear RGB electrical signal:

[0063] Among them, E' 2 represents the processed normalized nonlinear RGB electrical signal, O 2 , Y 2represents the converted linear RGB display light signal, γ is a preset constant, m 1 =0.1593017578125, m 2 =78.84375, c 1 =0.8359375, c 2 =18.8515625, c 3 =18.6875.

[0064] In the following, the input image is specifically an input RGB image, the corresponding output image is an output GRB image, the electro-optical conversion is specifically an electro-optical conversion function (EOTF), and the photoelectric conversion is specifically an optoelectronic conversion function (OEFT). As an example, this embodiment is described in detail.

[0065] The present embodiment relates to display quality enhancement in the field of image processing, and its purpose is to convert the input image color gamut into the display screen color gamut (including high color gamut input to low color gamut output, and low color gamut input to high color gamut output), so as to better restore the true color of the image; in the low color gamut terminal display, due to device hardware factors, the image saturation and brightness are usually low. This invention enhances the brightness and saturation of the image in the YUV color space through an adjustable matrix method to improve the human sensory quality. Figure 4 is a flow chart of a method for color enhancement display of a terminal across color gamut according to an embodiment of the present application, such as Figure 4 As shown, including:

[0066] Step S401, obtaining an input RGB image;

[0067] Step S402, performing EOTF electro-optical conversion on the input RGB image;

[0068] The nonlinear electrical signal is converted into a linear display optical signal by:

[0069] When the input signal is SDR (Stander Dynamic Range), O 1 =E 1 ' Υ ;

[0070] When the input signal is HDR (High Dynamic Range),

[0071] Where E 1′ represents the normalized nonlinear RGB electrical signal. The normalization method is to divide the digital RGB value by the maximum value of the pixel. For example, the digital signal value of an 8-bit image is 100, which is 100 / 255 after normalization. γ can be selected as 2.2 or 2.4. 1 represents a linear RGB display light signal; M2=78.84375, c1=0.8359375, c2=18.8515625, c3=18.6875, M1=0.1593017578125, Y represents a linear RGB display light signal.

[0072] In addition to the above methods, quantization can also be performed to form a corresponding LUT for table lookup. The LUT table calculation process is as follows: Since SDR data is usually 8 bits wide, the digital signal is normalized (such as 100 / 255) and substituted into the formula The normalized display light signal is obtained, and then quantized into a digital signal (such as int (0.5*255)), that is, the corresponding LUT table is obtained;

[0073] Since HDR data is usually 10 bits wide, the digital signal is normalized (such as 100 / 1023) and substituted into the above formula The normalized display light signal is obtained, and then quantized into a digital signal (such as int (0.5*1023)), and the corresponding LUT table is obtained.

[0074] Step S403, calculating the color gamut conversion matrix coefficients and performing color gamut conversion according to the color gamut conversion matrix coefficients;

[0075] Use software or other methods to detect the input image color gamut and the three primary colors and white point coordinate information of the terminal display color gamut. The input image color gamut information is represented by R in (r x1 ,r y1 ,r z1 ), G in (g x1 ,g y1 ,g z1 ), B in (b x1 ,b y1 ,b z1 )、W in (w x1 ,w y1 ,w z1 ), the terminal display color gamut information is represented by R out (r x2 ,r y2 ,r z2 ), G out (g x2 ,g y2 ,g z2 ), Bout (b x2 ,b y2 ,b z2 )、W out (w x2 ,w y2 ,w z2 ), using XYZ color space as the intermediate space, the calculation method of converting the input image color space to XYZ is as follows:

[0076]

[0077] Solve the three-variable linear equation according to the above formula to get the x, y, and z values. The matrix on the right side of the equal sign is the input image color gamut to XYZ color space matrix M 1 The calculation method of converting the terminal display color gamut to XYZ is as follows:

[0078]

[0079] Solve the three-variable linear equation according to the above formula to get the x, y, and z values. The matrix on the right side of the equal sign is the terminal display screen color gamut to XYZ color space matrix M 2 .

[0080]

[0081] In the formula, R in , G in , B in is the linear display light signal corresponding to the calculated input color gamut, R out , G out , B out is the linear display light signal corresponding to the converted display color gamut, M 1 M is the conversion matrix from the color space of the RGB image to the XYZ color space. 2 The conversion matrix for converting the terminal's display color gamut to the XYZ color space.

[0082] Step S404, performing OEFT photoelectric conversion;

[0083] The linear display optical signal is converted into a nonlinear electrical signal by the following formula:

[0084] When the output signal is SDR, E 2 ′=O 2 Υ ;

[0085] When the output signal is HDR,

[0086] Among them, E 2 ′ represents the normalized nonlinear RGB electrical signal; γ can be selected as 1 / 2.2 or 1 / 2.4; O2 Represents linear RGB display light signal; m 1 =0.1593017578125, m 2 =78.84375, c 1 =0.8359375, c 2 =18.8515625, c 3 =18.6875, Y represents the linear RGB display light signal. It can also be quantized to form a corresponding LUT for table lookup.

[0087] Step S405, performing image enhancement based on matrix enhanced brightness and saturation to obtain an output RGB image.

[0088] First, convert from RGB domain to YUV domain in the following way:

[0089] y=(54*r+183*g+18*b+128)>>8

[0090] u=((-29*r-99*g+128*b+128)>>8)+128

[0091] v=((128*r-116*g-12*b+128)>>8)+128;

[0092] Where r, g, b are the digital signal values ​​of r, g, b, which are calculated by multiplying the normalized RGB value by the maximum value of the pixel. For example, if the normalized signal value of an 8-bit image is 0.1, the corresponding digital signal value is int(0.1*255). y, u, v represent the y, u, v channel values ​​of the converted pixel.

[0093] Afterwards, the following formula is used to enhance the brightness and saturation of the y, u, and v channel values ​​of the converted pixels in the YUV domain based on the pre-configured brightness enhancement coefficient and the set saturation enhancement coefficient:

[0094]

[0095] In the formula, l_en represents the brightness enhancement coefficient, which is a floating point value between [1,2]; s_en represents the saturation enhancement coefficient, which is a floating point value between [1,2]. The matrix parameters can be manually adjusted by the user according to his / her preferences. The output Y value is the input Y value multiplied by the l_en coefficient, the output U value is the input U value multiplied by the s_en coefficient, and the output V value is the input V value multiplied by the s_en coefficient.

[0096] Finally, the output image is obtained by converting from the YUV domain back to the RGB domain using the following formula:

[0097] r=(256*y+403*(v-128)+128)>>8

[0098] g=(256*y-48*(u-128)-416*(v-128)+128)>>8

[0099] b=(256*y+475*(u-128)+128)>>8;

[0100] Where y, u, v are the enhanced y, u, v digital signal values, and r, g, b represent the r, g, b three-channel values ​​of the converted pixel.

[0101] According to another aspect of the embodiment of the present application, an image enhancement processing device is also provided. Figure 5 is a block diagram of an image enhancement processing device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0102] A determination module 52, configured to determine a color gamut conversion matrix coefficient according to a color gamut of an input image and a color gamut of a display screen of a terminal;

[0103] A color gamut conversion module 54, configured to perform color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image;

[0104] The enhancement processing module 56 is used to perform brightness and saturation enhancement processing on the converted input image to obtain an output image.

[0105] Figure 6 is a block diagram of an image enhancement processing device according to an optional embodiment of the present application, such as Figure 6 As shown, the color gamut conversion module 54 includes:

[0106] The electro-optical conversion submodule 62 is used to perform electro-optical conversion on the input image to obtain a linear RGB display light signal of the input image;

[0107] A color gamut conversion submodule 64 is used to perform color gamut conversion on the linear RGB display light signal according to the color gamut conversion matrix coefficients to obtain a converted linear RGB display light signal;

[0108] The photoelectric conversion submodule 66 is used to perform photoelectric conversion on the converted linear RGB display light signal to obtain a processed normalized nonlinear RGB electrical signal, wherein the converted input image is the processed normalized nonlinear RGB electrical signal.

[0109] In one embodiment, the electro-optical conversion submodule 62 includes:

[0110] A normalization unit, configured to perform normalization processing on the nonlinear RGB electrical signal of the input image according to the digital RGB value of the input image to obtain a normalized nonlinear RGB electrical signal;

[0111] The electro-optical conversion unit is used to perform electro-optical conversion on the normalized nonlinear RGB electrical signal to obtain the linear RGB display light signal.

[0112] In one embodiment, the normalization unit is further used to determine a pixel maximum value according to a bit width of the input image; and determine a ratio of a digital RGB value of the input image to the pixel maximum value as the normalized nonlinear RGB electrical signal.

[0113] In one embodiment, the electro-optical conversion unit is further used to perform electro-optical conversion on the normalized nonlinear RGB electrical signal to obtain the linear RGB display light signal according to the following formula when the input image is a standard dynamic range SDR image:

[0114]

[0115] When the input image is a high dynamic range HDR image, the normalized nonlinear RGB electrical signal is electro-optically converted using the following formula to obtain the linear RGB display light signal:

[0116] Among them, E 1 ' represents the normalized nonlinear RGB electrical signal, 1 , Y 1 represents the linear RGB display light signal, γ is a preset constant, m 1 =0.1593017578125, m 2 =78.84375, c 1 =0.8359375, c 2 =18.8515625, c 3 =18.6875.

[0117] In one embodiment, the color gamut conversion submodule 64 is further configured to:

[0118] The linear RGB display light signal is converted into a color gamut by the following formula to obtain the converted linear display light signal:

[0119]

[0120] Among them, R in , G in , B in For the linear RGB display light signal, R out , G out, B out is the converted linear RGB display light signal, M 1 is the conversion matrix of the color space of the RGB image to the XYZ color space, M 2 is a conversion matrix for converting the display screen color gamut of the terminal to an XYZ color space, wherein the color gamut conversion matrix coefficient is the product of the conversion matrix for converting the color gamut of the input image to an XYZ color space and the inverse matrix of the conversion matrix for converting the display screen color gamut of the terminal to an XYZ color space.

[0121] In one embodiment, the photoelectric conversion submodule 66 is further used to perform photoelectric conversion on the converted linear RGB display light signal according to the following formula to obtain the processed normalized nonlinear RGB electrical signal when the converted linear RGB display light signal is SDR: E' 2 =O 2 Υ ;

[0122] When the converted linear RGB display light signal is HDR, the converted linear RGB display light signal is photoelectrically converted by the following formula to obtain the processed normalized nonlinear RGB electrical signal:

[0123] Among them, E' 2 represents the normalized nonlinear RGB electrical signal after the processing, 2 , Y 2 represents the converted linear RGB display light signal, γ is a preset constant, m 1 =0.1593017578125, m 2 =78.84375, c 1 =0.8359375, c 2 =18.8515625, c 3 =18.6875.

[0124] In one embodiment, the enhancement processing module 56 includes:

[0125] A first conversion submodule, used for converting the processed normalized nonlinear RGB electrical signal into a YUV domain to obtain a Y channel value, a U channel value, and a V channel value of the input image;

[0126] The enhancement processing submodule is used to perform enhancement processing of brightness and saturation enhancement on the Y channel value, U channel value, and V channel value of the input image according to a pre-configured brightness enhancement coefficient and a pre-set saturation enhancement coefficient to obtain enhanced Y channel value, U channel value, and V channel value;

[0127] The second conversion submodule is used to convert the enhanced Y channel value, U channel value, and V channel value into the RGB domain to obtain the output image.

[0128] In one embodiment, the enhancement processing submodule is further used to determine the enhanced Y channel value by multiplying the brightness enhancement coefficient and the Y channel value of the input image; determine the enhanced U channel value by multiplying the saturation enhancement coefficient and the U channel value of the input image; and determine the enhanced V channel value by multiplying the saturation enhancement coefficient and the V channel value of the input image.

[0129] In one embodiment, the determination module 52 includes:

[0130] A detection submodule, used to respectively detect the three primary colors and white point coordinate information of the color gamut of the input image, and the three primary colors and white point coordinate information of the color gamut of the display screen of the terminal;

[0131] A first determination submodule is used to determine a conversion matrix of the color gamut of the input image to an XYZ color space according to the three primary colors of the color gamut of the input image and the white point coordinate information, and to determine a conversion matrix of the display screen color gamut of the terminal to an XYZ color space according to the three primary colors of the color gamut of the display screen of the terminal and the white point coordinate information;

[0132] The second determination submodule is used to determine that the product of the conversion matrix of the color gamut of the input image to the XYZ color space and the inverse matrix of the conversion matrix of the display screen of the terminal to the XYZ color space is the color gamut conversion matrix coefficient.

[0133] In one embodiment, the first determining submodule is further configured to:

[0134] The conversion matrix of the color gamut of the input image to the XYZ color space is determined by the following formula:

[0135]

[0136]

[0137] The conversion matrix of the terminal display screen color gamut to XYZ color space is determined by the following formula:

[0138]

[0139]

[0140] Among them, M 1 is the conversion matrix of the color gamut of the input image to the XYZ color space, M 2is the conversion matrix of the display screen color gamut of the terminal to the XYZ color space, and the three primary colors and white point coordinate information of the color gamut of the input image are represented by R 1 (r x1 ,r y1 ,r z1 ), G 1 (g x1 ,g y1 ,g z1 ), B 1 (b x1 ,b y1 ,b z1 )、W 1 (w x1 ,w y1 ,w z1 ), the three primary colors and white point coordinate information of the display screen color gamut of the terminal are represented as R 2 (r x2 ,r y2 ,r z2 ), G 2 (g x2 ,g y2 ,g z2 ), B 2 (b x2 ,b y2 ,b z2 )、W 2 (w x2 ,w y2 ,w z2 ).

[0141] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0142] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0143] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0144] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0145] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0146] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0147] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. An image enhancement processing method, characterized in that: The method comprises: Determine the color gamut conversion matrix coefficients according to the color gamut of the input image and the color gamut of the terminal display screen; Performing color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image; The converted input image is subjected to brightness and saturation enhancement processing to obtain an output image.

2. The method according to claim 1, characterized in that: Performing color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain the converted input image comprises: Performing electro-optical conversion on the input image to obtain a linear RGB display light signal of the input image; Performing color gamut conversion on the linear RGB display light signal according to the color gamut conversion matrix coefficients to obtain a converted linear RGB display light signal; The converted linear RGB display light signal is subjected to photoelectric conversion to obtain a processed normalized nonlinear RGB electrical signal, wherein the converted input image is the processed normalized nonlinear RGB electrical signal.

3. The method according to claim 2, characterized in that Performing electro-optical conversion on the input image to obtain a linear RGB display light signal of the input image includes: Normalizing the nonlinear RGB electrical signal of the input image according to the digital RGB value of the input image to obtain a normalized nonlinear RGB electrical signal; The normalized nonlinear RGB electrical signal is subjected to electrical-optical conversion to obtain the linear RGB display light signal.

4. The method according to claim 3, characterized in that Normalizing the nonlinear RGB electrical signal of the input image according to the digital RGB value of the input image to obtain the normalized nonlinear RGB electrical signal includes: Determine a pixel maximum value according to the bit width of the input image; The ratio of the digital RGB value of the input image to the maximum value of the pixel is determined as the normalized nonlinear RGB electrical signal.

5. The method according to claim 3, characterized in that: Performing electro-optical conversion on the normalized nonlinear RGB electrical signal to obtain the linear RGB display light signal comprises: When the input image is a standard dynamic range SDR image, the normalized nonlinear RGB electrical signal is electro-optically converted by the following formula to obtain the linear RGB display optical signal: O1=E1' Υ ; When the input image is a high dynamic range HDR image, the normalized nonlinear RGB electrical signal is electro-optically converted using the following formula to obtain the linear RGB display light signal: Wherein, E1' represents the normalized nonlinear RGB electrical signal, O1 and Y1 represent the linear RGB display light signal, γ is a preset constant, m1=0.1593017578125, m2=78.84375, c1=0.8359375, c2=18.8515625, c3=18.6875.

6. The method according to claim 2, characterized in that Performing color gamut conversion on the linear RGB display light signal according to the color gamut conversion matrix coefficients to obtain the converted linear RGB display light signal comprises: The linear RGB display light signal is converted into a color gamut by the following formula to obtain the converted linear display light signal: Among them, R in , G in , B in For the linear RGB display light signal, R out , G out , B out is the converted linear RGB display light signal, M1 is the conversion matrix of the color gamut of the RGB image to the XYZ color space, M2 is the conversion matrix of the display screen color gamut of the terminal to the XYZ color space, and the color gamut conversion matrix coefficient is the product of the conversion matrix of the color gamut of the input image to the XYZ color space and the inverse matrix of the conversion matrix of the display screen color gamut of the terminal to the XYZ color space.

7. The method according to claim 2, characterized in that Performing photoelectric conversion on the converted linear RGB display light signal to obtain the processed normalized nonlinear RGB electrical signal comprises: When the converted linear RGB display light signal is SDR, the converted linear RGB display light signal is photoelectrically converted by the following formula to obtain the processed normalized nonlinear RGB electrical signal: E'2=O2 Υ ; When the converted linear RGB display light signal is HDR, the converted linear RGB display light signal is photoelectrically converted by the following formula to obtain the processed normalized nonlinear RGB electrical signal: Wherein, E'2 represents the processed normalized nonlinear RGB electrical signal, O2 and Y2 represent the converted linear RGB display light signals, γ is a preset constant, m1=0.1593017578125, m2=78.84375, c1=0.8359375, c2=18.8515625, c3=18.6875.

8. The method according to claim 2, characterized in that: The converted input image is subjected to brightness and saturation enhancement processing to obtain an output image including: Converting the processed normalized nonlinear RGB electrical signal into a YUV domain to obtain a Y channel value, a U channel value, and a V channel value of the input image; Performing brightness and saturation enhancement processing on the Y channel value, U channel value, and V channel value of the input image according to a pre-configured brightness enhancement coefficient and a pre-set saturation enhancement coefficient to obtain enhanced Y channel value, U channel value, and V channel value; The enhanced Y channel value, U channel value, and V channel value are converted to the RGB domain to obtain the output image.

9. The method according to claim 8, characterized in that According to the pre-configured brightness enhancement coefficient and the set saturation enhancement coefficient, the Y channel value, the U channel value, and the V channel value of the input image are enhanced by brightness and saturation enhancement processing, and the enhanced Y channel value, the U channel value, and the V channel value are obtained, including: Determine the product of the brightness enhancement coefficient and the Y channel value of the input image as the enhanced Y channel value; Determine an enhanced U channel value by multiplying the saturation enhancement coefficient by the U channel value of the input image; The enhanced V channel value is determined by multiplying the saturation enhancement coefficient by the V channel value of the input image.

10. The method according to any one of claims 1 to 9, characterized in that Determining the color gamut conversion matrix coefficients according to the color gamut of the input image and the color gamut of the display screen of the terminal includes: Respectively detecting the three primary colors and white point coordinate information of the color gamut of the input image, and the three primary colors and white point coordinate information of the color gamut of the display screen of the terminal; Determine a conversion matrix from the color gamut of the input image to an XYZ color space according to the three primary colors of the color gamut of the input image and the white point coordinate information, and determine a conversion matrix from the color gamut of the display screen of the terminal to an XYZ color space according to the three primary colors of the color gamut of the display screen of the terminal and the white point coordinate information; The product of the conversion matrix of the color gamut of the input image to the XYZ color space and the inverse matrix of the conversion matrix of the display screen of the terminal to the XYZ color space is determined as the color gamut conversion matrix coefficient.

11. The method according to claim 10, characterized in that Determining a conversion matrix of the color gamut of the input image to an XYZ color space according to the three primary colors of the color gamut of the input image and the white point coordinate information, and determining a conversion matrix of the display screen color gamut of the terminal to an XYZ color space according to the three primary colors of the color gamut of the display screen of the terminal and the white point coordinate information includes: The conversion matrix of the color gamut of the input image to the XYZ color space is determined by the following formula: The conversion matrix of the terminal display screen color gamut to XYZ color space is determined by the following formula: Wherein, M1 is the conversion matrix of the color gamut of the input image to the XYZ color space, M2 is the conversion matrix of the color gamut of the display screen of the terminal to the XYZ color space, and the three primary colors and white point coordinate information of the color gamut of the input image are expressed as R1(r x1 ,r y1 ,r z1 )、G1(g x1 ,g y1 ,g z1 )、B1(b x1 ,b y1 ,b z1 )、W1(w x1 ,w y1 ,w z1 ), the three primary colors and white point coordinate information of the display screen color gamut of the terminal are expressed as R2(r x2 ,r y2 ,r z2 )、G2(g x2 ,g y2 ,g z2 )、B2(b x2 ,b y2 ,b z2 )、W2(w x2 ,w y2 ,w z2 ).

12. An image enhancement processing device, characterized in that: The device comprises: A determination module, used to determine the color gamut conversion matrix coefficients according to the color gamut of the input image and the color gamut of the display screen of the terminal; A color gamut conversion module, used for performing color gamut conversion on the input image according to the color gamut conversion matrix coefficients to obtain a converted input image; The enhancement processing module is used to enhance the brightness and saturation of the converted input image to obtain an output image.

13. A computer-readable storage medium, wherein a computer program is stored in the storage medium, wherein: The computer program is configured to execute the method according to any one of claims 1 to 11 when executed.

14. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Image display method, and mobile terminal

    CN108184037A

  • Video signal processing method and device

    CN108882028A

  • Color gamut mapping method and system

    CN112449168A

  • Color gamut mapping method and device, projection equipment and storage medium

    CN115174881A