Image processing method and device, equipment, chip, storage medium, program product
By using the color mapping relationship determined by the target imaging technology in image processing, finding and applying mapping parameters for color enhancement, the problems of floating-point operation complexity and image accuracy loss in the prior art are solved, and more efficient image processing is achieved.
Patent Information
- Application Number
- CN202410382204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-03-29
AI Technical Summary
The prior art requires complex floating point operations when processing high dynamic range images, resulting in huge calculation amounts and loss of image accuracy.
Through the color mapping relationship determined based on the target imaging technology, the mapping parameters of the image signal to be processed are found, and color enhancement is performed based on these parameters to reduce floating-point calculations.
This reduces the computational complexity of image processing, improves processing efficiency, and reduces the loss of computing volume and image accuracy of hardware devices.
Smart Images

Figure CN118118797B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and is related to but not limited to image processing methods and devices, equipment, chips, storage media, and program products. Background Art
[0002] High Dynamic Range (HDR) technology, as an improvement over static HDR technology, is superior to static HDR technology in image and video display, and can ensure that the highlights and shadows of each frame of the image will not be too bright or too dark.
[0003] The dynamic HDR image processing method in the related art needs to normalize the image signal (R, G, B) to the interval [0, 1], and then perform electro-optical conversion, curve mapping and color space conversion to obtain the final output image signal.
[0004] However, normalization will cause subsequent processing to be complex floating-point operations, resulting in huge computational complexity and loss of image accuracy. Summary of the invention
[0005] In view of this, the image processing method, device, equipment, chip, storage medium, and program product provided by the present application can reduce complex floating-point calculations, improve image processing efficiency, and reduce the loss of image accuracy.
[0006] According to one aspect of an embodiment of the present application, an image processing method is provided, including: determining mapping parameters of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology; and color enhancing the first image signal according to the mapping parameters to obtain a second image signal.
[0007] In some embodiments, the image processing method further includes: using a floating point computing unit to determine the color mapping relationship based on a target imaging technology.
[0008] In some embodiments, determining the color mapping relationship based on the target imaging technology includes: determining a brightness mapping function and a chromaticity mapping function based on the target imaging technology that can restore the true color; using the brightness mapping function to perform brightness mapping on a third image signal with different bit depths to obtain a brightness mapping relationship; using the chromaticity mapping function to perform chromaticity mapping on the third image signal to obtain a chromaticity mapping relationship; and determining the color mapping relationship based on the brightness mapping relationship and the chromaticity mapping relationship.
[0009] In some embodiments, the determination of the brightness mapping function and the chromaticity mapping function based on the target imaging technology capable of restoring true colors includes: determining an image enhancement function and a signal conversion function corresponding to the target imaging technology; the signal conversion function characterizes the conversion relationship between nonlinearity and linearity of the image signal, and the image enhancement function is used to enhance the color in the image signal; based on the image enhancement function and the signal conversion function, determining the brightness mapping function; and determining the chromaticity mapping function based on the brightness mapping function.
[0010] In some embodiments, determining the brightness mapping function based on the image enhancement function and the signal conversion function includes: determining first dynamic metadata; the first dynamic metadata characterizes the degree of color enhancement of the image signal; and constructing a brightness mapping function based on the image enhancement function, the signal conversion function and the first dynamic metadata.
[0011] In some embodiments, determining the chromaticity mapping function based on the brightness mapping function includes: determining a color saturation weight and second dynamic metadata; the second dynamic metadata characterizes a color presentation effect and / or display brightness; and constructing the chromaticity mapping function based on the color saturation weight, the second dynamic metadata, the signal conversion function and the brightness mapping function.
[0012] In some embodiments, the brightness mapping function is used to perform brightness mapping on a third image signal with different bit depths to obtain a brightness mapping relationship, including: using a signal conversion function corresponding to the target imaging technology to linearly convert the third image signal to obtain a converted third image signal; the signal conversion function represents the conversion relationship between nonlinearity and linearity of the image signal; using an image enhancement function corresponding to the target imaging technology and integrated with first dynamic metadata to brightness map the converted third image signal to obtain a brightness mapping relationship for each bit depth; the first dynamic metadata represents the degree of color enhancement of the image signal, and the image enhancement function is used to enhance the color in the image signal; based on the brightness mapping relationship for each bit depth, the brightness mapping relationship is determined.
[0013] In some embodiments, the chromaticity mapping function is used to perform chromaticity mapping on the third image signal to obtain a chromaticity mapping relationship, including: performing computational processing on the second dynamic metadata, the converted third image signal, and the brightness mapping relationship of each bit depth to obtain the calculated third image signal; the second dynamic metadata represents the color presentation effect and / or display brightness; and the color saturation weight is used to perform computational processing on the calculated third image signal to obtain the chromaticity mapping relationship.
[0014] In some embodiments, determining the mapping parameters of the first image signal to be processed based on the color mapping relationship includes: searching for the brightness parameters of the first image signal from the brightness mapping relationship in the color mapping relationship; and searching for the chromaticity parameters of the first image signal from the chromaticity mapping relationship in the color mapping relationship.
[0015] In some embodiments, searching for the brightness parameter of the first image signal from the brightness mapping relationship in the color mapping relationship includes: determining the color maximum value of the first image signal in a first color space; and searching for the brightness parameter from the brightness mapping relationship based on the color maximum value.
[0016] In some embodiments, searching for the chromaticity parameters of the first image signal from the chromaticity mapping relationship in the color mapping relationship includes: converting the color space of the first image signal in the first color space according to the brightness parameter to obtain a fourth image signal in the second color space; and searching for the chromaticity parameters from the chromaticity mapping relationship according to the chromaticity signal of the fourth image signal.
[0017] In some embodiments, color enhancement of the first image signal according to the mapping parameters to obtain a second image signal includes: determining a fourth image signal in a second color space corresponding to the first image signal; the fourth image signal is obtained by converting the first image signal in a first color space according to a brightness parameter in the mapping parameters; and inversely converting the chroma signal in the fourth image signal in a color space according to the chroma parameters to obtain the second image signal.
[0018] In some embodiments, converting the first image signal in the first color space according to the brightness parameter to obtain a fourth image signal in the second color space includes: linearly converting the first image signal according to the brightness parameter to obtain a first linear signal corresponding to the first image signal; and converting the first linear signal in a color space to obtain the fourth image signal.
[0019] In some embodiments, the linear conversion of the first image signal according to the brightness parameter to obtain a first linear signal corresponding to the first image signal includes: linearly converting the first image signal using a signal conversion function corresponding to the target imaging technology to obtain a second linear signal; and brightness mapping the second linear signal according to the gradient of the brightness parameter to obtain the first linear signal.
[0020] In some embodiments, converting the first linear signal in color space to obtain the fourth image signal includes: converting the first linear signal in color space using a conversion matrix to obtain the fourth image signal.
[0021] In some embodiments, performing an inverse conversion of the color space of the chromaticity signal in the fourth image signal according to the chromaticity parameters to obtain the second image signal includes: performing chromaticity mapping on the chromaticity signal according to the chromaticity parameters to obtain a mapped chromaticity signal; and performing an inverse conversion of the color space of the mapped chromaticity signal using a conversion matrix to obtain the second image signal.
[0022] According to one aspect of an embodiment of the present application, an image processing device is provided, comprising: a determination module, configured to determine mapping parameters of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology; an enhancement module, configured to perform color enhancement on the first image signal according to the mapping parameters to obtain a second image signal.
[0023] According to one aspect of an embodiment of the present application, an electronic device is provided, including a first memory and a first processor, wherein the first memory stores a computer program that can be run on the first processor, and when the first processor executes the program, the image processing method described in the embodiment of the present application is implemented.
[0024] According to one aspect of an embodiment of the present application, a chip is provided, comprising a second memory and a second processor, wherein the second memory stores a computer program executable on the second processor, and when the second processor executes the program, the image processing method described in the embodiment of the present application is implemented.
[0025] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image processing method as described in the embodiment of the present application is implemented.
[0026] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the image processing method as described in the embodiment of the present application is implemented.
[0027] In an embodiment of the present application, mapping parameters of a first image signal to be processed are determined based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology; the first image signal is color enhanced according to the mapping parameters to obtain a second image signal. In this way, a color mapping relationship representing an adjustment benchmark for different image signals is determined in advance based on the target imaging technology, and the floating-point calculation in the dynamic HDR technology can be converted into a search from the color mapping relationship, so that the mapping parameters of the first image signal can be quickly determined, and then the second image signal can be quickly obtained based on the mapping parameters, thereby reducing complex floating-point calculations, improving image processing efficiency, reducing computational complexity, and reducing the amount of hardware equipment calculations and the loss of image accuracy.
[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0031] Figure 1 Schematic diagram of the implementation process of the image processing method provided in the embodiment of the present application Figure 1 ;
[0032] Figure 2 Schematic diagram of the implementation process of the image processing method provided in the embodiment of the present application Figure 2 ;
[0033] Figure 3 Schematic diagram of the implementation process of the image processing method provided in the embodiment of the present application Figure 3 ;
[0034] Figure 4 Schematic diagram of the implementation process of the image processing method provided in the embodiment of the present application Figure 4 ;
[0035] Figure 5 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0036] Figure 6 A schematic diagram of the hardware entity of the electronic device provided in the embodiment of the present application;
[0037] Figure 7 A schematic diagram of the structure of the chip provided in the embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0040] In the following description, reference is made to “some embodiments”, “this embodiment”, “embodiments of the present application” and examples, etc., which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0041] The descriptions of “first, second, third” etc. that appear in the embodiments of the present application are only for illustration and distinction of the description objects. There is no distinction of order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.
[0042] The present application provides an image processing method, which can be executed by a processor of an electronic device. The electronic device may refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device), or other device with data processing capabilities. Figure 1 As shown, the method may include the following steps 101 to 102:
[0043] Step 101: Determine mapping parameters of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology.
[0044] The first image signal may refer to an image signal that currently needs to be processed. The image signal may be an electrical signal or an optical signal that reflects the brightness and color intensity of image pixels, and the image signal carries data such as the space and brightness of the image. In a feasible implementation, the first image signal may be an image signal of multiple frames of images included in a video, or may be an image signal of a single image, which is not limited in the embodiments of the present application. The image processing method provided in the present application may be executed for the image signal of any image.
[0045] The color mapping relationship is used to characterize the adjustment benchmarks of different image signals; further, the color mapping relationship is used to characterize the adjustment benchmarks of multiple image signals with different bit depths. In a feasible implementation, the color mapping relationship can be a color mapping curve, which can be used as a lookup table to subsequently find mapping parameters corresponding to different color values.
[0046] The target imaging technology is used to reflect the shape, features, color and other characteristics of an object in the form of an image. In a feasible implementation, the target imaging technology may be a dynamic HDR technology, and a technology based on the evolution of HDR technology. The present application selects dynamic HDR technology as the target imaging technology to restore the true color of the object to the greatest extent. The mapping parameters are used to perform color enhancement on the first image signal; in a feasible implementation, the mapping parameters may refer to one or more mapping parameters determined using the dynamic HDR technology.
[0047] In some implementations, mapping parameters of different image signals can be determined in advance according to the dynamic HDR technology, and the mapping parameters of each image signal can be expressed in the form of a curve to obtain a color mapping relationship; thus, the mapping parameters of the first image signal are searched in the color mapping relationship. In this way, the floating-point calculation in the dynamic HDR technology is converted into the color mapping relationship search, which can reduce complex floating-point calculations, improve image processing efficiency, reduce calculation complexity, and reduce the amount of hardware equipment operations and the loss of image accuracy.
[0048] In some implementations, the color mapping relationship may be specifically implemented by configuring different mapping parameters for different image signals according to the color requirements of the current scene, establishing an association relationship between each image signal and the corresponding mapping parameter, and using the association relationship as the color mapping relationship. Specifically, each image signal and the corresponding mapping parameter may be stored in the form of a key-value pair to establish an association relationship between each image signal and the corresponding mapping parameter.
[0049] Step 102: Perform color enhancement on the first image signal according to the mapping parameters to obtain a second image signal.
[0050] The second image signal may refer to an image signal obtained by color enhancing the first image signal using the dynamic HDR technology.
[0051] In a feasible implementation, the brightness and luminosity of the first image signal may be adjusted according to the mapping parameters to obtain the second image signal.
[0052] In an embodiment of the present application, mapping parameters of a first image signal to be processed are determined based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology; the first image signal is color enhanced according to the mapping parameters to obtain a second image signal. In this way, a color mapping relationship representing an adjustment benchmark for different image signals is determined in advance based on the target imaging technology, and the floating-point calculation in the dynamic HDR technology can be converted into a search from the color mapping relationship, so that the mapping parameters of the first image signal can be quickly determined, and then the second image signal can be quickly obtained based on the mapping parameters, which reduces complex floating-point calculations, improves image processing efficiency, reduces computational complexity, and reduces the amount of hardware equipment computation and the loss of image accuracy.
[0053] The present application embodiment provides an image processing method, which is applied to electronic devices such as Figure 2 As shown, the method includes the following steps 201 to 203:
[0054] Step 201: Using a floating point computing unit, determine the color mapping relationship based on target imaging technology.
[0055] The floating point computing unit is specifically used for performing floating point operations. In a feasible implementation, the floating point computing unit may refer to a floating point computing core; for example, the floating point computing core may be an Advanced RISC Machine Central Processing Unit (Arm CPU).
[0056] Since floating-point operations cannot be processed by ordinary processors, the floating-point operations in the color mapping relationship are placed in the floating-point calculation unit; in this way, the amount of calculation of the hardware device can be reduced and the image accuracy can be guaranteed.
[0057] In a feasible implementation, a floating point computing kernel may be used to determine the color mapping relationship based on target imaging technology.
[0058] Step 202: Determine mapping parameters of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology.
[0059] Step 203: Perform color enhancement on the first image signal according to the mapping parameters to obtain a second image signal.
[0060] Here, the above steps 202 to 203 correspond to the above steps 101 to 102 respectively, and the specific implementation methods of the above steps 101 to 102 may be referred to during implementation.
[0061] In some embodiments, the “determining the color mapping relationship based on the target imaging technology” in the above step 201 can be implemented through the following steps 2011 to 2014:
[0062] Step 2011: Determine a brightness mapping function and a chromaticity mapping function based on a target imaging technology capable of restoring true colors.
[0063] The brightness mapping function is used to determine the brightness parameters of different image signals. The chromaticity mapping function is used to determine the chromaticity parameters of different image signals.
[0064] In a feasible implementation, the brightness mapping function and the chromaticity mapping function may be determined based on a mapping function in a dynamic HDR technology.
[0065] Step 2012: Use the brightness mapping function to perform brightness mapping on the third image signal with different bit depths to obtain a brightness mapping relationship.
[0066] In a feasible implementation, the bit depth of the image signal can be traversed in the floating-point calculation kernel, and the brightness mapping relationship of each bit depth can be obtained by calculating the brightness mapping relationship using a brightness mapping function.
[0067] For example, if the input image signal is 10 bits and the brightness data is 16 bits, then traverse [0, 1023] to obtain a 1024*6-bit brightness mapping relationship.
[0068] Step 2013: Use the chromaticity mapping function to perform chromaticity mapping on the third image signal to obtain a chromaticity mapping relationship.
[0069] In a feasible implementation, a chromaticity mapping function may be used in a floating-point computing core to operate on a third image signal with different bit depths to obtain a chromaticity mapping relationship for each bit depth, that is, a chromaticity mapping relationship.
[0070] For example, if the input image signal is 10 bits and the chrominance data is 16 bits, then traverse [0, 1023] to obtain a 1024*6-bit chrominance mapping relationship.
[0071] Step 2014: Determine the color mapping relationship based on the brightness mapping relationship and the chromaticity mapping relationship.
[0072] In a feasible implementation, the brightness mapping relationship and the chromaticity mapping relationship may be used as a color mapping relationship.
[0073] In some embodiments, the above step 2011 can be implemented by the following steps 2011a to 2011c:
[0074] Step 2011a, determining an image enhancement function and a signal conversion function corresponding to the target imaging technology; the signal conversion function represents the conversion relationship between a nonlinear image signal and a linear image signal, and the image enhancement function is used to enhance the color in the image signal.
[0075] The image enhancement function is used to enhance the color in the image signal; further, the image enhancement function is used to enhance the chrominance and brightness in the image signal. In a feasible implementation, the image enhancement function may be a dynamic mapping function in the dynamic HDR technology. For example, the image enhancement function may be a dynamic mapping function in the dynamic HDR10+ technology, and the dynamic mapping function is a Bezier curve with at most 16 anchor points.
[0076] The signal conversion function is used to characterize the conversion relationship between the nonlinear image signal and the linear image signal, that is, the image signal can be converted from nonlinear to linear through the signal conversion function. In a feasible implementation, the signal conversion function can be an electro-optical conversion function. For example, the signal conversion function can be a performance qualification (PQ) electro-optical conversion curve.
[0077] In some embodiments, if the target imaging technology is the dynamic HDR10+ technology, the Bezier curve may be used as the image enhancement function and the PQ electro-optical conversion curve may be used as the signal conversion function.
[0078] Step 2011b: Determine the brightness mapping function based on the image enhancement function and the signal conversion function.
[0079] In some embodiments, the specific implementation method of step 2011b may be: determining first dynamic metadata; the first dynamic metadata characterizes the degree of color enhancement of the image signal; and constructing a brightness mapping function based on the image enhancement function, the signal conversion function and the first dynamic metadata.
[0080] The first dynamic metadata characterizes the degree of color enhancement of the image signal. In a feasible implementation, if the target imaging technology is the dynamic HDR10+ technology, the first dynamic metadata may be the dynamic metadata for color enhancement defined in the SMPTE ST 2094 standard.
[0081] In a feasible implementation manner, the signal conversion function and the first dynamic metadata may be integrated into the image enhancement function to obtain a brightness mapping function.
[0082] For example, if the target imaging technology is dynamic HDR10+ technology, the brightness mapping function can be expressed as:
[0083]
[0084] Among them, K s is the horizontal coordinate of the anchor point in the dynamic metadata; K F is the vertical coordinate of the anchor point in the dynamic metadata; B n is the nth-order Bessel function, B n The calculation formula can be expressed as:
[0085]
[0086] s represents the electro-optical conversion function, and the calculation formula of s can be expressed as s = f pqeotf (input_img);f pqeotf is the PQ electro-optical conversion curve, and the calculation formula of s can be expressed as:
[0087]
[0088] Among them, m 1 =0.1593017578125, m 2 =78.84375, c 2 =18.8515625, c 3 =18.6875, c 1 =c 3 -c 2 +1, input_img represents the image signal to be processed.
[0089] Step 2011c: determine the chromaticity mapping function based on the brightness mapping function.
[0090] In a feasible implementation, the brightness mapping function can be derived based on the dynamic HDR technology to obtain the chromaticity mapping function.
[0091] In some embodiments, the specific implementation method of step 2011c may be: determining a color saturation weight and a second dynamic metadata; the second dynamic metadata characterizes a color presentation effect and / or display brightness; and constructing the chromaticity mapping function based on the color saturation weight, the second dynamic metadata, the signal conversion function, and the brightness mapping function.
[0092] The color saturation weight is used to optimize the color in the graphics signal. The second dynamic metadata is used to characterize the color rendering effect and / or display brightness; in a feasible implementation, the second dynamic metadata may include but is not limited to: color palette template and display brightness. If the target imaging technology is dynamic HDR10+ technology, the second dynamic metadata may be the dynamic metadata representing the color palette template and display brightness defined in the SMPTE ST 2094 standard.
[0093] In a feasible implementation manner, the color saturation weight, the second dynamic metadata, the signal conversion function and the brightness mapping function may be fused to obtain a chromaticity mapping function.
[0094] For example, the second dynamic metadata, the signal conversion function and the brightness mapping function are first fused, and then the second fusion operation is performed with the color saturation weight to obtain the chromaticity mapping function. The calculation formula of the chromaticity mapping function can be expressed as:
[0095]
[0096] Among them, ColorSaturationWeight represents the color saturation weight; M p and M ML Indicates the color palette template; T p and T ML represents display brightness; s represents the electro-optical conversion function; F N (s) represents the brightness mapping function.
[0097] In some embodiments, the above step 2012 can be implemented by the following steps 2012a to 2012c:
[0098] Step 2012a: linearly convert the third image signal using a signal conversion function corresponding to the target imaging technology to obtain a converted third image signal; the signal conversion function represents the conversion relationship between nonlinearity and linearity of the image signal.
[0099] In a feasible implementation, for each bit depth of the third image signal, the third image signal may be input as input_img into an electro-optical conversion function to obtain a converted third image signal s, so as to convert the third image signal from a nonlinear signal to a linear signal.
[0100] Step 2012b, using the image enhancement function corresponding to the target imaging technology and integrated with the first dynamic metadata to perform brightness mapping on the converted third image signal to obtain a brightness mapping relationship for each bit depth; the first dynamic metadata represents the degree of color enhancement of the image signal, and the image enhancement function is used to enhance the color in the image signal.
[0101] In a feasible implementation, for each bit depth of the third image signal, the converted third image signal s can be input into the brightness mapping function for brightness mapping to obtain the brightness mapping relationship F for each bit depth. N The brightness mapping relationship may be a curve graph with the RGB value of the image signal as the horizontal axis and the brightness parameter as the vertical axis.
[0102] Step 2012c: determine the brightness mapping relationship based on the brightness mapping relationship of each bit depth.
[0103] In the above embodiment, the third image signal is first converted from a nonlinear signal to a linear signal through an electro-optical conversion function and then input into a brightness mapping function for brightness mapping, which can reduce the communication bandwidth between the floating-point computing core and the chip and improve image processing efficiency.
[0104] In some embodiments, the above step 2013 may be implemented by the following steps 2013a to 2013b:
[0105] Step 2013a, performing calculation processing on the second dynamic metadata, the converted third image signal and the mapping relationship between each bit depth to obtain the calculated third image signal; the second dynamic metadata represents the color presentation effect and / or display brightness.
[0106] In a feasible implementation, the M in the second dynamic metadata may be p and M ML , and perform a first operation with the converted third image signal s, and convert T in the second dynamic data p and T ML , and the mapping relationship between each bit depth F N (s) performing a second operation, and then performing a third operation on the signal after the first operation and the signal after the second operation to obtain a third image signal after the operation.
[0107] For example, the M in the second dynamic metadata p and M ML , and the converted third image signal s, performing a first operation, which means converting M in the second dynamic metadata p and M ML, and then perform a logarithmic operation after multiplying the converted third image signal s; T in the second dynamic data p and T ML , and the mapping relationship between each bit depth F N (s) performs the second operation, which means that T in the second dynamic data is p and T ML , and the mapping relationship between each bit depth F N (s) performs a product operation and then a logarithmic operation; in this case, the first operation and the second operation are the same. Performing a third operation on the signal after the first operation and the signal after the second operation means that the signal after the first operation and the signal after the second operation are divided and then subtracted by one and the maximum value is taken. In this case, the third image signal finally obtained after the operation can be:
[0108]
[0109] Step 2013b: use color saturation weight to perform operation processing on the calculated third image signal to obtain the chromaticity mapping relationship.
[0110] In a feasible implementation, a fourth operation may be performed on the color saturation weight and the calculated third image signal to obtain a chromaticity mapping relationship. The chromaticity mapping relationship may be a curve graph with the uv signal as the horizontal axis and the chromaticity parameter as the vertical axis.
[0111] For example, performing the fourth operation on the third image signal after the color saturation weight and operation means performing a product operation on the third image signal after the color saturation weight and operation and then adding one; in this case, the chromaticity mapping relationship obtained is f scsm (s).
[0112] In some embodiments, the above step 202 can be implemented by the following steps 2021 to 2022:
[0113] Step 2021: Find the brightness parameter of the first image signal from the brightness mapping relationship in the color mapping relationship.
[0114] In one implementation, step 2021 may be specifically implemented by: determining a color maximum value of the first image signal in a first color space; and searching for the brightness parameter from the brightness mapping relationship according to the color maximum value.
[0115] The first color space may refer to an RGB color space, wherein R represents red, G represents green, and B represents blue. The color maximum value refers to the RGB maximum value in the first image signal.
[0116] In a feasible implementation, the brightness parameter may be found from the brightness mapping relationship based on the RGB maximum value in the first image signal.
[0117] Step 2022: Find the chromaticity parameter of the first image signal from the chromaticity mapping relationship in the color mapping relationship.
[0118] In a feasible implementation, a UV signal corresponding to the first image signal may be determined first, and the chromaticity parameter of the first image signal may be found from a chromaticity mapping relationship according to the UV signal.
[0119] In the above embodiment, the brightness parameter is determined by searching the brightness mapping relationship, and the chromaticity parameter is determined by searching the chromaticity mapping relationship, so that the image processing efficiency can be improved and the amount of calculation of the hardware device can be reduced.
[0120] In some embodiments, step 2022 may be implemented by steps 2022a to 2022b as follows:
[0121] Step 2022a: convert the first image signal in the first color space into a color space according to the brightness parameter to obtain a fourth image signal in the second color space.
[0122] The second color space may refer to a YUV color space, wherein Y represents luminance (Luminance or Luma), that is, a grayscale value; U and V represent chrominance (Chrominance or Chroma). The first image signal and the fourth image signal refer to the same image, the difference being that the first image signal is a signal in an RGB color space, and the second image signal is a signal in a YUV color space.
[0123] The color space conversion of the first image signal in the first color space according to the brightness parameter is based on the color space conversion and incorporates the brightness mapping in the dynamic HDR technology.
[0124] In a feasible implementation, the first image signal in the first color space may be linearly converted according to the brightness parameter and then converted in color space to obtain a fourth image signal in the second color space.
[0125] Step 2022b: searching the chrominance parameter from the chrominance mapping relationship according to the chrominance signal of the fourth image signal.
[0126] In some embodiments, the above step 2022a may be implemented by the following steps A to B:
[0127] Step A: performing linear conversion on the first image signal according to the brightness parameter to obtain a first linear signal corresponding to the first image signal.
[0128] In a feasible implementation manner, the first image signal may be linearly converted according to a brightness parameter and a signal conversion function to obtain a first linear signal corresponding to the first image signal.
[0129] In some embodiments, the specific implementation method of step A may be: using a signal conversion function corresponding to the target imaging technology to linearly convert the first image signal to obtain a second linear signal; the signal conversion function characterizes the conversion relationship between nonlinearity and linearity of the image signal; and performing brightness mapping on the second linear signal according to the gradient of the brightness parameter to obtain the first linear signal.
[0130] In a feasible implementation, an electro-optical conversion function may be used to perform linear conversion on the first image signal to obtain a second linear signal.
[0131] In a feasible implementation, the gradient of the brightness parameter may be calculated, and the gradient of the brightness parameter and the second linear signal may be processed to implement brightness mapping to obtain the first linear signal. For example, the gradient of the brightness parameter and the second linear signal may be multiplied to obtain the second linear signal.
[0132] Step B: performing color space conversion on the first linear signal to obtain the fourth image signal.
[0133] In some implementations, a specific implementation of step B may be: using a conversion matrix to perform color space conversion on the first linear signal to obtain the fourth image signal.
[0134] The conversion matrix is used to convert the color space; specifically, the conversion matrix is used to convert the image signal from the first color space (RGB) to the second color space (YUV). In a feasible implementation, the conversion matrix can be a 3x3 conversion matrix.
[0135] In a feasible implementation, a 3x3 conversion matrix may be used to perform color space conversion on the mapped first image signal to obtain a fourth image signal.
[0136] In the above embodiment, since the mapping (brightness mapping and chromaticity mapping) is performed on linear signals, in order to reduce the communication bandwidth between the floating-point computing core and the chip and ensure timeliness, it is necessary to use a signal conversion function to perform linear conversion before mapping.
[0137] In some embodiments, step 203 may be implemented by steps 2031 to 2032 as follows:
[0138] Step 2031: determine a fourth image signal in the second color space corresponding to the first image signal; the fourth image signal is obtained by converting the first image signal in the first color space into a color space according to a brightness parameter in the mapping parameter.
[0139] The fourth image signal here can directly multiplex the fourth image signal obtained in the above step 2022a to further improve the image processing efficiency.
[0140] Step 2032: Perform an inverse color space conversion on the chrominance signal in the fourth image signal according to the chrominance parameter to obtain the second image signal.
[0141] The chrominance signal in the fourth image signal may refer to a UV signal representing chrominance in a YUV signal.
[0142] In a feasible implementation, the chromaticity signal in the fourth image signal may be first chromaticity mapped according to the chromaticity parameter and then inversely converted in color space to obtain the second image signal that is finally output.
[0143] In some implementations, step 2032 may be specifically implemented by: performing chromaticity mapping on the chromaticity signal according to the chromaticity parameter to obtain a mapped chromaticity signal; and performing an inverse conversion of the color space of the mapped chromaticity signal using a conversion matrix to obtain the second image signal.
[0144] The conversion matrix is used to convert the color space. Specifically, the conversion matrix here is used to convert the chrominance signal from the second color space (YUV) to the first color space (RGB). In a feasible implementation, the conversion matrix can be a 3x3 conversion matrix.
[0145] In a feasible implementation, the chromaticity signal may be firstly chromaticity mapped according to the chromaticity parameter, and then the mapped chromaticity signal may be inversely transformed in color space using a 3x3 transformation matrix to obtain a second image signal that is finally output.
[0146] In the above embodiment, since the image signal in the RGB color space is ultimately obtained, after completing the color enhancement (chromaticity mapping and brightness mapping), the UV signal needs to be converted into an RGB signal through a conversion matrix, that is, to obtain a second image signal in the RGB color space.
[0147] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0148] The core of dynamic HDR technology is that each frame of image signal is mapped to a different curve. Whether it is the HDR10+ standard or HDR Vivid, the image signal is normalized to the interval [0,1], and the image output signal is converted into a linear signal (R`,G`,B`) of [0-1] by electro-optical conversion; the maximum value Max (R`,G`,B`) of the linear signal is selected as the input point of the mapping curve, and the slope K of the input point is calculated; the slope K is multiplied by the linear signal (R`,G`,B`) to obtain the mapped linear signal; the mapped linear signal is converted to the Yuv domain, and the uv component in the Yuv domain is adjusted according to the metadata to obtain the final output image signal.
[0149] However, the related technology has the following disadvantages: 1. After the image signal is normalized to the interval of [0-1], all subsequent processing will be floating-point operations. If the hardware device needs to perform floating-point operations, it needs to be expanded to integers, which will result in huge calculations and loss of precision. 2. The calculation complexity of the mapping relationship of each frame of dynamic HDR is high, and the hardware implementation is difficult.
[0150] Based on the above problems, most of the current tools and programs for dynamic HDR analysis are software, and there is a lack of hardware implementation solutions.
[0151] To this end, this application simplifies the dynamic HDR process, converts the mapping formula into a color mapping relationship (color mapping table), and transfers the calculation of the mapping formula to the floating-point computing core for calculation, thereby reducing the amount of computation of the hardware device and reducing the loss of image accuracy.
[0152] The specific process of this application is as follows:
[0153] 3.1. Mapping table determination stage.
[0154] The mapping formula of dynamic HDR is calculated in a specific way based on the dynamic metadata (Dynamic Metadata) passed in for each frame. Taking HDR10+ as an example, the dynamic mapping formula of HDR10+ is a Bezier curve with up to 16 anchor points. The dynamic mapping formula can be expressed as:
[0155]
[0156] Among them, K S is the horizontal coordinate of the anchor point in the dynamic metadata; K F is the vertical coordinate of the anchor point in the dynamic metadata; B n () is the nth-order Bessel function, B n () can be expressed as:
[0157]
[0158] Among them, P is the anchor point. Since the mapping formula of HDR10+ is performed on linear signals, in order to reduce the communication bandwidth between the floating-point computing core and the chip and ensure timeliness, the mapping formula of HDR10+ is converted from linear to nonlinear, that is, the electro-optical conversion function is combined with the mapping formula of HDR10+ to obtain a nonlinear mapping formula, that is, the brightness mapping formula is obtained.
[0159] The s in the above formula is processed as follows: s = f pqeotf (input_img);
[0160] Among them, f pqeotf is the PQ electro-optical conversion curve, and the calculation formula of s can be expressed as:
[0161]
[0162] m 1 =0.1593017578125, m 2 =78.84375, c 2 =18.8515625, c 3 =18.6875, c 1 =c 3 -c 2 +1, input_img represents the image signal to be processed.
[0163] In the floating-point calculation core, the bit depth of the image signal is traversed, and the brightness mapping formula is calculated for the bit depth of each image signal to obtain the brightness mapping relationship corresponding to each bit depth, that is, the brightness lookup table is obtained. Taking the input image signal as 10 bits and the brightness signal as 16 bits as an example, [0-1023] is traversed to obtain a 1024*16-bit brightness mapping table.
[0164] The chromaticity mapping table is derived from the brightness mapping formula according to the dynamic HDR10+ standard protocol. Taking HDR10+ as an example, the chromaticity mapping formula can be:
[0165]
[0166] Among them, ColorSaturationWeight represents the color saturation weight; M p and M ML Indicates the color palette template; T p and T ML represents display brightness; s represents the electro-optical conversion function; F N (s) represents the brightness mapping function.
[0167] 3.2 Image processing stage.
[0168] like Figure 3 As shown, the image processing flow includes the following steps 301 to 305:
[0169] Step 301: Input image data.
[0170] Step 302: Look up brightness parameters from a brightness lookup table.
[0171] Step 303: Look up chromaticity parameters from a chromaticity lookup table.
[0172] Step 304: Process the input image signal according to the brightness parameter and the chromaticity parameter through the chip processing flow to obtain a processed image signal.
[0173] Step 305: output the processed image signal.
[0174] like Figure 4 As shown, for an input image signal with dynamic metadata, select the maximum value max_rgb (color maximum value) of the three components (R, G, B) in the input image signal; check the brightness mapping table according to max_rgb to obtain Max_RGB` (brightness parameter); convert the three components (R, G, B) in the input image signal into a linear signal Optical through an electro-optical conversion function; multiply Optical by the gradient (Val×Max_RGB' / Max_RGB) corresponding to Max_RGB` to perform brightness mapping to obtain the linear signal Optical` after brightness mapping. Convert Optical` to a YUV signal through a 3x3 conversion matrix. Then check the chromaticity mapping table according to the UV signal in the YUV signal to obtain the chromaticity parameters, use the chromaticity parameters to perform chromaticity mapping on the UV signal, and then convert it into an RGB signal through the inverse conversion of the 3x3 conversion matrix, so as to obtain the processed image signal.
[0175] The point to be protected in this application is that by making the brightness mapping formula and chromaticity mapping formula of dynamic HDR into a color mapping table in the floating-point calculation core, the mapping is completed by looking up the color mapping table on the chip side, which solves the problem of large amount of floating-point calculation in hardware and lack of precision in dynamic HDR. In principle, the feasibility and timeliness of hardware implementation of dynamic HDR are guaranteed.
[0176] The technical advantage of this application is that the mapping formula corresponding to the input dynamic metadata is converted into a color mapping table, and the generation process of the color mapping table is performed in a floating-point calculation core, which ensures accuracy and does not require floating-point to fixed-point conversion to increase the amount of calculation on the hardware side. The dynamic HDR analysis process can be effectively completed in hardware.
[0177] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.; or, steps in different embodiments may be combined into a new technical solution.
[0178] Based on the foregoing embodiments, an embodiment of the present application provides an image processing device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be an AI acceleration engine (such as NPU, etc.), GPU, central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA), etc.
[0179] Figure 5 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the image processing device 50 includes:
[0180] A determination module 501 is configured to determine a mapping parameter of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark for different image signals determined based on a target imaging technology;
[0181] The enhancement module 502 is configured to perform color enhancement on the first image signal according to the mapping parameters to obtain a second image signal.
[0182] In some embodiments, the determination module 501 is specifically configured to: use a floating point computing unit to determine the color mapping relationship based on a target imaging technology.
[0183] In some embodiments, the determination module 501 is specifically configured to: determine a brightness mapping function and a chromaticity mapping function based on a target imaging technology that can restore true colors; use the brightness mapping function to perform brightness mapping on a third image signal with different bit depths to obtain a brightness mapping relationship; use the chromaticity mapping function to perform chromaticity mapping on the third image signal to obtain a chromaticity mapping relationship; and determine the color mapping relationship based on the brightness mapping relationship and the chromaticity mapping relationship.
[0184] In some embodiments, the determination module 501 is specifically configured to: determine the image enhancement function and signal conversion function corresponding to the target imaging technology; the signal conversion function characterizes the conversion relationship between nonlinearity and linearity of the image signal, and the image enhancement function is used to enhance the color in the image signal; based on the image enhancement function and the signal conversion function, determine the brightness mapping function; determine the chrominance mapping function based on the brightness mapping function.
[0185] In some embodiments, the determination module 501 is specifically configured to: determine first dynamic metadata; the first dynamic metadata characterizes the degree of color enhancement of the image signal; and construct a brightness mapping function based on the image enhancement function, the signal conversion function and the first dynamic metadata.
[0186] In some embodiments, the determination module 501 is specifically configured to: determine the color saturation weight and the second dynamic metadata; the second dynamic metadata represents the color presentation effect and / or display brightness; based on the color saturation weight, the second dynamic metadata, the signal conversion function and the brightness mapping function, construct the chromaticity mapping function.
[0187] In some embodiments, the determination module 501 is specifically configured to: use a signal conversion function corresponding to the target imaging technology to linearly convert the third image signal to obtain a converted third image signal; the signal conversion function represents the conversion relationship between nonlinearity and linearity of the image signal; use an image enhancement function corresponding to the target imaging technology and integrated with the first dynamic metadata to perform brightness mapping on the converted third image signal to obtain a brightness mapping relationship for each bit depth; the first dynamic metadata represents the degree of color enhancement of the image signal, and the image enhancement function is used to enhance the color in the image signal; based on the brightness mapping relationship for each bit depth, determine the brightness mapping relationship.
[0188] In some embodiments, the determination module 501 is specifically configured to: perform computational processing on the second dynamic metadata, the converted third image signal, and the brightness mapping relationship of each bit depth to obtain the calculated third image signal; the second dynamic metadata represents the color presentation effect and / or display brightness; and use the color saturation weight to perform computational processing on the calculated third image signal to obtain the chromaticity mapping relationship.
[0189] In some embodiments, the determination module 501 is specifically configured to: search for brightness parameters of the first image signal from a brightness mapping relationship in the color mapping relationship; and search for chromaticity parameters of the first image signal from a chromaticity mapping relationship in the color mapping relationship.
[0190] In some embodiments, the determination module 501 is specifically configured to: determine the maximum color value of the first image signal in the first color space; and search for the brightness parameter from the brightness mapping relationship according to the maximum color value.
[0191] In some embodiments, the determination module 501 is specifically configured to: convert the first image signal in the first color space according to the brightness parameter to obtain a fourth image signal in the second color space; and search for the chromaticity parameter from the chromaticity mapping relationship according to the chromaticity signal of the fourth image signal.
[0192] In some embodiments, the enhancement module 502 is specifically configured to: determine a fourth image signal in the second color space corresponding to the first image signal; the fourth image signal is obtained by converting the first image signal in the first color space according to the brightness parameter in the mapping parameter; and inversely convert the color space of the chrominance signal in the fourth image signal according to the chrominance parameter to obtain the second image signal.
[0193] In some embodiments, the enhancement module 502 is specifically configured to: perform linear conversion on the first image signal according to the brightness parameter to obtain a first linear signal corresponding to the first image signal; and perform color space conversion on the first linear signal to obtain the fourth image signal.
[0194] In some embodiments, the enhancement module 502 is specifically configured to: perform linear conversion on the first image signal using a signal conversion function corresponding to the target imaging technology to obtain a second linear signal; the signal conversion function characterizes the conversion relationship between nonlinearity and linearity of the image signal; and perform brightness mapping on the second linear signal according to the gradient of the brightness parameter to obtain the first linear signal.
[0195] In some embodiments, the enhancement module 502 is specifically configured to: use a conversion matrix to perform color space conversion on the first linear signal to obtain the fourth image signal.
[0196] In some embodiments, the enhancement module 502 is specifically configured to: perform chromaticity mapping on the chromaticity signal according to the chromaticity parameter to obtain a mapped chromaticity signal; and perform inverse conversion of the color space of the mapped chromaticity signal using a conversion matrix to obtain the second image signal.
[0197] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0198] It should be noted that in the embodiments of this application Figure 5 The division of modules in the image processing device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.
[0199] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0200] An embodiment of the present application provides an electronic device, Figure 6 A schematic diagram of a hardware entity of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device 60 includes a first memory 601 and a first processor 602. The first memory 601 stores a computer program that can be run on the first processor 602. When the first processor 602 executes the program, the image processing method described in the embodiment of the present application is implemented.
[0201] It should be noted that the first memory 601 is configured to store instructions and applications executable by the first processor 602, and can also cache data to be processed or processed by various modules in the first processor 602 and the electronic device 60 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0202] In the embodiment of the present application, the electronic device 60 may be various types of devices with information processing capabilities during the implementation of the image processing method described in the embodiment of the present application. For example, the electronic device 60 may include a mobile phone, a tablet computer, a desktop computer, a laptop computer, a host computer, etc.
[0203] The embodiment of the present application provides a chip, Figure 7 A schematic diagram of the structure of the chip provided in the embodiment of the present application, such as Figure 7 As shown, the chip 70 includes a second memory 701 and a second processor 702. The second memory 701 stores a computer program that can be run on the second processor 702. When the second processor 702 executes the program, the image processing method described in the embodiment of the present application is implemented.
[0204] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.
[0205] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0206] It should be noted here that the description of the above storage medium, chip embodiment and device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiment of this application for understanding.
[0207] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0208] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0209] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0210] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0211] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0212] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0213] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0214] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0215] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0216] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0217] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0218] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An image processing method, characterized in that: The image processing method comprises: Determining a mapping parameter of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark of different image signals determined based on a target imaging technology; the target imaging technology is a dynamic HDR technology; Performing color enhancement on the first image signal according to the mapping parameter to obtain a second image signal; The color mapping relationship is determined in the following manner: Determine a brightness mapping function and a chromaticity mapping function based on an image enhancement function and a signal conversion function corresponding to a target imaging technology capable of restoring true colors; the signal conversion function represents a conversion relationship between nonlinearity and linearity of an image signal, and the image enhancement function is used to enhance the color in the image signal; Performing brightness mapping on a third image signal having different bit depths by using the brightness mapping function to obtain a brightness mapping relationship; Performing chromaticity mapping on the third image signal using the chromaticity mapping function to obtain a chromaticity mapping relationship; The color mapping relationship is determined based on the brightness mapping relationship and the chromaticity mapping relationship.
2. The image processing method according to claim 1, characterized in that: The image processing method further comprises: The color mapping relationship is determined based on target imaging technology using a floating point computing unit.
3. The image processing method according to claim 1, characterized in that: The image enhancement function and the signal conversion function corresponding to the target imaging technology capable of restoring the true color are used to determine the brightness mapping function and the chromaticity mapping function, including: Determining an image enhancement function and a signal conversion function corresponding to the target imaging technology; Determining the brightness mapping function based on the image enhancement function and the signal conversion function; A chrominance mapping function is determined based on the luminance mapping function.
4. The image processing method according to claim 3, characterized in that: The step of determining the brightness mapping function based on the image enhancement function and the signal conversion function comprises: Determining first dynamic metadata; the first dynamic metadata represents a degree of color enhancement of the image signal; A brightness mapping function is constructed based on the image enhancement function, the signal conversion function and the first dynamic metadata.
5. The image processing method according to claim 3 or 4, characterized in that: The determining of the chrominance mapping function based on the brightness mapping function comprises: Determine a color saturation weight and a second dynamic metadata; the second dynamic metadata represents a color rendering effect and / or display brightness; The chrominance mapping function is constructed based on the color saturation weight, the second dynamic metadata, the signal conversion function and the brightness mapping function.
6. The image processing method according to any one of claims 1 to 4, characterized in that: The step of using the brightness mapping function to perform brightness mapping on the third image signal with different bit depths to obtain a brightness mapping relationship includes: Performing linear conversion on the third image signal using a signal conversion function corresponding to the target imaging technology to obtain a converted third image signal; the signal conversion function represents a conversion relationship between nonlinearity and linearity of the image signal; Performing brightness mapping on the converted third image signal using an image enhancement function corresponding to the target imaging technology and integrated with the first dynamic metadata to obtain a brightness mapping relationship for each bit depth; the first dynamic metadata represents a degree of color enhancement of the image signal, and the image enhancement function is used to enhance the color in the image signal; The brightness mapping relationship is determined based on the brightness mapping relationship of each bit depth.
7. The image processing method according to claim 6, characterized in that: The step of performing chromaticity mapping on the third image signal using the chromaticity mapping function to obtain a chromaticity mapping relationship includes: Performing calculation processing on the second dynamic metadata, the converted third image signal and the brightness mapping relationship of each bit depth to obtain the calculated third image signal; the second dynamic metadata represents the color presentation effect and / or display brightness; The calculated third image signal is processed by using a color saturation weight to obtain the chromaticity mapping relationship.
8. The image processing method according to any one of claims 1 to 4, characterized in that: The step of determining a mapping parameter of a first image signal to be processed based on the color mapping relationship includes: Finding a brightness parameter of the first image signal from a brightness mapping relationship in the color mapping relationship; The chromaticity parameter of the first image signal is found from the chromaticity mapping relationship in the color mapping relationship.
9. The image processing method according to claim 8, characterized in that: The step of searching for a brightness parameter of the first image signal from a brightness mapping relationship in the color mapping relationship includes: Determining a color maximum value of the first image signal in a first color space; The brightness parameter is searched from the brightness mapping relationship according to the color maximum value.
10. The image processing method according to claim 8, characterized in that: The searching for the chromaticity parameter of the first image signal from the chromaticity mapping relationship in the color mapping relationship includes: Performing color space conversion on the first image signal in the first color space according to the brightness parameter to obtain a fourth image signal in the second color space; The chrominance parameter is searched from the chrominance mapping relationship according to the chrominance signal of the fourth image signal.
11. The image processing method according to claim 8, characterized in that: The step of performing color enhancement on the first image signal according to the mapping parameter to obtain a second image signal includes: Determine a fourth image signal in the second color space corresponding to the first image signal; the fourth image signal is obtained by performing color space conversion on the first image signal in the first color space according to the brightness parameter in the mapping parameter; The color space is inversely converted on the chrominance signal in the fourth image signal according to the chrominance parameter to obtain the second image signal.
12. The image processing method according to claim 10, characterized in that: The converting the first image signal in the first color space according to the brightness parameter to obtain a fourth image signal in the second color space includes: Performing linear conversion on the first image signal according to the brightness parameter to obtain a first linear signal corresponding to the first image signal; The first linear signal is converted into a color space to obtain the fourth image signal.
13. The image processing method according to claim 12, characterized in that: The linear conversion of the first image signal according to the brightness parameter to obtain a first linear signal corresponding to the first image signal includes: The first image signal is linearly converted using a signal conversion function corresponding to the target imaging technology to obtain a second linear signal; the signal conversion function represents the conversion relationship between nonlinearity and linearity of the image signal; The second linear signal is brightness mapped according to the gradient of the brightness parameter to obtain the first linear signal.
14. The image processing method according to claim 12 or 13, characterized in that: The converting the first linear signal into a color space to obtain the fourth image signal includes: The first linear signal is converted into a color space using a conversion matrix to obtain the fourth image signal.
15. The image processing method according to claim 13, characterized in that: The inverse conversion of the color space of the chrominance signal in the fourth image signal according to the chrominance parameter to obtain the second image signal includes: Performing chromaticity mapping on the chromaticity signal according to the chromaticity parameter to obtain a mapped chromaticity signal; The mapped chrominance signal is inversely transformed in color space using a conversion matrix to obtain the second image signal.
16. An image processing device, characterized in that: The image processing device comprises: A determination module configured to determine a mapping parameter of a first image signal to be processed based on a color mapping relationship; the color mapping relationship represents an adjustment benchmark of different image signals determined based on a target imaging technology; the target imaging technology is a dynamic HDR technology; an enhancement module, configured to perform color enhancement on the first image signal according to the mapping parameter to obtain a second image signal; The color mapping relationship is determined in the following manner: Determine a brightness mapping function and a chromaticity mapping function based on an image enhancement function and a signal conversion function corresponding to a target imaging technology capable of restoring true colors; the signal conversion function represents a conversion relationship between nonlinearity and linearity of an image signal, and the image enhancement function is used to enhance the color in the image signal; Performing brightness mapping on a third image signal having different bit depths by using the brightness mapping function to obtain a brightness mapping relationship; Performing chromaticity mapping on the third image signal using the chromaticity mapping function to obtain a chromaticity mapping relationship; The color mapping relationship is determined based on the brightness mapping relationship and the chromaticity mapping relationship.
17. An electronic device comprising a first memory and a first processor, wherein the first memory stores a computer program that can be run on the first processor, characterized in that: When the first processor executes the program, the image processing method according to any one of claims 1 to 15 is implemented.
18. A chip comprising a second memory and a second processor, wherein the second memory stores a computer program that can be run on the second processor, characterized in that: When the second processor executes the program, the image processing method according to any one of claims 1 to 15 is implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 15 is implemented.
20. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the image processing method according to any one of claims 1 to 15 is implemented.
Citation Information
Patent Citations
Image color processing method and device
CN115088253A
Image display controller, projector and control method thereof
JP2007241193A
Methods of and Apparatus for Adjusting Colour Saturation in an Input Image
US20080080784A1