WO2018035879A1 - 一种图像处理方法以及装置 - Google Patents
一种图像处理方法以及装置 Download PDFInfo
- Publication number
- WO2018035879A1 WO2018035879A1 PCT/CN2016/097375 CN2016097375W WO2018035879A1 WO 2018035879 A1 WO2018035879 A1 WO 2018035879A1 CN 2016097375 W CN2016097375 W CN 2016097375W WO 2018035879 A1 WO2018035879 A1 WO 2018035879A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- processed
- value
- dynamic range
- target image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/92—Dynamic range modification of images or parts thereof based on global image properties
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20172—Image enhancement details
- G06T2207/20208—High dynamic range [HDR] image processing
Definitions
- Embodiments of the present invention relate to the field of image processing, and in particular, to a processing method and apparatus for image dynamic range conversion.
- the optical digital imaging process converts the optical radiation of a real scene into an electrical signal through an image sensor and preserves it as a digital image.
- the purpose of the image display is to reproduce the real scene described by a digital image through the display device. The ultimate goal of both is to give the user the same visual perception as they would directly observe the real scene.
- the dynamic range is the ratio of the brightness between the brightest object and the darkest object in the scene, that is, the number of levels of grayscale division between the "brightest” and “darkest” images.
- the larger the dynamic range the richer the level that can be represented, and the wider the color space it contains.
- Brightness is a physical measure of the radiance of a scene, in candelas per square meter (cd/m 2 ), or nits.
- the dynamic range of image sensors is very small (the dynamic range of CCD sensors is generally less than 1000:1), but the dynamic range of brightness in real scenes is very wide, and the average height of scenes illuminated by night stars is about 0.0001 cd/ m 2 , and the brightness of the scene under sunlight during the day reached 100,000 cd/m 2 .
- High Dynamic Range (HDR) images are used to describe the full visual range of real-world scenes. HDR images can represent extremely dark and extremely bright areas that may be lost by traditional shooting equipment but are perceived by the human visual system. Details.
- a signal whose optical signal value has a dynamic range of more than 0.01 to 1000 nits is called a high dynamic range optical signal value
- a signal whose optical information value has a dynamic range of less than 0.1 to 400 nits is called a standard dynamic range (SDR) light.
- SDR standard dynamic range
- HDR display device display capability satisfies HDR image light
- the obtained HDR image electrical signal value is obtained through dynamic range adjustment to obtain a final SDR image.
- Electrical signal value is only related to the fixed data such as the maximum or minimum brightness of the SDR display device.
- Such a processing method cannot effectively ensure the consistency of the SDR image display effect and the HDR image display effect after the dynamic range adjustment is performed. Contrast changes, loss of detail, etc., can affect the display of the image.
- Embodiments of the present invention provide an image processing method and apparatus for effectively ensuring the probability of occurrence of problems such as contrast change and detail loss after dynamic range adjustment, thereby reducing the influence on the display effect of an image.
- a first aspect of the embodiments of the present invention provides an image processing method, including: determining a maximum value of nonlinear primary color values of all constituent components of each pixel of a first image to be processed; determining a dynamic parameter of the first conversion function Converting the maximum value of each pixel point into a conversion value according to the first conversion function after determining the dynamic parameter; calculating the conversion value and the maximum value of each pixel point
- the ratio of the nonlinear primary color values of all the constituent components of each pixel point is dynamically adjusted according to the ratio, and the nonlinear primary color values of all constituent components of each corresponding pixel of the first target image are obtained.
- the static parameter that is no longer fixed is utilized, that is, the dynamic parameter is used to perform dynamic compression processing of the image according to the first conversion curve, compared with the prior art.
- static parameters are used.
- the consistency of the display effect after the dynamic range adjustment can be effectively ensured, and the probability of occurrence of contrast change and detail loss is reduced. Reduce the impact on the display of the image.
- the dynamic range adjustment of the nonlinear primary color values of all the constituent components of each pixel point according to the ratio includes: when the first image to be processed When the dynamic range of the image is greater than the dynamic range of the image of the first target image, the dynamic range adjustment of the nonlinear primary color values of all the constituent components of each of the pixel points is performed according to the ratio; or When the image dynamic range of the first image to be processed is smaller than the image dynamic range of the first target image, expanding the nonlinear primary color value of all the constituent components of each pixel point according to the ratio Dynamic range adjustment.
- the performing, according to the ratio, performing dynamic range adjustment on a nonlinear primary color value of all the constituent components of each pixel point including: separately calculating the ratio and the The product of the nonlinear primary color values of all of the constituent components of each pixel point results in a nonlinear primary color value of the adjusted constituent components of each of the pixel points.
- the constituent component includes an R component, a G component, a B component, or a Y component.
- the method further includes: according to the second transfer function, the first target image The nonlinear primary color values of all constituent components of each pixel are converted into linear primary color values of all constituent components of corresponding pixel points of the second target image.
- the method further includes: converting, according to the third transfer function, a linear primary color value of all constituent components of the corresponding pixel point of the second target image into a non-component component of the corresponding pixel of the second target image Linear primary color value.
- the method before determining the maximum value of the nonlinear primary color values of all the constituent components of each pixel of the first image to be processed, the method further includes: according to the fourth transfer function, the second to The linear primary color values of all constituent components of each pixel of the processed image are converted into nonlinear primary color values of all constituent components of the corresponding pixel of the first image to be processed.
- the method further includes: converting, according to the fifth transfer function, a nonlinear primary color value of all constituent components of each pixel of the second image to be processed into the second image to be processed The linear primary color value of all constituent components corresponding to the pixel.
- the first to-be-processed image is a high dynamic range image
- the second target image is a standard dynamic range image
- the first conversion function includes an S-type conversion curve
- the second transfer function includes a high dynamic range electro-optic transfer function
- the third transfer function includes a standard dynamic range photoelectric conversion function.
- the second to-be-processed image is a standard dynamic range image
- the first target image is a high dynamic range image
- the first conversion function includes an inverse S-type conversion curve
- the fourth transfer function includes a high dynamic range photoelectric conversion function
- the fifth transfer function includes a standard dynamic range electro-optic transfer function.
- the standard dynamic range electro-optical conversion function includes a BT.1886 electro-optic conversion function
- the standard dynamic range photoelectric conversion function includes a BT.1886 photoelectric conversion function
- the first to-be-processed image is a first high dynamic range image
- the first target image is a second high dynamic range image
- a dynamic range of the first high dynamic range image is The dynamic range of the second high dynamic range image is different
- the first conversion function includes an S-type conversion curve or an inverse S-type conversion curve.
- the second target image is a third high dynamic range image
- the high dynamic image standard of the second high dynamic range image and the third high dynamic range image are different.
- the second conversion function includes a high dynamic range electro-optical conversion function for converting an image conforming to a high dynamic image standard followed by the second high dynamic range image;
- the triple transfer function includes a high dynamic range photoelectric conversion function for converting an image conforming to the high dynamic image standard followed by the third high dynamic range image.
- the second to-be-processed image is a fourth high dynamic range image
- the high dynamic image standard followed by the fourth high dynamic range image and the fourth high dynamic range image is not
- the fifth conversion function includes a high dynamic range electro-optical conversion function for converting an image conforming to a high dynamic image standard followed by the fourth high dynamic range image
- the fourth transfer function includes a high dynamic range photoelectric conversion function for converting the high motion followed by the first high dynamic range image State image standard image.
- the high dynamic range electro-optical conversion function comprises: a PQ electro-optical conversion function, an HLG electro-optical conversion function or an SLF electro-optical conversion function.
- the high dynamic range photoelectric conversion function comprises: a PQ photoelectric conversion function, an HLG photoelectric conversion function or an SLF photoelectric conversion function.
- the first to-be-processed image is located in a first image sequence to be processed
- the first target image is located in a first target image sequence
- the determining the dynamic parameter of the first conversion function includes: Obtaining the dynamic parameter according to at least one of the following information: the first to-be-processed image or the statistical information of the first to-be-processed image sequence; the first to-be-processed image or the first to-be-processed image a sequence reference first reference value; the first to-be-processed image or the first to-be-processed image sequence range second reference value; the first target image or the first target image sequence range first reference value; The first target image or the first target image sequence ranges a second reference value.
- the statistical information of the first to-be-processed image or the first to-be-processed image sequence includes at least one of the following information: the first to-be-processed image or the first to-be-processed At least one of the pixel points of the processed image sequence constitutes a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information of the nonlinear primary color value or the linear primary color value of the component.
- the first to-be-processed image or the first to-be-processed image sequence range first reference value includes: a brightness maximum value of a display device for displaying the first to-be-processed image Or, according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence, searching for the first preset list, the obtained first look-up table value; or, the first preset value.
- the first to-be-processed image or the first to-be-processed image sequence range second reference value includes: a brightness minimum value of a display device for displaying the first to-be-processed image Or, according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence, the second preset list is searched for the obtained second look-up table value; or the second preset value.
- the first target image or the first target image sequence range first reference value includes: a brightness maximum value of a display device for displaying the first target image; or , the third preset value.
- the first target image or the first target image sequence includes: a minimum value of the brightness of the display device for displaying the first target image; or a fourth preset value.
- the S-type conversion curve is a curve in which the slope first rises and then falls.
- the S-type conversion curve includes one or more segments of the curve.
- the S-type conversion curve has the following form:
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L' is the converted value, the a, b,
- the p and m parameters are dynamic parameters of the S-type conversion curve.
- the p and m parameters are obtained by searching for a third preset list according to statistical information of the first to-be-processed image or the image sequence of the first to-be-processed image;
- the L 1 is a first reference value of the image sequence range of the first to-be-processed image or the first to-be-processed image
- the L 2 is the first to-be-processed image or the first to-be-processed a second reference value of the image sequence range in which the image is located
- the L′ 1 being a first reference value of the first target image or the first target image sequence range
- the L′ 2 is the first target image or The first target image sequence ranges a second reference value.
- the S-type conversion curve form is composed of the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is a maximum value of nonlinear primary color values of all constituent components of each pixel point of the first image to be processed
- the L′ is a conversion value
- the L 0 , L 1 , L 2 , L 0 , L 1 , L 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve
- the L 0 , L′ 0 , K 0 represent the input of the start of the first segment of the curve , the output value, the slope
- the L 1 , L′ 1 , and k 1 represent the input value, the output value, and the slope of the connection point of the first segment and the second segment
- the L 2 , L′ 2 , and k 2 represent the first The input value, the output value, and the slope of the end point of the two-segment curve
- the k 0 , k 1 , and k 2 satisfy K 0 ⁇ k 1 , and k 1 >k 2 .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameter is determined according to the first to-be-processed image or the first to-be-processed image
- the statistical information of the sequence is obtained by searching for the fourth preset list.
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , k 0 , k 1 , k 2 parameters are statistical information according to the first to-be-processed image or the first to-be-processed image sequence , obtained by finding the fifth preset list.
- the L' 1 parameter is calculated by the following formula:
- the inverse S-type conversion curve is a curve in which the slope first drops and then rises.
- the inverse S-type conversion curve includes one or more segments of the curve.
- the inverse S-type conversion curve has the following form:
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L' is the converted value
- the a, b, p and m parameters are The dynamic parameters of the inverse S-type conversion curve.
- the p and m parameters are obtained by finding a sixth preset list; the a and b parameters are calculated by the following formula:
- the L 1 is a first reference value of the image sequence range of the first to-be-processed image or the first to-be-processed image
- the L 2 is the first to-be-processed image or the first to-be-processed a second reference value of the image sequence range in which the image is located
- the L′ 1 being a first reference value of the first target image or the first target image sequence range
- the L′ 2 is the first target image or The first target image sequence ranges a second reference value.
- the inverse S-type conversion curve form is composed of the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is a maximum value of nonlinear primary color values of all constituent components of each pixel point of the first image to be processed, and the L′ is a conversion value;
- the L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve, and the L 0 , L′ 0 , K 0 represent the first segment curve
- the L 1 , L′ 1 , and k 1 represent the input value, the output value, and the slope of the connection point of the first segment and the second segment;
- the L 2 , L′ 2 , k 2 denotes an input value, an output value, and a slope of the end point of the second segment of the curve;
- the k 0 , k 1 , k 2 satisfy k 0 >k 1 , and k 1 ⁇ k 2 .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameter is determined according to the first to-be-processed image or the first to-be-processed image
- the statistical information of the sequence is obtained by searching for the seventh preset list.
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , k 0 , k 1 , k 2 parameters are statistical information according to the first to-be-processed image or the first to-be-processed image sequence , obtained by finding the eighth preset list.
- the L' 1 parameter is calculated by the following formula:
- a second aspect of the embodiments of the present invention provides an image processing apparatus, including: a first determining module, configured to determine a maximum value of nonlinear primary color values of all constituent components of each pixel of the first image to be processed; a determining module, configured to determine a dynamic parameter of the first transfer function; a first converting module, configured to convert the maximum value of each pixel point according to the first transfer function after determining the dynamic parameter a conversion module; a calculation module, configured to calculate a ratio of the converted value and the maximum value of each pixel; and an adjustment module, configured to perform, on the basis of the ratio, all constituent components of each pixel
- the dynamic range adjustment of the nonlinear primary color values is performed to obtain nonlinear primary color values of all constituent components of each corresponding pixel of the first target image.
- the adjusting module is specifically configured to: when the image dynamic range of the first to-be-processed image is greater than an image dynamic range of the first target image, according to the ratio, Performing a reduction dynamic range adjustment of the nonlinear primary color values of all the constituent components of each pixel; or, when the image dynamic range of the first to-be-processed image is smaller than the image dynamic range of the first target image, according to The ratio is an extended dynamic range adjustment for a nonlinear primary color value of all of the constituent components of each of the pixel points.
- the adjusting module is specifically configured to: separately calculate a product of the ratio and a nonlinear primary color value of all constituent components of each pixel, to obtain each pixel The adjusted non-linear primary color values of all constituent components.
- the constituent component includes an R component, a G component, a B component, or a Y component.
- the apparatus further includes: a second conversion module, configured to convert, according to the second transfer function, a nonlinear primary color value of all constituent components of each pixel of the first target image The linear primary color value of all constituent components of the corresponding pixel of the second target image.
- the apparatus further includes: a third conversion module, configured to convert, according to the third transfer function, a linear primary color value of all constituent components of the corresponding pixel of the second target image into a nonlinear primary color value of all constituent components of the corresponding pixel points of the second target image.
- a third conversion module configured to convert, according to the third transfer function, a linear primary color value of all constituent components of the corresponding pixel of the second target image into a nonlinear primary color value of all constituent components of the corresponding pixel points of the second target image.
- the apparatus further includes: a fourth conversion module, configured to convert, according to the fourth transfer function, a linear primary color value of all constituent components of each pixel of the second image to be processed into A non-linear primary color value of all constituent components of the corresponding pixel of the first image to be processed.
- a fourth conversion module configured to convert, according to the fourth transfer function, a linear primary color value of all constituent components of each pixel of the second image to be processed into A non-linear primary color value of all constituent components of the corresponding pixel of the first image to be processed.
- the apparatus further includes: a fifth conversion module, configured to: perform a nonlinear primary color of all constituent components of each pixel of the second image to be processed according to the fifth transfer function The value is converted to a linear primary color value of all constituent components of corresponding pixel points of the second image to be processed.
- a fifth conversion module configured to: perform a nonlinear primary color of all constituent components of each pixel of the second image to be processed according to the fifth transfer function The value is converted to a linear primary color value of all constituent components of corresponding pixel points of the second image to be processed.
- the first to-be-processed image is a high dynamic range image
- the second target image is a standard dynamic range image
- the first conversion function includes an S-type conversion curve
- the second transfer function includes a high dynamic range electro-optic transfer function
- the third transfer function includes a standard dynamic range photoelectric conversion function.
- the second to-be-processed image is a standard dynamic range image
- the first target image is a high dynamic range image
- the first conversion function includes an inverse S-type conversion curve
- the fourth transfer function includes a high dynamic range photoelectric conversion function
- the fifth transfer function includes a standard dynamic range electro-optic transfer function.
- the standard dynamic range electro-optical conversion function includes a BT.1886 electro-optic conversion function
- the standard dynamic range photoelectric conversion function includes a BT.1886 photoelectric conversion function
- the first to-be-processed image is a first high dynamic range image
- the first target image is a second high dynamic range image
- a dynamic range of the first high dynamic range image is The dynamic range of the second high dynamic range image is different
- the first conversion function includes an S-type conversion curve or an inverse S-type conversion curve.
- the second target image is a third high dynamic range image
- the second conversion function includes a high dynamic range electro-optical conversion function for converting an image conforming to the high dynamic image standard followed by the second high dynamic range image
- the third transfer function includes a high dynamic range photoelectric conversion function for converting an image conforming to a high dynamic image standard followed by the third high dynamic range image.
- the second to-be-processed image is a fourth high dynamic range image
- the high dynamic image standard followed by the fourth high dynamic range image and the fourth high dynamic range image is not
- the fifth conversion function includes a high dynamic range electro-optical conversion function for converting an image conforming to a high dynamic image standard followed by the fourth high dynamic range image
- the fourth transfer function includes a high dynamic range photoelectric conversion function for converting an image conforming to the high dynamic image standard followed by the first high dynamic range image.
- the high dynamic range electro-optical conversion function comprises: a PQ electro-optical conversion function, an HLG electro-optical conversion function or an SLF electro-optical conversion function.
- the high dynamic range photoelectric conversion function comprises: a PQ photoelectric conversion function, an HLG photoelectric conversion function or an SLF photoelectric conversion function.
- the first to-be-processed image is located in the first image sequence to be processed, and the first target image is located in the first target image sequence, and the determining the first conversion module is specifically configured to: Obtaining the dynamic parameter according to at least one of the following information: the first to-be-processed image or the statistical information of the first to-be-processed image sequence; the first to-be-processed image or the first to-be-processed image sequence a first reference value; the first to-be-processed image or the first to-be-processed image sequence range second reference value; the first target image or the first target image sequence range first reference value; The first target image or the first target image sequence ranges a second reference value.
- the statistical information of the first to-be-processed image or the first to-be-processed image sequence includes at least one of the following information: the first to-be-processed image or the first At least one of the pixels of the sequence of images to be processed constitutes a maximum, minimum, average, standard deviation, and histogram distribution information of the nonlinear primary color values or linear primary color values of the components.
- the first to-be-processed image or the first to-be-processed image sequence range first reference value includes: a brightness maximum value of a display device for displaying the first to-be-processed image Or, according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence, Finding the first preset list, and obtaining the first look-up table value; or, the first preset value.
- the first to-be-processed image or the first to-be-processed image sequence range second reference value includes: a minimum brightness of a display device for displaying the first to-be-processed image Or a second look-up table value obtained by searching the second preset list according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence; or a second preset value.
- the first target image or the first target image sequence range first reference value includes: a brightness maximum value of a display device used to display the first target image; or The third preset value.
- the first target image or the first target image sequence range second reference value includes: a brightness minimum value of a display device used to display the first target image; or The fourth preset value.
- the S-type conversion curve is a curve in which the slope first rises and then falls.
- the S-type conversion curve includes one or more segments of the curve.
- the S-type conversion curve has the following form:
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L' is the converted value, the a, b,
- the p and m parameters are dynamic parameters of the S-type conversion curve.
- the p and m parameters are obtained by searching for a third preset list according to statistical information of the first to-be-processed image or the image sequence of the first to-be-processed image;
- the L 1 is a first reference value of the image sequence range of the first to-be-processed image or the first to-be-processed image
- the L 2 is the first to-be-processed image or the first to-be-processed a second reference value of the image sequence range in which the image is located
- the L′ 1 being a first reference value of the first target image or the first target image sequence range
- the L′ 2 is the first target image or The first target image sequence ranges a second reference value.
- the S-type conversion curve form is composed of the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is a maximum value of nonlinear primary color values of all constituent components of each pixel point of the first image to be processed, and the L′ is a conversion value;
- the L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve, and the L 0 , L′ 0 , K 0 represent the first segment curve
- the L 1 , L′ 1 , and k 1 represent the input value, the output value, and the slope of the connection point of the first segment and the second segment;
- the L 2 , L′ 2 , k 2 represents an input value, an output value, and a slope of the end point of the second segment of the curve;
- the k 0 , k 1 , k 2 satisfy K 0 ⁇ k 1 , and k 1 >k 2 .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameter is determined according to the first to-be-processed image or the first to-be-processed image
- the statistical information of the sequence is obtained by searching for the fourth preset list.
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , k 0 , k 1 , k 2 parameters are statistical information according to the first to-be-processed image or the first to-be-processed image sequence , obtained by finding the fifth preset list.
- the L' 1 parameter is calculated by the following formula:
- the inverse S-type conversion curve is a curve in which the slope first drops and then rises.
- the inverse S-type conversion curve includes one or more segments of the curve.
- the inverse S-type conversion curve has the following form:
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L' is the converted value, the a, b,
- the p and m parameters are dynamic parameters of the inverse S-type conversion curve.
- the p and m parameters are obtained by finding a sixth preset list; the a and b parameters are calculated by the following formula:
- the L 1 is a first reference value of the image sequence range of the first to-be-processed image or the first to-be-processed image
- the L 2 is the first to-be-processed image or the first to-be-processed a second reference value of the image sequence range in which the image is located
- the L′ 1 being a first reference value of the first target image or the first target image sequence range
- the L′ 2 is the first target image or The first target image sequence ranges a second reference value.
- the inverse S-type conversion curve form is composed of the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is a maximum value of nonlinear primary color values of all constituent components of each pixel point of the first image to be processed, and the L′ is a conversion value;
- the L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve, and the L 0 , L′ 0 , K 0 represent the first segment curve
- the L 1 , L′ 1 , and k 1 represent the input value, the output value, and the slope of the connection point of the first segment and the second segment;
- the L 2 , L′ 2 , k 2 denotes an input value, an output value, and a slope of the end point of the second segment of the curve;
- the k 0 , k 1 , k 2 satisfy k 0 >k 1 , and k 1 ⁇ k 2 .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameter is determined according to the first to-be-processed image or the first to-be-processed image
- the statistical information of the sequence is obtained by searching for the seventh preset list.
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , k 0 , k 1 , k 2 parameters are statistical information according to the first to-be-processed image or the first to-be-processed image sequence , obtained by finding the eighth preset list.
- the L' 1 parameter is calculated by the following formula:
- a third aspect of the embodiments of the present invention provides an image processing method for processing an HDR image into an SDR image.
- the method first determining an electrical signal value of all constituent components of each pixel point of the HDR image The maximum value is obtained and the dynamic parameters of the S-type conversion curve are obtained. Using the acquired dynamic parameters, the maximum value of the electrical signal values of all constituent components of each pixel of the HDR image is converted according to the S-type conversion curve, and the conversion of each pixel point is obtained.
- the S-type conversion curve is a function of converting a maximum value of electrical component values of all constituent components of any pixel point of the HDR image according to the dynamic parameter, and obtaining a maximum value corresponding to each pixel point and converting
- the ratio of the converted value corresponding to each pixel point is calculated, and the dynamic range reduction adjustment is performed on all constituent components of each pixel point of the HDR image according to the calculated ratio.
- the sigmoid curve represents a curve whose curve shape is “S”, that is, a curve in which the slope of the curve first rises and then falls; then, according to the HDR electro-optical conversion function, the target image information, that is, each pixel point including the HDR image, is reduced in dynamic range.
- the image information of all the adjusted electrical signal values is converted to obtain optical signal values of all constituent components of each pixel of the SDR image, and finally, all constituent components of the respective pixel points of the SDR image according to the SDR photoelectric conversion function
- the optical signal values are converted to obtain electrical signal values of all constituent components of the respective pixel points of the SDR image.
- the HDR image is processed.
- the static parameters that are no longer fixed are utilized, that is, the dynamic parameters are used, and the dynamic compression processing of the image is performed according to the S-type conversion curve, compared with the existing
- the SDR image display effect is consistent with the HDR image display effect, and the contrast change is reduced. The probability of a problem such as loss of detail, thereby reducing the impact on the display of the image.
- the HDR image is located in the HDR image sequence
- the SDR image is located in the SDR image sequence
- the dynamic parameter of the S-type conversion curve is obtained, specifically, the dynamic parameter is obtained according to at least one of the following information: HDR Statistic information of an image or HDR image sequence; HDR image or HDR image sequence range first reference value; HDR image or HDR image sequence range second reference value; SDR image or SDR image sequence range first reference value; SDR image or SDR image Sequence range second reference value.
- the dynamic parameters of the S-type conversion curve are obtained according to at least one of the above information, and the implementability of the solution is enhanced.
- the statistical information of the HDR image includes at least one of the following information:
- At least one of the pixel values of the HDR image or the HDR image sequence constitutes a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information among the electrical signal values of the components;
- the specific information of the statistical information of the HDR image or the HDR image sequence is given, which improves the diversity of the scheme and the implementability.
- the above constituent components include an R component, a G component, a B component, or a Y component.
- the HDR image or the HDR image sequence ranges from the first reference value, which may be, but is not limited to, the brightness maximum value of the reference HDR display device, or the statistical information according to the HDR image or the HDR image sequence.
- the first look-up table value obtained by searching the first preset list, or the first preset value.
- the HDR image or the HDR image sequence range second reference value may refer to, but is not limited to, the minimum brightness of the reference HDR display device, or the statistical information according to the HDR image or the HDR image sequence.
- the second look-up table value obtained by searching the second preset list, or the second preset value.
- the SDR image or the SDR image sequence ranges from the first reference value, which may be, but is not limited to, the brightness maximum value of the reference SDR display device, or a third preset value.
- the second reference value of the SDR image or the SDR image sequence range it may mean, but is not limited to, the minimum value of the brightness of the reference SDR display device, or the fourth preset value.
- the HDR image or HDR image sequence range first reference value, the HDR image or HDR image sequence range second reference value, the SDR image or the SDR image sequence range first reference value, the SDR image or the SDR image are given.
- Some preferred values of the second reference value of the sequence range enhance the implementation of the scheme.
- the S-type conversion curve may be a curve in which the slope first rises and then falls.
- the S-type conversion curve may be a curve including one or more segments of the curve, and the slope first rises and then falls.
- the trend trend of the slope of the S-type conversion curve in the embodiment of the present invention is specifically given.
- the S-type conversion curve form adopts a curve form corresponding to the following formula:
- L is the maximum value of the electrical signal values of all constituent components of each pixel of the HDR image
- L' is the output value, that is, the converted value obtained by substituting L into the above formula
- the m parameter is a dynamic parameter of the S-type conversion curve.
- the p and m parameters are parameters obtained by searching for the third preset list
- the a and b parameters are obtained by solving the equations, and the equations are as follows:
- L 1 is the first reference value of the HDR image or HDR image sequence range
- L 2 is the second reference value of the HDR image or the HDR image sequence range
- L′ 1 is the SDR image or the SDR image sequence range first reference value
- L′ 2 is the second reference value of the SDR image or SDR image sequence range.
- the S-type conversion curve form may also adopt a curve form corresponding to the following two-stage function:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is the maximum value of the electrical signal values of all constituent components of each pixel of the HDR image
- L' is the constituent component of each pixel point.
- the maximum value of the electrical signal values is substituted into the conversion values corresponding to the respective pixel points obtained by the above formula; L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 , and k 2
- L 0 , L′ 0 , and k 0 respectively represent the input and output values and the slope of the starting point of the first segment of the curve; L 1 , L′ 1 , and k 1 represent the first segment and the second segment, respectively.
- the input value, output value, and slope of the segment curve connection point; L 2 , L′ 2 , and k 2 respectively represent the input value, output value, and slope of the end point of the second segment curve; wherein k 0 , k 1 , and k 2 satisfy k 0 ⁇ k 1 >k 2 .
- L 0 is a first reference value of an HDR image or HDR image sequence range
- L 2 is a second reference value of an HDR image or an HDR image sequence range
- L′ 0 is an SDR image or an SDR image sequence range
- L' 2 is a second reference value of the SDR image or the SDR image sequence range
- the L 1 , L' 1 , k 0 , k 1 , k 2 parameters are statistical information according to the HDR image or the HDR image sequence, Obtained by finding the fourth preset list.
- L 0 is a first reference value of an HDR image or HDR image sequence range
- L 2 is a second reference value of an HDR image sequence range
- L′ 0 is an SDR image or an SDR image sequence range
- L' 2 is the SDR image or the second reference value of the SDR image sequence range, that is, the L 0 , L′ 0 , L′ 2 , and L 2 parameters are acquired in the same manner as the above implementation
- L 1 ,k The 0 , k 1 , k 2 parameters are obtained by searching the fourth preset list according to the statistical information of the HDR image or the HDR image sequence, that is, the L 1 , k 0 , k 1 , k 2 parameters compared with the above implementation.
- the acquisition method is also the same, but the L′ 1 parameter is different from the above implementation L′ 1 and the above implementation.
- the L′ 1 parameter is calculated by the following formula:
- the dynamic range reduction adjustment is performed on all constituent components of each pixel point, and specifically may refer to multiplying the ratio by the electrical signals of all constituent components of each pixel point.
- the value is obtained as an electrical signal value obtained by reducing the dynamic range of all constituent components of any pixel.
- a fourth aspect of the embodiments of the present invention provides an image processing method for processing an SDR image into an HDR image, in which, by acquiring an electrical signal value of all constituent components of each pixel of the SDR image, Obtaining electrical signal values of all constituent components of each pixel of the SDR image, and acquiring dynamic parameters of the inverse S-type conversion curve, and then electro-opticizing the electrical signal values of all constituent components of each pixel of the SDR image according to the SDR electro-optical conversion function Converting, obtaining optical signal values corresponding to all constituent components of each pixel of the SDR image, and photoelectrically converting the optical signal values of all constituent components of each pixel of the SDR image according to the HDR photoelectric conversion function to obtain target image information, that is,
- the optical signal value of all constituent components of the SDR image is converted by the HDR photoelectric conversion function, wherein the inverse S-shaped curve represents a curve whose curve shape is inverted "S", that is, the slope of the curve first decreases and then rises.
- a method for processing an SDR image into an HDR image is proposed.
- the static parameter is changed by using the dynamic parameter, and the dynamic stretching process of the image is performed according to the inverse S-type conversion curve.
- the static parameter is used in the embodiment of the present invention. It can effectively ensure the consistency of the SDR image display effect and the HDR image display effect after the dynamic range adjustment, and reduce the probability of occurrence of contrast change and detail loss, thereby reducing the influence on the display effect of the image.
- the SDR image is located in the SDR image sequence
- the HDR image is located in the HDR image sequence
- acquiring the dynamic parameter of the inverse S-type conversion curve includes: obtaining the dynamic parameter according to at least one of the following information: the SDR image Statistics or SDR image sequence statistics, SDR image or SDR image sequence range first reference value; SDR image or SDR image sequence range second reference value; HDR image or HDR image sequence range first reference value; HDR image or The HDR image sequence ranges from the second reference value.
- the dynamic parameter of the inverse S-type conversion curve is obtained according to at least one of the above information.
- the dynamic parameters of the inverse S-type conversion curve may be acquired according to other information. Enhance the implementation and diversity of the program.
- the statistical information of the SDR image includes at least one of the following information:
- At least one of the pixel points of the SDR image or the SDR image sequence constitutes a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information among the electrical signal values of the components.
- the specific information of the statistical information of the SDR image or the SDR image sequence is given, which improves the diversity and implementability of the solution.
- the constituent components include an R component, a G component, and a B component, or a Y component.
- the HDR image or HDR image sequence range first reference value may refer to, but is not limited to, the brightness maximum value of the reference HDR display device, or the first preset value, for the HDR image range or HDR
- the second sequence of image sequence ranges may refer to, but is not limited to, a minimum value of the brightness of the reference HDR display device, or a second preset value.
- the SDR image or the SDR image sequence range second reference value may refer to, but is not limited to, the brightness maximum value of the reference SDR display device, or according to the SDR image or The statistical information of the SDR image sequence is obtained by searching the fifth preset list, or the third preset value.
- the SDR image or the SDR image sequence range second reference value may refer to, but is not limited to, the minimum value of the brightness of the reference SDR display device, or the statistical information according to the SDR image or the SDR image sequence. Find the third look-up table value obtained by the sixth preset list, or the fourth preset value.
- the SDR image or the SDR image sequence range first reference value, the SDR image or the SDR image sequence range second reference value, the HDR image or the HDR image sequence range first reference value, the HDR image or the HDR image are given.
- Some preferred values of the second reference value of the sequence range enhance the implementation of the scheme.
- the inverse S-type conversion curve is a curve in which the slope first drops and then rises.
- the inverse S-type conversion curve includes one or more segments of the curve.
- the inverse S-type conversion curve form adopts the curve form corresponding to the following formula:
- L is a maximum value of electrical signal values of all constituent components of each pixel point of the target image information
- L' is a converted value
- a, b, p, and m parameters are inverse S-type conversion curves Dynamic parameters.
- the above p and m parameters are parameters obtained by searching for the seventh preset list, and the a and b parameters are calculated by the following equations:
- L 1 is the first reference value of the SDR image or the SDR image sequence range
- L 2 is the second reference value of the SDR image or the SDR image sequence range
- L′ 1 is the HDR image or the HDR image sequence range
- a reference value, L' 2 is the second reference value of the HDR image or HDR image sequence range.
- the inverse S-type conversion curve form may also adopt a curve form corresponding to the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is the maximum value of the electrical signal values of all constituent components of each pixel of the target image information, L' converted value;
- L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the inverse S-type conversion curve,
- L 0 , L′ 0 , k 0 represent the input, output value and slope of the starting point of the first segment of the curve;
- L 1 , L′ 1 , k 1 represent The input value, output value, and slope of the connection point between the first segment and the second segment;
- L 2 , L′ 2 , and k 2 represent the input value, output value, and slope of the end point of the second segment of the curve;
- k 0 , k 1 , k 2 satisfies k 0 >k 1 ⁇ k 2 .
- L 0 is the first reference value of the SDR image or SDR image sequence range
- L 2 is the second reference value of the SDR image or SDR image sequence range
- L′ 0 is the HDR image or HDR image sequence range.
- L' 2 is a second reference value of the HDR image or HDR image sequence range
- L 1 , L′ 1 , k 0 , k 1 , k 2 are obtained by searching according to statistical information of the SDR image or the SDR image sequence
- the eighth preset list is obtained.
- L 0 is a first reference value of an SDR image or an SDR image sequence range
- L 2 is a second reference value of an SDR image or an SDR image sequence range
- L′ 0 is an HDR image or an HDR image sequence range
- L' 2 is a second reference value of the HDR image or HDR image sequence range
- L 1 , k 0 , k 1 , k 2 parameters are determined by statistical information according to the HDR image or the HDR image sequence, by searching for the eighth pre- The list is obtained in the same way
- the L' 1 parameter is calculated by the following formula:
- the dynamic range of all the constituent components of the corresponding pixel points of the target image information is dynamically expanded and adjusted, specifically:
- the ratio of each pixel of the target image information is multiplied by the electrical signal value of all the constituent components of the pixel corresponding to the target image information, and finally the electrical signal value of all the components of the HDR image whose pixel points are expanded by the dynamic range is obtained.
- a fifth aspect of the embodiments of the present invention provides a computer storage medium, wherein the computer storage medium stores program code for indicating execution of the methods in the first aspect, the third aspect, and the fourth aspect.
- a sixth aspect of the embodiments of the present invention provides an image processing apparatus including a processor and a memory coupled to the processor, the processor being configured to perform the methods of the first aspect, the third aspect, and the fourth aspect.
- an image processing method is proposed.
- the dynamic parameters are no longer fixed, and the dynamic range adjustment can be effectively ensured.
- the image display consistency is achieved, and the probability of occurrence of contrast changes and loss of detail is reduced, thereby reducing the influence on the display effect of the image.
- FIG. 1 is a schematic diagram of an application scenario for image processing according to an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart diagram of an embodiment of an image processing method according to an embodiment of the present disclosure
- FIG. 3 is a schematic diagram of an S-type conversion curve according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of an S-type conversion curve composed of two-segment curves according to an embodiment of the present invention
- FIG. 5 is a schematic diagram of an inverse S-type conversion curve according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of an inverse S-type conversion curve composed of a 2-segment curve according to an embodiment of the present invention
- FIG. 7 is a schematic diagram of a dynamic adjustment process of a first image to be processed to a first target image according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of an embodiment of an image processing apparatus according to an embodiment of the present invention.
- FIG. 9 is a schematic diagram of another embodiment of an image processing apparatus according to an embodiment of the present invention.
- Embodiments of the present invention provide an image processing method and apparatus for effectively ensuring consistency of display effects after dynamic range adjustment, reducing the probability of occurrence of contrast changes, loss of detail, and the like, thereby reducing display of images.
- the effect of the effect is a condition in which display effects are displayed.
- the display device also has an HDR display device and an SDR display device with different display capabilities, in order to realize the image in the SDR display device and have Compatible display on HDR display devices with different display capabilities, and effectively ensure that the image display effect is consistent, that is, no contrast changes Problems such as loss of detail and details, thereby reducing the impact on the display of images.
- an image processing method is proposed. In the image conversion process, the static parameters are no longer fixed, but the image conversion is performed by using a preset conversion curve according to the dynamic parameters. Dynamic range images are better compatible with display devices with different display capabilities.
- FIG. 1 shows a common application scenario of a method of image processing.
- the image processing apparatus may perform specified image processing on the input image to be processed, and output the processed target image.
- a pixel is the basic unit that constitutes an image.
- the color of a pixel is usually described by several (exemplary, for example, three) relatively independent attributes. These independent attributes combine to form a spatial coordinate, that is, a color space.
- the independent attributes constituting the pixel points are referred to as constituent components of each pixel point.
- the constituent component may be an image color component, such as an R component, a G component, a B component, or a Y component.
- a value corresponding to a particular image color component is referred to as the primary color value of the constituent component.
- the primary color values have different forms of existence, such as: linear primary color values, which are proportional to the light intensity, and whose values are normalized to [0, 1], also known as optical signal values, where 1 represents the highest display brightness, using different transitions.
- function 1 is different.
- 1 means the highest display brightness of 10000 nits.
- SLF transfer function means the highest display brightness of 10000 nits.
- HLG transfer function means the highest display brightness.
- the nonlinear primary color value is the normalized digital representation of the image information, and its value is normalized to [0, 1], also known as the electrical signal value. There is a conversion relationship between the linear primary color value and the nonlinear primary color value.
- an Optical-Electro Transfer Function OETF
- an electro-optical transfer function Electric-Optical Transfer Function (EOTF)
- EOTF electro-optical transfer function
- the commonly used SDR photoelectric transfer function includes the International Telecommunications Union-Radio Communications Sector (ITU-R) BT.1886 photoelectric conversion function; correspondingly, the SDR electro-optical conversion function includes the ITU-R BT.1886 electro-optic conversion function.
- Commonly used HDR photoelectric conversion functions may include, but are not limited to, the following functions: perceptual quantification (perceptual quantizer, PQ) photoelectric conversion function, hybrid gamma (Hybrid Log-Gamma, HLG) photoelectric conversion function, Scene Luminance Fidelity (SLF) photoelectric conversion function.
- the HDR electro-optical conversion function may specifically include, but is not limited to, the following functions: a PQ electro-optical conversion function, an HLG electro-optical conversion function, and an SLF electro-optical conversion function.
- the PQ photoelectric/electro-optic conversion function (also called PQ conversion curve) is defined by the SMPTE2084 standard
- the HLG photoelectric/electro-optical conversion function (also called HLG). Conversion curve)
- a high dynamic image standard definition is proposed by the BBC and NHK. It should be understood that, exemplarily, the image converted via the PQ conversion curve follows the SMPTE 2084 standard, and the image converted via the HLG conversion curve follows the HLG standard.
- the data converted using the PQ conversion curve is exemplified as the optical/electrical signal value of the PQ domain;
- the converted data using the HLG conversion curve is called the light of the HLG domain.
- the converted data using the SLF conversion curve called the optical/electrical signal value of the SLF domain.
- FIG. 2 is a schematic flow chart of an embodiment 10 of an image processing method according to an embodiment of the present invention, including:
- all constituent components of each pixel of the first image to be processed refer to components related to the luminance in the pixel.
- the first image to be processed may specifically refer to an image of a specific color space, for example, may be an RGB color space, or an image of a YUV, YCrCb color space.
- the first image to be processed is an image of an RGB color space
- all constituent components of each pixel of the image include an R component, a G component, and a B component.
- the skilled person can know that the R component, the G component, and the B component are used to represent the luminance of each color component of the image, and therefore, determining the nonlinear primary color value of all constituent components of each pixel of the first image to be processed, that is, The R component, the G component, and the nonlinear primary color value of the B component of each pixel of the input image are acquired.
- the R component, the G component, the B component, and the Y component are all related to the brightness of the HDR image, and therefore, the nonlinear primary color value of all constituent components of each pixel of the first image to be processed is determined, that is, It means that the nonlinear primary color values of the R component, the G component, the B component, and the Y component of each pixel of the input image can be acquired.
- the first image to be processed is an image of a YUV color space
- all constituent components of each pixel of the image include a Y component, a U component, and a V component
- the U component and The V component is independent of the brightness of the image
- the Y component is related to the brightness of the image
- the nonlinear primary color value of all constituent components of each pixel of the first image to be processed is determined, that is, the Y component of each pixel of the input image.
- the nonlinear primary color value is a normalized digital expression value of the image information
- the nonlinear primary color value of the above image is the image signal value after the linear signal value is converted by the photoelectric conversion function.
- the first image to be processed is represented by an RGB color space as an example for description.
- the nonlinear primary colors of all constituent components of each pixel of the first image to be processed are determined pixel by pixel.
- the maximum value of the value that is, each pixel point will obtain a corresponding maximum value.
- the maximum value of the nonlinear primary color value of the component is the maximum value of the nonlinear primary color value of the applicable constituent component.
- the pixel of the first image to be processed includes a pixel point k, wherein the R component of the pixel point k has a nonlinear primary color value of 0.5, the G component has a nonlinear primary color value of 0.6, and the B component has a nonlinear primary color value of 0.7. That is, 0.7 is determined as the maximum value among the three components of the pixel point k, wherein the nonlinear primary color value is represented by a normalization manner, and the maximum value is 1 and the minimum value is 0.
- the first transfer function may be an S-type conversion curve or an inverse S-type conversion curve.
- the HDR image to SDR image conversion needs to be implemented by using the embodiment of the present invention, and the first conversion function selects an S-type conversion curve;
- the SDR image to the HDR image is converted by using the embodiment of the present invention, and the first conversion function selects the inverse S-type conversion curve;
- the first conversion function selects an S-type conversion curve or an inverse S-type conversion curve.
- determining the dynamic parameter of the first transfer function comprises: obtaining a dynamic parameter according to at least one of the following information: statistical information of the first image to be processed; first reference value of the first image to be processed; a second reference value of the image range to be processed; a first reference image range first reference value; and a first target image range second reference value.
- the above information further includes: statistical information of a sequence of the first image to be processed; and a first reference value of the sequence range of the first image to be processed; a second reference value of the sequence range of the first image to be processed; a first reference value of the sequence range in which the first target image is located; and a second reference value of the sequence range in which the first target image is located.
- the statistical information of the sequence of the first to-be-processed image or the first to-be-processed image specifically refers to information related to the first to-be-processed image or the first to-be-processed image sequence attribute, for example, including at least the following One of the information:
- At least one of the pixels of the first to-be-processed image or the first image to be processed constitutes a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information among the nonlinear primary color values of the components.
- At least one of the first to-be-processed image or the pixel of the first to-be-processed image constitutes a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information among the linear primary color values of the components.
- the foregoing statistical information includes a first to-be-processed image or a first to-be-processed
- the luminance component (Y component) of the pixel of the image is at least one of a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information of the nonlinear primary color value.
- the information related to the first to-be-processed image or the first to-be-processed image sequence attribute may refer to other information, for example, the first to-be-processed image or the first to-be-processed.
- Information such as the variance of the nonlinear primary color values of the constituent components of the image, or a certain functional relationship between the above-listed information is used as statistical information. For example, it may refer to the sum of the average value and the standard deviation of the first to-be-processed image or the first to-be-processed image sequence, which is not limited herein.
- the average value of the first image to be processed or the first image sequence to be processed may specifically refer to:
- the average of the R component linear primary color values of the first to-be-processed image or the first set of image sequences to be processed or the average of the G-component linear primary color values, or the average of the B-component linear primary color values, or Y The average of the component linear primary color values.
- the corresponding non-linear primary color value or the average value of the linear primary color value may specifically have various situations, and the above-mentioned exemplary color space is The RGB color space and the YUV color space are described as an example, and other color spaces are not described again.
- the first to-be-processed image or the first to-be-processed image sequence range first reference value may include:
- a brightness maximum value of the display device for displaying the first image to be processed, wherein the display device is pre-configured and is subjectively selected by a person, and is used for displaying the first image to be processed when determining the dynamic parameter of the first transfer function display screen.
- the first preset value for example, the first preset value is set to 0.85 or 0.53.
- the first preset list manner obtains the first reference value of the first to-be-processed image range, as follows:
- the HDR image to the SDR image is converted by using the embodiment of the present invention.
- the first image to be processed is an HDR image
- the statistical information of the first image to be processed is the average of the first image to be processed.
- the sum of the value and the standard deviation is taken as an example.
- the first look-up table value is obtained by searching the first preset list according to the statistical information of the first to-be-processed image, that is, the first reference value of the first to-be-processed image range. Description is made, wherein the list information of the first preset list is as shown in Table 1:
- the first reference value of the first image to be processed is 0.92; when the average of the first image to be processed is When the sum between the value and the standard deviation is less than 0.2, the first reference value of the first image to be processed is 0.85; when the sum of the average value of the first image to be processed and the standard deviation is between 0.2 and 0.5
- the value of the first reference value of the first to-be-processed image range may be obtained by interpolation according to the data 0.2 and 0.5. When between 0.5 and 0.7, interpolation may also be used, wherein Interpolation methods such as linear interpolation and weighted average interpolation are obtained, which are not limited herein and will not be described again.
- the SDR image to the HDR image is converted by using the embodiment of the present invention.
- the first image to be processed is an SDR image
- the statistical information of the first image to be processed is the average of the first image to be processed.
- the sum of the value and the standard deviation is taken as an example.
- the first look-up table value is obtained by searching the first preset list according to the statistical information of the first to-be-processed image, that is, the first reference value of the first to-be-processed image range. Description is made, wherein the list information of the first preset list is as shown in Table 2:
- the first reference value of the first image to be processed is taken as 0.58; when the average of the first image to be processed is When the sum between the value and the standard deviation is less than 0.2, the first reference value of the first image to be processed is 0.53; when the sum of the average value of the first image to be processed and the standard deviation is between 0.2 and 0.5
- the value of the first reference value of the first to-be-processed image range may be obtained by interpolation according to the data 0.2 and 0.5. When between 0.5 and 0.7, interpolation may also be used, wherein Interpolation methods such as linear interpolation and weighted average interpolation are obtained, which are not limited herein and will not be described again.
- the HDR image between different dynamic ranges needs to be converted by using the embodiment of the present invention.
- the first image to be processed is an HDR image
- the statistical information of the first image to be processed is the first image to be processed.
- the sum of the average value and the standard deviation is used to obtain the first look-up table value by searching the first preset list according to the statistical information of the first image to be processed, that is, the first image to be processed is first.
- the reference value is described, wherein the list information of the first preset list is as shown in Table 3:
- the first reference value of the first image to be processed takes 0.90; when the average of the first image to be processed When the sum between the value and the standard deviation is less than 0.2, the first reference value of the first image to be processed takes 0.82; when the sum of the average value of the first image to be processed and the standard deviation is between 0.2 and 0.5
- the value of the first reference value of the first to-be-processed image range may be obtained by interpolation according to the data 0.2 and 0.5. When between 0.5 and 0.7, interpolation may also be used, wherein Interpolation methods such as linear interpolation and weighted average interpolation are obtained, which are not limited herein and will not be described again.
- Tables 1-3 are pre-configured lists, and the data in Tables 1-3 are the optimal parameters obtained from human subjective empirical data.
- Table 1-3 only takes the statistical information of the first image to be processed as the sum of the average value of the first image to be processed and the standard deviation as an example, and the first waiting is adopted.
- the first reference value of the first to-be-processed image range is obtained by the method of searching for the other statistical information of the image, or by using the statistical information of the first image sequence to be processed, which is not limited herein and will not be described again.
- the first to-be-processed image or the first to-be-processed image sequence range second reference value may include:
- the display device is pre-configured and is subjectively selected by a person, and is used to display the first image to be processed when determining the dynamic parameter of the first transfer function. display screen.
- the second preset value for example, the first preset value is set to 0.05 or 0.12.
- the second reference value of the first image to be processed is obtained by searching the second preset list by using the first to-be-processed image or the statistical information of the first image sequence to be processed.
- the HDR image to the SDR image is converted by using the embodiment of the present invention.
- the first image to be processed is an HDR image
- the statistical information of the first image to be processed is the average of the first image to be processed.
- the difference between the value and the standard deviation is obtained by using a preset lookup table according to the statistical information of the first image to be processed, that is, the second reference value of the first image to be processed is described.
- the list information of the second preset list is as shown in Table 4:
- the second reference value of the first image to be processed is taken as 0.01; when the average of the first image to be processed is When the sum between the value and the standard deviation is less than 0.1, the second reference value of the first image to be processed is taken as 0; when the sum between the average value of the first image to be processed and the standard deviation is between 0.1 and 0.2 , then
- the value of the second reference value of the image range to be processed can be obtained by interpolation according to 0.1 and 0.2.
- the interpolation can be obtained by interpolation, such as linear interpolation and weighted average interpolation, which is not limited herein, and will not be repeated here.
- the SDR image to the HDR image is converted by using the embodiment of the present invention.
- the first image to be processed is an SDR image
- the statistical information of the first image to be processed is the average of the first image to be processed.
- the difference between the value and the standard deviation is obtained by using a preset lookup table according to the statistical information of the first image to be processed, that is, the second reference value of the first image to be processed is described.
- the list information of the second preset list is as shown in Table 5:
- the second reference value of the first image to be processed is taken as 0.15; when the average of the first image to be processed is When the sum between the value and the standard deviation is less than 0.1, the second reference value of the first image to be processed is 0.1; when the sum of the average value of the first image to be processed and the standard deviation is between 0.1 and 0.2
- the value of the second reference value of the first image to be processed may be obtained by interpolation according to 0.1 and 0.2.
- the interpolation can be obtained by interpolation, such as linear interpolation and weighted average interpolation, which is not limited herein, and will not be repeated here.
- the HDR image between different dynamic ranges needs to be converted by using the embodiment of the present invention.
- the first image to be processed is an HDR image
- the statistical information of the first image to be processed is the first image to be processed.
- the difference between the average value and the standard deviation is obtained by using a preset lookup table according to the statistical information of the first image to be processed, that is, the second reference value of the first image to be processed range. Description is made, wherein the list information of the second preset list is as shown in Table 6:
- the second reference value of the first image to be processed is taken as 0.012; when the average of the first image to be processed is When the sum between the value and the standard deviation is less than 0.1, the second reference value of the first image to be processed is taken as 0.005; when the sum between the average value of the first image to be processed and the standard deviation is between 0.1 and 0.2
- the value of the second reference value of the first image to be processed may be obtained by interpolation according to 0.1 and 0.2.
- the interpolation can be obtained by interpolation, such as linear interpolation and weighted average interpolation, which is not limited herein, and will not be repeated here.
- Tables 4-6 are pre-configured lists, and the data in Tables 4-6 are the optimal parameters obtained from human subjective empirical data.
- Table 4-6 only takes the statistical information of the first image to be processed as the difference between the average value of the first image to be processed and the standard deviation as an example, and the other images of the first image to be processed are used.
- the second reference value of the first to-be-processed image range may be obtained by means of a look-up table, which is not limited herein and will not be described again.
- the first target image or the first target image sequence range first reference value may include:
- a brightness maximum value of a display device for displaying a first target image wherein the display device is pre-configured and is subjectively selected by a human, and is used as a display device for displaying a first target image when determining a dynamic parameter of the first transfer function .
- the third preset value for example, the third preset value is set to 0.53 or 0.85.
- the first target image or the first target image sequence range second reference value may include:
- the display device is pre-configured and is subjectively selected by a person, and is used as a display device for displaying the first target image when determining a dynamic parameter of the first transfer function .
- the fourth preset value for example, the fourth preset value is set to 0.12 or 0.05.
- step 104 the actual first conversion function will be taken as an example to introduce the acquisition method of the dynamic parameters of the first conversion function. See step 104 for details.
- step 103 there is no timing relationship between steps 102 and 103, and step 103 may be performed first, and then step 102 is performed.
- each pixel of the first image to be processed may be used according to the first transfer function.
- the maximum value is converted to obtain a conversion value corresponding to each pixel point of the first image to be processed, that is, each pixel point in the first image to be processed corresponds to a maximum value and a conversion value.
- the first transfer function is an S-type conversion curve.
- the S-type conversion curve in the embodiment of the present invention is a curve in which the slope first rises and then falls, as shown in FIG. 3, and FIG. 3 shows that the slope first rises in the embodiment of the present invention.
- FIG. 3 shows that the slope first rises in the embodiment of the present invention.
- the S-type conversion curve in the embodiment of the present invention may also be a curve including one or more segments of the curve and the slope first rises and then falls.
- FIG. 4 is a schematic diagram of an S-type conversion curve composed of a 2-segment curve in the embodiment of the present invention.
- black dots indicate the connection points of the two segments of the curve.
- S-type conversion curve can take the following form of curve:
- L is the maximum of the non-linear primary color values of all constituent components of the first image to be processed, that is, the conversion of each pixel point of each pixel in the first image to be processed
- L′ is the conversion corresponding to each pixel point.
- the values, a, b, p, and m parameters are dynamic parameters of the S-type conversion curve, wherein the p and m parameters are used to control the shape of the curve and the degree of curvature of the curve, and the a and b parameters are used for the range of the curve, that is, the starting point of the curve. The location of the end point.
- the p and m parameters can be obtained in various ways, which are respectively described below:
- the statistical information of the first image to be processed or the first image sequence to be processed is described by taking the average value of the nonlinear primary color values of the Y channel of the first image sequence to be processed as an example.
- the average value of the nonlinear primary color values of the Y channel of the first image sequence to be processed is y, and the information of the third preset list is as shown in Table 3 below:
- the p parameter is 3.2
- the m parameter is 2.4
- the p parameter is 6.0
- the m parameter is taken as 2.2; when y is between 0.55 and 0.6, the p and m parameters can be obtained by interpolation.
- the interpolation method may use any manner, such as linear interpolation, weighted average interpolation, and the like, which is not limited herein.
- p is taken as an example.
- y is between 0.55 and 0.6
- the p-parameter can be obtained by linear interpolation as follows:
- Table 7 is a pre-configured list, and the data in Table 7 is the optimal parameters obtained from human subjective empirical data.
- Table 7 only takes the statistical information of the first image sequence to be processed as the average value y of the nonlinear primary color values of the Y channel of the first image sequence to be processed as an example, by using the first image to be processed or
- the p and m parameters can also be obtained by means of a table lookup, which is not limited herein, and will not be described again.
- the p, m parameters are jointly determined according to performance parameters of the first target image display device, such as gamma values, and statistical information of the first image to be processed or the first image sequence to be processed.
- the gamma value of the first target image display device may be determined first, and the gamma gamma value of the first target image display device may be referred to as an m parameter, wherein the exemplary SDR display device has a Gamma of 2.4, ie, The m parameter can be taken as 2.4; and the p parameter is obtained by looking up the above table 3.
- the p-m parameter corresponding to the color information such as color, saturation and contrast of the first target image and the acquired first image to be processed is manually adjusted by the color-adjusting personnel. , receiving the p and m parameters adjusted by the coloring staff.
- the L 1 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or the first to-be-processed image sequence a second reference value
- the L′ 1 is the first target image or the first target image sequence range first reference value
- the L′ 2 is the first target image or the first target The image sequence ranges from the second reference value.
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is the maximum of the nonlinear primary color values of all constituent components of each pixel of the first image to be processed, and L' is the converted value corresponding to each pixel;
- L 0 , L 1 , L 2 , l′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve, and L 0 , L′ 0 , k 0 represent the first segment The input, output value, and slope of the starting point of the curve; L 1 , L′ 1 , and k 1 represent the input value, output value, and slope of the connection point of the first segment and the second segment; L 2 , L′ 2 , and k 2 represent the first The input value, output value, and slope of the end point of the two-segment curve; k 0 , k 1 , and k 2 satisfy k 0 ⁇ k 1 and k 1 >k 2 . That is, the S-type conversion curve in the second mode is guaranteed to be a curve in which the slope first rises and then falls.
- L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- L 2 is the first to-be-processed image or the first to-be-processed image sequence range second reference value
- L′ 0 is the first a target image or a first target image sequence range first reference value
- L' 2 being a first target image or a first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameters are obtained by searching the fourth and fifth preset lists according to the statistical information of the first to-be-processed image or the first to-be-processed image sequence.
- the fourth preset list includes the table 4 and the fifth preset list includes the table 5.
- the following table 8 can be obtained, where the first image to be processed or
- the statistical information of the first image sequence to be processed is an example of the average value of the nonlinear primary color values of the Y channel of the first image sequence to be processed, and the average of the nonlinear primary color values of the Y channel of the first image sequence to be processed is assumed here. If the value is y, the corresponding list information is as follows in Table 8:
- L′ 1 it can be obtained by looking up Table 9, where the statistical information of the first image to be processed or the first image sequence to be processed is the sum of the mean and standard deviation of the Y-path nonlinear primary color of the first image to be processed. For example, it is assumed that the average value and the standard deviation of the first image to be processed are x, as shown in Table 9 below:
- L′ 1 can be obtained by a preset calculation formula in addition to the manner of looking up the table.
- L′ 1 can be obtained by the following formula:
- the S-type conversion curve can be used to process the maximum value of the nonlinear primary color value of all constituent components of each pixel of the first image to be processed, and the S-type conversion curve is
- the maximum value of the nonlinear primary color values of all constituent components of each pixel of the first image to be processed can be substituted into the formulas shown in the first method and the second method. Convert the value.
- the first transfer function is an inverse S-type conversion curve.
- the inverse S-type conversion curve in the embodiment of the present invention is a curve in which the slope first rises and then rises, as shown in FIG. 5, and FIG. 5 shows a slope decrease in the embodiment of the present invention.
- FIG. 5 shows a slope decrease in the embodiment of the present invention.
- the inverse S-type conversion curve in the embodiment of the present invention may be a curve including one or more segments of the curve, and the slope first decreases and then rises, as shown in FIG. 6,
- FIG. 6 is an embodiment of the present invention.
- a schematic diagram of the inverse S-type conversion curve composed of two segments of curves, and black dots indicate the connection points of the two segments.
- L is the most nonlinear non-linear primary color value of all constituent components of each pixel of the target image information.
- L' is the maximum value after conversion
- a, b, p and m parameters are dynamic parameters of the inverse S-type conversion curve
- p and m parameters are used to control the shape of the curve and the degree of bending of the curve
- the a and b parameters are used.
- the range of the curve that is, the start point of the curve and the position of the end point.
- the p and m parameters can be described in various ways, which are respectively described below:
- the gamma value of the first target image display device can be selected as the m parameter, and the p parameter is obtained by looking up the above table 3.
- L 1 is a first reference image or a first reference value of the first image sequence to be processed
- L 2 is a first reference image or a second reference value of the first image sequence to be processed
- L′ 1 is an output.
- a target image range is a first reference value
- L' 2 is a second reference value for outputting the first target image range.
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is the maximum of the nonlinear primary color values of all constituent components of each pixel of the target image information, and L' is a converted value
- L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are inverse S-type conversion curve dynamic parameters
- L 0 , L′ 0 , k 0 represent The input, output value, and slope of the starting point of the first segment of the curve
- L 1 , L′ 1 , and k 1 represent the input value, output value, and slope of the connection point of the first segment and the second segment
- L 2 , L′ 2 , k 2 represents the input value, output value, and slope of the end point of the second segment of the curve
- k 0 , k 1 , k 2 satisfy k 0 >k 1 , and k 1 ⁇ k 2 , that is, the inverse S type in the second mode is guaranteed
- the conversion curve is a curve in which the slope first drops and then rises.
- L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- L 2 is the first to-be-processed image or the first to-be-processed image sequence range second reference value
- L′ 0 is a first target image or a first target image sequence range first reference value
- L′ 2 is a first target image or a first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameters are obtained by searching the seventh and eighth preset lists according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence.
- the seventh preset list includes a table 11 and the eighth preset list includes a table 12.
- L 1 , k 0 , k 1 , k 2 it can be obtained by looking up the following table 11, where the statistical information of the first image to be processed or the first image sequence to be processed is the first image to be processed or the first to be processed.
- the average value of the nonlinear primary color values of the Y channel of the image sequence is described as an example.
- the average value of the nonlinear primary color values of the Y channel of the first image to be processed or the first image sequence to be processed is y, as shown in Table 11 below. Shown as follows:
- L′ 1 it can be obtained by looking up the table 12 , where the statistical information of the first to-be-processed image or the first image sequence to be processed is the average value and standard deviation of the first to-be-processed image or the first to-be-processed image sequence.
- the sum between the two is described as an example.
- L' 1 can be obtained by a preset calculation formula in addition to the table lookup method.
- L' 1 can be obtained by the following formula:
- the inverse S-type conversion curve can be used to process the maximum value of the nonlinear primary color value of all constituent components of each pixel of the first image to be processed, and the inverse S-type is processed.
- the conversion curve is an inverse S-type conversion curve described in the first mode and the second mode, and the maximum value of the nonlinear primary color values of all constituent components of each pixel of the first image to be processed can be substituted into the first mode and the second mode. The formula to get the converted value.
- the ratio of the converted value of each pixel of the first image to be processed to the corresponding maximum value may be calculated.
- the dynamic range adjustment of the nonlinear primary color values of all constituent components of each pixel point is adjusted according to the ratio
- the dynamic range adjustment is performed on the nonlinear primary color values of all constituent components of each pixel point according to the above ratio.
- the product of the ratio and the nonlinear primary color values of all constituent components of each pixel is separately calculated to obtain a nonlinear primary color value of all the constituent components of each pixel.
- FIG. 7 is a schematic diagram of a dynamic adjustment process of the first image to be processed to the first target image in the embodiment of the present invention:
- the maximum value MAX of the nonlinear primary color values of all constituent components of each pixel of the first image to be processed may be obtained point by point, that is, the R corresponding to each pixel point.
- the MAX value of each pixel is processed by the first conversion function to obtain the MAX2 value of each pixel, and the ratio of the MAX2 value of each pixel to the corresponding MAX value is calculated, and finally The ratio is multiplied by the nonlinear primary color values of the R component, the G component, and the B component of the corresponding pixel of the first image to be processed, and finally the nonlinearity of all constituent components of each pixel of the first image to be processed is adjusted by the dynamic range. Base color value.
- the first image to be processed is an RGB format image.
- the first image to be processed is an image of another color space, for example, an image corresponding to the YUV color space, all constituent components are applicable.
- the nonlinear primary color value only contains the nonlinear primary color value of the Y component, and the maximum value of the obtained nonlinear primary color value is also the nonlinear primary color value of the Y component.
- dynamic compression processing in addition to multiplying the ratio by the nonlinear primary color values of the R component, the G component, and the B component of each pixel of the input image, dynamic compression processing may be performed, and other dynamic compression processing methods may be performed according to the ratio.
- the display device of the first target image is not limited, as long as it can perform dynamic range reduction or enlargement adjustment processing on all the constituent components of the pixel of the first image to be processed, and finally can be better compatible with the display of the first target image.
- the image conversion process uses no more static parameters, but uses a preset conversion curve to implement image conversion according to the dynamic parameters.
- the images of different dynamic ranges are better compatible with different display capabilities. display screen.
- the method further includes:
- the HDR image to the SDR image is converted by using the embodiment of the present invention, and the target image information can be electrically and optically converted according to the HDR electro-optical conversion function to obtain all constituent components of each pixel of the SDR image.
- the target image information includes a nonlinear primary color value of all constituent components of each pixel of the first image to be processed that has undergone dynamic range reduction adjustment.
- the HDR image is converted by using the embodiment of the present invention.
- the first target image may be an HDR image obtained by converting the first conversion curve defined by the first standard.
- the second conversion function is a first conversion curve defined by the first standard. That is, according to the first conversion curve, the nonlinear primary color value of all constituent components of each pixel point of the first target image is converted into the first The linear primary color values of all constituent components of the corresponding pixel points of the two target images.
- the PQ conversion curve converts the nonlinear primary color value of the pixel of the first target image of the PQ domain into the linear primary color value of the pixel of the second target image.
- the conversion curve defined by the high dynamic range image standard includes, but is not limited to, a PQ conversion curve, an SLF conversion curve, and an HLG conversion curve, which are not limited.
- the method further includes:
- the HDR image to SDR image conversion needs to be implemented by using the embodiment of the present invention, and the linear primary color value of all constituent components of each pixel of the SDR image is photoelectrically converted according to the SDR photoelectric conversion function to obtain an output SDR image.
- the nonlinear primary color values of all the constituent components of each pixel can finally be output to the SDR display device for display.
- the HDR image is converted by using the embodiment of the present invention.
- the second target image may be an HDR image obtained by converting the second conversion curve defined by the second standard.
- the third conversion function is a second conversion curve defined by the second standard. That is, according to the second conversion curve, the linear primary color values of all the constituent components of each pixel point of the second target image are converted into the nonlinear primary color values of all the constituent components of the corresponding pixel points of the second target image.
- the HLG conversion curve converts the linear primary color value of the pixel of the second target image into the nonlinear primary color value of the pixel of the second target image of the HLG domain.
- the conversion curve defined by the high dynamic range image standard includes, but is not limited to, a PQ conversion curve, an SLF conversion curve, and an HLG conversion curve, which are not limited.
- the method further includes:
- the color space corresponding to the nonlinear primary color value of the second target image is converted into the color space of the second target image display device.
- the color space corresponding to the nonlinear primary color value of the second target image is the BT.2020 color space
- the output second target image display device is the BT.709 color space
- the color space is converted from BT.2020 to BT. 709 color space color space, and then step 308 of the above embodiment 12 is performed.
- the consistency between the target image display effect and the first image to be processed is consistently ensured after the dynamic range adjustment, and the probability of occurrence of contrast change, detail loss, and the like is reduced, thereby reducing the display of the image.
- the effect of the effect is consistently ensured after the dynamic range adjustment, and the probability of occurrence of contrast change, detail loss, and the like is reduced, thereby reducing the display of the image.
- the method before step 101 of the above embodiment 10, the method further includes:
- the SDR image to the HDR image is converted by using the embodiment of the present invention. After the values of all the constituent components of each pixel of the SDR image are obtained, each pixel of the SDR image is obtained according to the HDR photoelectric conversion function. The values of all the constituent components of the point are photoelectrically converted to obtain target image information, which is a nonlinear primary color value corresponding to the value of the SDR image after being converted by the HDR photoelectric conversion function.
- the HDR image is converted by using the embodiment of the present invention.
- the first image to be processed is an HDR image obtained by converting the first conversion curve defined by the first standard.
- the fourth conversion function is a first conversion curve defined by the first standard. That is, according to the first conversion curve, the linear primary color values of all constituent components of each pixel of the second image to be processed are converted into nonlinear primary color values of all constituent components of the corresponding pixel of the first image to be processed.
- the PQ conversion curve converts the linear primary color value of the pixel of the second image to be processed into a nonlinear primary color of the pixel of the first image to be processed in the PQ domain. value.
- the conversion curve defined by the high dynamic range image standard includes, but is not limited to, a PQ conversion curve, an SLF conversion curve, and an HLG conversion curve, which are not limited.
- the method further includes:
- the SDR image to the HDR image is converted by using the embodiment of the present invention. After the nonlinear primary color values of all the constituent components of each pixel of the SDR image are acquired, according to the SDR electro-optical conversion function, It performs electro-optic conversion to obtain values of all constituent components of each pixel of the SDR image.
- the HDR image is converted by using the embodiment of the present invention.
- the second image to be processed is an HDR image obtained by converting the second conversion curve defined by the second standard.
- the fifth conversion function is a second conversion curve defined by the second standard. That is, according to the fifth conversion curve, the nonlinear primary color values of all the constituent components of each pixel point of the second target image are converted into the linear primary color values of all constituent components of the corresponding pixel points of the second target image.
- the HLG conversion curve converts the nonlinear primary color value of the pixel of the second target image of the HLG domain into the linear primary color value of the pixel of the second target image.
- the conversion curve defined by the high dynamic range image standard includes, but is not limited to, a PQ conversion curve, an SLF conversion curve, and an HLG conversion curve, which are not limited.
- the method further includes:
- the color space of the first image to be processed is converted into the color space of the second image display device to be processed.
- the color space of the first image to be processed is the BT.709 color space
- the second image processing device to be processed is the color space of BT.2020
- the color space is converted from the BT.709 color space to the BT.2020 color space, after which Step 510 of the above embodiment 14 is performed again.
- the consistency between the target image display effect and the first image to be processed is consistently ensured after the dynamic range adjustment, and the probability of occurrence of contrast change, detail loss, and the like is reduced, thereby reducing the display of the image.
- the effect of the effect is consistently ensured after the dynamic range adjustment, and the probability of occurrence of contrast change, detail loss, and the like is reduced, thereby reducing the display of the image.
- HDR input signal sources include linear EXR format HDR image data in floating point or semi-floating point, HDR image data acquired in PQ or Slog-3 (acquisition mode), and SLF HDR image data input.
- the conversion of the linear primary color values (R, G, B) to the PQ domain nonlinear primary color values (R', G', B') follows the following formula:
- the conversion of the non-linear primary color values of the pixels of the HDR input image to the linear primary color values is achieved.
- HDR input signal sources include linear EXR format HDR image data in floating point or semi-floating point, HDR image data acquired in PQ or Slog-3 (acquisition mode), and SLF HDR image data input.
- the conversion from the nonlinear primary color value of Slog-3 to the nonlinear primary color value of the SLF domain includes:
- the conversion from the nonlinear primary color value of the PQ domain to the nonlinear primary color value of the SLF domain includes:
- the conversion from the nonlinear primary color value of the SLF domain to the linear primary color value includes:
- an adjustment of the HDR nonlinear primary color value by the SDR compatible display is achieved, including:
- the HDR nonlinear primary color values are processed by the SDR display compatible module to obtain SDR nonlinear primary color values to ensure that the SDR nonlinear primary color values are correctly displayed on the SDR device.
- Display compatible modules include dynamic range adjustment, color adjustment, nonlinear linearity, and ITU-R BT.1886 EOTF inverse conversion.
- the SDR display compatible dynamic range adjustments include:
- the dynamic range adjustment process performs dynamic range adjustment on the input HDR nonlinear signals R', G', and B' based on the dynamic metadata to obtain signals R1, G1, and B1 suitable for the SDR dynamic range.
- the embodiment of the invention generates a dynamic range adjustment curve according to the dynamic metadata, takes the maximum value of the HDR nonlinear signal as a reference value and adjusts the dynamic range thereof, calculates the ratio before and after the adjustment of the reference value as the adjustment coefficient c, and applies the adjustment coefficient to HDR nonlinear signal.
- the function of the curve dynamic range adjustment parameter is to adjust the dynamic range of the HDR nonlinear signal, including but not limited to the HDR nonlinear signal in the SLF domain and the HDR nonlinear signal in the PQ domain.
- the specific expressions of the dynamic range adjustment parameters of the SLF domain and the PQ domain are slightly different. Because there is a good correspondence between the HDR nonlinear signal in the SLF domain and the HDR nonlinear signal in the PQ domain, it is easy to adjust the dynamic range of the SLF domain.
- the parameters derive their corresponding PQ domain dynamic range adjustment parameters.
- the formula corresponding to the dynamic range adjustment curve of the SLF domain is as follows.
- the parameters p, m are used to control the shape of the curve and the degree of bending, and are generated according to the dynamic metadata; the parameters a, b are used to control the range of the curve, that is, the position of the starting point and the ending point.
- the parameter p and the average value y in the image dynamic metadata wherein the correspondence of the key points of the segment is as follows.
- the p parameter When the average value y is greater than 0.6, the p parameter is 3.2; when the average value is less than 0.1, the p parameter is 6.0; when the average value is between adjacent two items in the table, the parameter p can be obtained by linear interpolation.
- the parameter p can be obtained by linear interpolation as follows:
- the parameter m is the gamma value of the output SDR display device, typically 2.4.
- the parameters a and b can be calculated by solving the following equations:
- L1 is the HDR image nonlinear reference maximum value
- L2 is the HDR image nonlinear reference minimum value
- L1' is the SDR image nonlinear reference maximum value
- L2' is the SDR image nonlinear reference minimum value.
- L1 and L2 are calculated from the average value Y and the standard deviation V in the dynamic metadata.
- L1 When Y+V is greater than 0.7, then L1 is 0.92; when Y+V is less than 0.2, then L1 is 0.85; when Y+V is between two adjacent data in the table, then L1 can be linearly interpolated. Way to get.
- L2 when YV is greater than 0.35, then L2 is 0.01; when YV is less than 0.1, then L2 is 0; when YV is between two adjacent data in the table, then L2 can be linearized. Interpolation is obtained.
- L1' and L2' are obtained by the HDR linear rotation nonlinear transformation by the display maximum brightness and minimum brightness of the output SDR device.
- a common SDR display device has a maximum display brightness of 300 nits and a minimum display brightness of 0.1 nit, and its corresponding nonlinear value L1' is 0.64 and L2' is 0.12.
- the SDR display compatible color adjustments include:
- the color adjustment processes the dynamic range-adjusted HDR nonlinear signals R1, G1, and B1 based on the dynamic metadata and the adjustment coefficient c, and obtains the processed HDR nonlinear signals R2, G2, and B2.
- the luminance value Y1 of the image is calculated according to the HDR nonlinear signal values R1, G1, and B1, and the calculation method refers to the Rec. 709 and Rec. 2020 luminance calculation methods.
- the coefficient d is 0.15.
- the coefficient d is 0.25.
- the average value y is between two table values, it can be calculated by linear interpolation. Obtain the coefficient d.
- the correspondence of the key points of the segment is as follows:
- the coefficient e when the average value y is less than 0.1, the coefficient e can be taken as 1.2; when the average value y is greater than 0.6, the coefficient e can be taken as 0.2, when the average value y is between two adjacent data in the table. Then, the coefficient e can be obtained by linear interpolation.
- an adjustment of the HDR nonlinear primary color value by the HDR compatible display is achieved, including:
- the HDR nonlinear signals R', G', B' are subjected to display adaptation processing to obtain HDR nonlinear signals R", G", B" to ensure that HDR nonlinear signals can be correctly displayed on different HDR devices.
- HDR display compatible The adjustment module includes dynamic range adjustment and color adjustment.
- the dynamic range adjustment process uses the method described in Embodiment 19, except that L1', L2' are obtained by the HDR linear rotation nonlinear transformation by the display maximum brightness and minimum brightness of the output HDR device.
- the coefficients p and m need to be obtained through the lookup table in the embodiment 19 of the image dynamic metadata, and the contents of the entry need to be obtained through experimental calibration according to different HDR display devices.
- the color range adjustment process uses the method described in Embodiment 19, except that the coefficients d and e need to be obtained through the lookup table through the image dynamic metadata, and the contents of the entry need to be obtained through experimental calibration according to different HDR display devices.
- FIG. 8 is a block diagram of an apparatus 21 for providing an image processing apparatus according to an embodiment of the present invention, including:
- the first determining module 2101 is configured to determine a maximum value of the nonlinear primary color values of all the constituent components of each pixel of the first image to be processed, specifically for performing the methods of steps 101 and 102 in the embodiment 10, no longer Narrative
- the second determining module 2102 is configured to determine a dynamic parameter of the first transfer function, and is specifically used to perform the method in step 103 in Embodiment 10, and details are not described herein;
- the first conversion module 2103 is configured to convert the maximum value of each pixel point into a conversion value according to the first conversion function after determining the dynamic parameter, specifically for performing step 104 in Embodiment 10 Method, no longer repeat;
- the calculation module 2104 is configured to calculate a ratio of the converted value and the maximum value of each of the pixel points, and is specifically used to perform the method in step 105 in Embodiment 10, and details are not described herein.
- the adjusting module 2105 is configured to perform dynamic range adjustment on the nonlinear primary color values of all constituent components of each pixel point according to the ratio, to obtain non-component components of each corresponding pixel of the first target image. Linear primary color value.
- the adjusting module 2105 is specifically configured to: when the image dynamic range of the first to-be-processed image is greater than an image dynamic range of the first target image, according to the ratio, Performing a reduction dynamic range adjustment of the nonlinear primary color values of all the constituent components of each pixel; or, when the image dynamic range of the first to-be-processed image is smaller than the image dynamic range of the first target image, And according to the ratio, the dynamic range adjustment of the nonlinear primary color values of all the constituent components of each of the pixel points is performed.
- the adjusting module 2105 is further configured to: respectively calculate a product of the ratio and a nonlinear primary color value of all constituent components of each pixel, to obtain each of the The nonlinear primary color value of all of the adjusted components of the pixel. Specifically, the method for performing step 106 in Embodiment 10 is not described again.
- the constituent component includes an R component, a G component, a B component, or a Y component.
- the apparatus further includes: a second conversion module 2106, configured to, according to the second transfer function, a nonlinear primary color value of all constituent components of each pixel of the first target image Converted to a linear primary color value of all constituent components of corresponding pixel points of the second target image.
- a second conversion module 2106 configured to, according to the second transfer function, a nonlinear primary color value of all constituent components of each pixel of the first target image Converted to a linear primary color value of all constituent components of corresponding pixel points of the second target image.
- the device further includes: a third conversion module 2107, configured to: And converting, according to the third transfer function, linear primary color values of all constituent components of the corresponding pixel points of the second target image into nonlinear primary color values of all constituent components of the corresponding pixel points of the second target image.
- a third conversion module 2107 configured to: And converting, according to the third transfer function, linear primary color values of all constituent components of the corresponding pixel points of the second target image into nonlinear primary color values of all constituent components of the corresponding pixel points of the second target image.
- the apparatus further includes: a fourth conversion module 2108, configured to convert, according to the fourth conversion function, a linear primary color value of all constituent components of each pixel of the second image to be processed into A non-linear primary color value of all constituent components of the corresponding pixel of the first image to be processed.
- a fourth conversion module 2108 configured to convert, according to the fourth conversion function, a linear primary color value of all constituent components of each pixel of the second image to be processed into A non-linear primary color value of all constituent components of the corresponding pixel of the first image to be processed.
- the apparatus further includes: a fifth conversion module 2109, configured to, according to the fifth transfer function, a nonlinear primary color of all constituent components of each pixel of the second image to be processed The value is converted to a linear primary color value of all constituent components of corresponding pixel points of the second image to be processed.
- a fifth conversion module 2109 configured to, according to the fifth transfer function, a nonlinear primary color of all constituent components of each pixel of the second image to be processed The value is converted to a linear primary color value of all constituent components of corresponding pixel points of the second image to be processed.
- the first to-be-processed image is a high dynamic range image
- the second target image is a standard dynamic range image
- the first conversion function includes an S-type conversion curve
- the second transfer function includes a high dynamic range electro-optic transfer function
- the third transfer function includes a standard dynamic range photoelectric conversion function.
- the second to-be-processed image is a standard dynamic range image
- the first target image is a high dynamic range image
- the first conversion function includes an inverse S-type conversion curve
- the fourth transfer function includes a high dynamic range photoelectric conversion function
- the fifth transfer function includes a standard dynamic range electro-optic transfer function.
- the standard dynamic range electro-optical conversion function comprises a BT.1886 electro-optical conversion function comprising a BT.1886 photoelectric conversion function.
- the first to-be-processed image is a first high dynamic range image
- the first target image is a second high dynamic range image
- a dynamic range of the first high dynamic range image is The dynamic range of the second high dynamic range image is different
- the first conversion function includes an S-type conversion curve or an inverse S-type conversion curve.
- the second target image is a third high dynamic range image
- the high dynamic image standard of the second high dynamic range image and the third high dynamic range image are different.
- the second conversion function includes a high dynamic range electro-optical conversion function for converting an image conforming to a high dynamic image standard followed by the second high dynamic range image;
- the triple transfer function includes a high dynamic range photoelectric conversion function, the high dynamic The state range photoelectric conversion function is used to convert an image conforming to the high dynamic image standard followed by the third high dynamic range image.
- the second to-be-processed image is a fourth high dynamic range image
- the high dynamic image standard followed by the fourth high dynamic range image and the fourth high dynamic range image is not
- the fifth conversion function includes a high dynamic range electro-optical conversion function for converting an image conforming to a high dynamic image standard followed by the fourth high dynamic range image
- the fourth transfer function includes a high dynamic range photoelectric conversion function for converting an image conforming to the high dynamic image standard followed by the first high dynamic range image.
- the high dynamic range electro-optical conversion function comprises: a PQ electro-optical conversion function, an HLG electro-optical conversion function or an SLF electro-optical conversion function.
- the high dynamic range photoelectric conversion function comprises: a PQ photoelectric conversion function, an HLG photoelectric conversion function or an SLF photoelectric conversion function.
- the first to-be-processed image is located in a first image sequence to be processed
- the first target image is located in a first target image sequence
- the determining first conversion module 2103 is specifically used to Obtaining the dynamic parameter according to at least one of the following information: the first to-be-processed image or the statistical information of the first to-be-processed image sequence; the first to-be-processed image or the first to-be-processed image a sequence reference first reference value; the first to-be-processed image or the first to-be-processed image sequence range second reference value; the first target image or the first target image sequence range first reference value; The first target image or the first target image sequence ranges a second reference value.
- the statistical information of the first to-be-processed image or the first to-be-processed image sequence includes at least one of the following information: the first to-be-processed image or the first to-be-processed At least one of the pixel points of the processed image sequence constitutes a maximum value, a minimum value, an average value, a standard deviation, and a histogram distribution information of the nonlinear primary color value or the linear primary color value of the component.
- the first to-be-processed image or the first to-be-processed image sequence range first reference value includes: a brightness maximum value of a display device for displaying the first to-be-processed image Or, according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence, searching for the first preset list, the obtained first look-up table value; or, the first preset value.
- the first to-be-processed image or the first to-be-processed image sequence range second reference value includes: a brightness of a display device for displaying the first to-be-processed image And a second look-up value obtained by searching the second preset list according to the first to-be-processed image or the statistical information of the first to-be-processed image sequence; or a second preset value.
- the first target image or the first target image sequence range first reference value includes: a brightness maximum value of a display device for displaying the first target image; or The third preset value.
- the first target image or the first target image sequence range second reference value includes: a brightness minimum value of a display device for displaying the first target image; or The fourth preset value.
- the S-type conversion curve is a curve in which the slope first rises and then falls.
- the S-type conversion curve comprises one or more segments of the curve.
- the S-type conversion curve has the following form:
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L' is the converted value, the a, b,
- the p and m parameters are dynamic parameters of the S-type conversion curve.
- the p and m parameters are obtained by searching for a third preset list according to statistical information of the first to-be-processed image or the image sequence of the first to-be-processed image;
- the b parameter is calculated by the following formula:
- the L 1 is a first reference value of the image sequence range of the first to-be-processed image or the first to-be-processed image
- the L 2 is the first to-be-processed image or the first to-be-processed a second reference value of the image sequence range in which the image is located
- the L′ 1 being a first reference value of the first target image or the first target image sequence range
- the L′ 2 is the first target image or The first target image sequence ranges a second reference value.
- the S-type conversion curve form is composed of the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L′ is a converted value;
- the L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve, and the L 0 , L′ 0 , K 0 represents the input, output value, and slope of the starting point of the first segment of the curve; the L 1 , L′ 1 , and k 1 represent the input value, the output value, and the slope of the connection point of the first segment and the second segment; L 2 , L 2 , and k 2 represent input values, output values, and slopes of the end points of the second segment of the curve; the k 0 , k 1 , and k 2 satisfy k 0 < k 1 , and k 1 > k 2 .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameters are obtained by searching for a fourth preset list according to statistical information of the first to-be-processed image or the first to-be-processed image sequence. .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , k 0 , k 1 , k 2 parameters are obtained by searching for a fifth preset list according to statistical information of the first to-be-processed image or the first to-be-processed image sequence.
- the L' 1 parameter is calculated by the following formula:
- the inverse S-type conversion curve is a curve in which the slope first drops and then rises.
- the inverse S-type conversion curve includes one or more segments of the curve.
- the inverse S-type conversion curve has the following form:
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L' is the converted value, the a, b,
- the p and m parameters are dynamic parameters of the inverse S-type conversion curve.
- the p and m parameters are obtained by searching for a sixth preset list
- the L 1 is a first reference value of the image sequence range of the first to-be-processed image or the first to-be-processed image
- the L 2 is the first to-be-processed image or the first to-be-processed a second reference value of the image sequence range in which the image is located
- the L′ 1 being a first reference value of the first target image or the first target image sequence range
- the L′ 2 is the first target image or The first target image sequence ranges a second reference value.
- the inverse S-type conversion curve form is composed of the following two functions:
- L' (2t 3 -3t 2 +1)L' 0 +(t 3 -2t 2 +t)(L 1 -L 0 )k 0 +(-2t 3 +3t 2 )L' 1 +(t 3 -t 2 )(L 1 -L 0 )k 1 ;
- L' (2t 3 -3t 2 +1)L' 1 +(t 3 -2t 2 +t)(L 2 -L 1 )k 1 +(-2t 3 +3t 2 )L' 2 +(t 3 -t 2 )(L 2 -L 1 )k 2 ;
- L is a maximum value of nonlinear primary color values of all constituent components of each of the pixel points of the first image to be processed, and the L′ is a converted value;
- the L 0 , L 1 , L 2 , L′ 0 , L′ 1 , L′ 2 , k 0 , k 1 and k 2 are dynamic parameters of the S-type conversion curve, and the L 0 , L′ 0 , K 0 represents the input, output value, and slope of the starting point of the first segment of the curve; the L 1 , L′ 1 , and k 1 represent the input value, the output value, and the slope of the connection point of the first segment and the second segment; L 2 , L′ 2 , and k 2 represent input values, output values, and slopes of the end points of the second segment of the curve; the k 0 , k 1 , and k 2 satisfy k 0 > k 1 , and k 1 < k 2 .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , L′ 1 , k 0 , k 1 , k 2 parameters are obtained by searching for a seventh preset list according to statistical information of the first to-be-processed image or the first to-be-processed image sequence. .
- the L 0 is the first to-be-processed image or the first to-be-processed image sequence range first reference value
- the L 2 is the first to-be-processed image or said first sequence of images to be processed a second reference value range
- said L '0 is the first object of the target image or the first image sequence a first reference value range
- said L' 2 is the first target An image or the first target image sequence range second reference value
- the L 1 , k 0 , k 1 , k 2 parameter is obtained by searching for an eighth preset list according to statistical information of the first to-be-processed image or the first to-be-processed image sequence.
- the L' 1 parameter is calculated by the following formula:
- the consistency between the target image display effect and the first image to be processed is consistently ensured after the dynamic range adjustment, and the probability of occurrence of contrast change, detail loss, and the like is reduced, thereby reducing the display of the image.
- the effect of the effect is consistently ensured after the dynamic range adjustment, and the probability of occurrence of contrast change, detail loss, and the like is reduced, thereby reducing the display of the image.
- FIG. 9 a schematic structural diagram of another embodiment 22 of the image processing apparatus provided by the embodiment of the present application is provided. , including: processor 2201, memory 2202, a communication interface 2203, wherein the processor 2201, the memory 2202, and the communication interface 2203 are connected by a bus 2204.
- the image processing device 2200 may generate a relatively large difference depending on configuration or performance, such as may include one or more processors 2201 (eg, one or more processors) and a memory 2202 for storing program code 2205 and The data 2206, when the program code 2205 is executed by the processor 2201, may implement the method described in Embodiment 1 or Embodiment of the present application.
- processors 2201 eg, one or more processors
- the data 2206 when the program code 2205 is executed by the processor 2201, may implement the method described in Embodiment 1 or Embodiment of the present application.
- the terminal device structure shown in FIG. 9 does not constitute a limitation on the terminal device, and may include more or less components than those illustrated, or combine some components, or different component arrangements. This application does not limit anything.
- the processor 2201 involved in the foregoing device embodiment may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
- the processor 2201 may further include a hardware chip, and may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
- the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
- the embodiment of the invention is not limited in any way.
- the processor 2201 is configured to perform the steps in the method embodiments 10 to 20. For details, refer to the descriptions in the foregoing method embodiments 10 to 20, and details are not described herein again.
- the memory 2202 may include a volatile memory, such as a random-access memory (RAM); the memory may also include a non-volatile memory, such as a flash memory ( A flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 2202 may also include a combination of the above types of memories.
- the memory is used to store data or information when the image processing apparatus 2200 is used to execute the method described in Embodiment 1 or 2. For example, information for storing dynamic parameters of the first conversion function, etc., is used to store the first to be input. Processing the image or the first sequence of images to be processed, the first target image or the first target image sequence, etc. data 2206.
- the communication interface 2203 is configured to communicate with an external device.
- the bus 2204 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA). Bus, etc.
- PCI peripheral component interconnect
- EISA extended industry standard architecture
- the bus can also be divided into an address bus, a data bus, a control bus, and the like.
- Figure 9 is shown with only one thick line, but does not indicate that there is only one bus or one type of bus.
- the image processing apparatus 2200 may further include one or more power sources 2207, and the functions, steps, or more details of the image processing apparatus 2200 may be referred to the descriptions in the above method embodiments 10 to 20, specifically I won't go into details here.
- the disclosed systems, modules, and methods may be implemented in other manners.
- the device embodiments described above are only illustrative.
- the division of the modules is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated modules, when implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
本发明实施例实施例公开了一种图像处理方法以及装置,本发明实施例实施例方法部分包括:确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值;确定第一转换函数的动态参数;根据确定所述动态参数后的所述第一转换函数,将所述每个像素点的所述最大值转换为转换值;计算所述每个像素点的所述转换值和所述最大值的比值;根据所述比值,对所述每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
Description
本申请要求于2016年8月22日提交的申请号为PCT/CN2016/096294,发明名称为“一种图像处理方法以及装置”的PCT专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明实施例涉及到图像处理领域,尤其涉及到一种图像动态范围转换的处理方法以及装置。
光学数字成像过程是将真实场景的光辐射通过图像传感器转化为电信号,并以数字图像的方式保存下来。而图像显示的目的是通过显示设备重现一幅数字图像所描述的真实场景。两者的最终目标是使用户获得与其直接观察真实场景相同的视觉感知。
动态范围是场景中最亮物体与最暗物体之间的亮度比率,也就是图像从“最亮”到“最暗”之间灰度划分的等级数。动态范围越大,所能表示的层次越丰富,所包含的色彩空间越广。亮度是场景辐射亮度的物理测量,单位是坎德拉每平方米(cd/m2),也可以用nits表示。
长期以来,图像传感器的动态范围都很小(一般CCD传感器的动态范围不超过1000∶1),但真实场景中亮度的动态变化范围非常广,夜晚星光照射下场景的平均高度大概为0.0001cd/m2,而白天阳光照射下场景的亮度则达到了100000cd/m2。
高动态范围(High Dynamic Range,HDR)图像被用来描述真实世界场景的完整视觉范围,HDR图像能够展现可能会被传统拍摄设备丢失但却能被人类视觉系统感知的极暗和极亮区域的细节信息。一般的,把图像光信号值动态范围超过0.01到1000nits的信号称为高动态范围光信号值,图像光信息值动态范围不足0.1到400nits的信号称为标准动态范围(Standard Dynamic Range,SDR)光信号值。
对应于HDR信号和SDR信号,HDR显示设备显示能力满足HDR图像光
信号值动态范围,并且支持HDR电光转换函数,SDR显示设备显示能力满足SDR图像光信号值动态范围,并且支持SDR光电转换函数。
为了使HDR图像能够在SDR显示设备上显示,使SDR图像能够在HDR显示设备上显示,或者HDR图像在具有不同HDR显示能力的HDR显示设备上显示,并且保证显示效果一致,不出现对比度变化、细节丢失等问题,就需要进行动态范围调整处理。
以HDR转SDR动态范围调整为例,现有技术中,输入HDR图像,显示设备为SDR显示设备时,常采用以下技术方案:获得的HDR图像电信号值,通过动态范围调整,获得最终SDR图像电信号值。其中,动态范围调整所用到转换参数只和SDR显示设备的最大或者最小亮度等固定数据相关,这样的处理方法无法有效地保证动态范围调整后,SDR图像显示效果与HDR图像显示效果的一致性,会出现对比度变化、细节丢失等问题,进而影响图像的显示效果。
发明内容
本发明实施例实施例提供了一种图像处理方法以及装置,用于有效地保证动态范围调整后,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
本发明实施例第一方面提供了一种图像处理方法,包括:确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值;确定第一转换函数的动态参数;根据确定所述动态参数后的所述第一转换函数,将所述每个像素点的所述最大值转换为转换值;计算所述每个像素点的所述转换值和所述最大值的比值;根据所述比值,对所述每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
由上述描述可以知道,本发明实施例第一方面中,利用了不再是固定不变的静态参数,即利用了动态参数,根据第一转换曲线进行图像的动态压缩处理,相对于现有技术对图像进行动态范围缩小调整的过程中使用的是静态参数,本发明实施例中,可以有效地保证动态范围调整后,显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
在一种可行的实现方式中,所述根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行动态范围调整,包括:当所述第一待处理图像的图像动态范围大于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行缩小动态范围调整;或者,当所述第一待处理图像的图像动态范围小于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行扩大动态范围调整。
在一种可行的实现方式中,所述根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行动态范围调整,包括:分别计算所述比值和所述每个像素点的所述所有构成分量的非线性基色值的乘积,得到所述每个像素点的所述调整后的所有构成分量的非线性基色值。
在一种可行的实现方式中,所述构成分量包括R分量、G分量、B分量或Y分量。
在一种可行的实现方式中,所述获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值之后,还包括:根据第二转换函数,将所述第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值。
在一种可行的实现方式中,所述将所述第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值之后,还包括:根据第三转换函数,将所述第二目标图像的对应像素点的所有构成分量的线性基色值转换为所述第二目标图像的所述对应像素点的所有构成分量的非线性基色值。
在一种可行的实现方式中,所述确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值之前,还包括:根据第四转换函数,将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值。
在一种可行的实现方式中,所述将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值之前,还包括:根据第五转换函数,将所述第二待处理图像的每个像素点的所有构成分量的非线性基色值转换为所述第二待处理图像的
对应像素点的所有构成分量的线性基色值。
由上述描述可以知道,上述多种可行的实现方式丰富了本发明实施例所适用的输入、输出图像的类型,提高了方案的适用性。
在一种可行的实现方式中,所述第一待处理图像为高动态范围图像,所述第二目标图像为标准动态范围图像,包括:所述第一转换函数包括S型转换曲线;所述第二转换函数包括高动态范围电光转换函数;所述第三转换函数包括标准动态范围光电转换函数。
在一种可行的实现方式中,所述第二待处理图像为标准动态范围图像,所述第一目标图像为高动态范围图像,包括:所述第一转换函数包括反S型转换曲线;所述第四转换函数包括高动态范围光电转换函数;所述第五转换函数包括标准动态范围电光转换函数。
在一种可行的实现方式中,所述标准动态范围电光转换函数包括BT.1886电光转换函数,所述标准动态范围光电转换函数包括BT.1886光电转换函数。
在一种可行的实现方式中,所述第一待处理图像为第一高动态范围图像,所述第一目标图像为第二高动态范围图像,所述第一高动态范围图像的动态范围和所述第二高动态范围图像的动态范围不相同,包括:所述第一转换函数包括S型转换曲线或反S型转换曲线。
在一种可行的实现方式中,所述第二目标图像为第三高动态范围图像,所述第二高动态范围图像的和所述第三高动态范围图像所遵循的高动态图像标准不相同,包括:所述第二转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第二高动态范围图像所遵循的高动态图像标准的图像;所述第三转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第三高动态范围图像所遵循的高动态图像标准的图像。
在一种可行的实现方式中,所述第二待处理图像为第四高动态范围图像,所述第一高动态范围图像的和所述第四高动态范围图像所遵循的高动态图像标准不相同,包括:所述第五转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第四高动态范围图像所遵循的高动态图像标准的图像;所述第四转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第一高动态范围图像所遵循的高动
态图像标准的图像。
在一种可行的实现方式中,所述高动态范围电光转换函数包括:PQ电光转换函数,HLG电光转换函数或SLF电光转换函数。
在一种可行的实现方式中,所述高动态范围光电转换函数包括:PQ光电转换函数,HLG光电转换函数或SLF光电转换函数。
由上述描述可以知道,上述多种可行的实现方式丰富了本发明实施例所适用的输入、输出图像的类型,提高了方案的适用性。
在一种可行的实现方式中,所述第一待处理图像位于第一待处理图像序列中,所述第一目标图像位于第一目标图像序列中,所述确定第一转换函数的动态参数包括:根据以下信息中的至少一种获得所述动态参数:所述第一待处理图像或所述第一待处理图像序列的统计信息;所述第一待处理图像或所述第一待处理图像序列范围第一参考值;所述第一待处理图像或所述第一待处理图像序列范围第二参考值;所述第一目标图像或所述第一目标图像序列范围第一参考值;所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实现方式中,所述第一待处理图像或所述第一待处理图像序列的统计信息至少包括以下信息中的一种:所述第一待处理图像或所述第一待处理图像序列的像素点的至少一个构成分量的非线性基色值或线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
在一种可行的实现方式中,所述第一待处理图像或所述第一待处理图像序列范围第一参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最大值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第一预置列表,得到的第一查表值;或,第一预设值。
在一种可行的实现方式中,所述第一待处理图像或所述第一待处理图像序列范围第二参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最小值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第二预置列表,得到的第二查表值;或,第二预设值。
在一种可行的实现方式中,,所述第一目标图像或所述第一目标图像序列范围第一参考值,包括:用于显示所述第一目标图像的显示设备的亮度最大值;或,第三预设值。
在一种可行的实现方式中,,所述第一目标图像或所述第一目标图像序列范
围第二参考值,包括:用于显示所述第一目标图像的显示设备的亮度最小值;或,第四预设值。
由上述描述可以知道,上述多种可行的实现方式丰富了动态参数的选择,能够获得更适用的动态参数,提高了方案的性能。
在一种可行的实现方式中,所述S型转换曲线为斜率先上升后下降的曲线。
在一种可行的实现方式中,所述S型转换曲线包含一段或多段曲线。
在一种可行的实现方式中,所述S型转换曲线形式如下:
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为所述转换值,所述a、b、p以及m参数为所述S型转换曲线的动态参数。
在一种可行的实现方式中,所述p以及m参数由根据所述第一待处理图像或所述第一待处理图像所在图像序列的统计信息,查找第三预置列表获得;
所述a以及b参数通过以下公式计算获得:
其中,所述L1为所述第一待处理图像或所述第一待处理图像所在图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像所在图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实现方式中,所述S型转换曲线形式由如下两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L0、L1、L2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、K0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足K0<k1,且k1>k2。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第四预置列表的方式获得。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第五预置列表的方式获得。
所述L′1参数通过以下公式计算得到:
由上述描述可以知道,上述多种可行的实现方式提供了S型转换曲线作为第一转换函数,提高了方案的可实施性。
在一种可行的实现方式中,所述反S型转换曲线为斜率先下降后上升的曲线。
在一种可行的实现方式中,所述反S型转换曲线包含一段或多段曲线。
在一种可行的实现方式中,所述反S型转换曲线形式如下:
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为所述转换值,所述a、b、p以及m参数为所
述反S型转换曲线的动态参数。
在一种可行的实现方式中,所述p以及m参数由查找第六预置列表的方式获得;所述a以及b参数通过以下公式计算:
其中,所述L1为所述第一待处理图像或所述第一待处理图像所在图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像所在图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实现方式中,所述反S型转换曲线形式由如下两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、K0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0>k1,且k1<k2。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或
所述第一待处理图像序列的统计信息,通过查找第七预置列表的方式获得。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第八预置列表的方式获得。
所述L′1参数通过以下公式计算得到:
由上述描述可以知道,上述多种可行的实现方式提供了S型转换曲线作为第一转换函数,提高了方案的可实施性。
本发明实施例第二方面提供了一种图像处理装置,包括:第一确定模块,用于确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值;第二确定模块,用于确定第一转换函数的动态参数;第一转换模块,用于根据确定所述动态参数后的所述第一转换函数,将所述每个像素点的所述最大值转换为转换值;计算模块,用于计算所述每个像素点的所述转换值和所述最大值的比值;调整模块,用于根据所述比值,对所述每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
应理解本发明实施例第二方面及其各可行的实现方式和本发明实施例第一方面及对应的各实现方式的方案实现一致,对于有益效果不再赘述。
在一种可行的实现方式中,所述调整模块具体用于:当所述第一待处理图像的图像动态范围大于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行缩小动态范围调整;或者,当所述第一待处理图像的图像动态范围小于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行扩大动态范围调整。
在一种可行的实现方式中,所述调整模块具体用于:分别计算所述比值和所述每个像素点的所述所有构成分量的非线性基色值的乘积,得到所述每个像素点的所述调整后的所有构成分量的非线性基色值。
在一种可行的实现方式中,所述构成分量包括R分量、G分量、B分量或Y分量。
在一种可行的实现方式中,所述装置还包括:第二转换模块,用于根据第二转换函数,将所述第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值。
在一种可行的实现方式中,,所述装置还包括:第三转换模块,用于根据第三转换函数,将所述第二目标图像的对应像素点的所有构成分量的线性基色值转换为所述第二目标图像的所述对应像素点的所有构成分量的非线性基色值。
在一种可行的实现方式中,,所述装置还包括:第四转换模块,用于根据第四转换函数,将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值。
在一种可行的实现方式中,,所述装置还包括:第五转换模块,用于根据第五转换函数,将所述第二待处理图像的每个像素点的所有构成分量的非线性基色值转换为所述第二待处理图像的对应像素点的所有构成分量的线性基色值。
在一种可行的实现方式中,所述第一待处理图像为高动态范围图像,所述第二目标图像为标准动态范围图像,包括:所述第一转换函数包括S型转换曲线;所述第二转换函数包括高动态范围电光转换函数;所述第三转换函数包括标准动态范围光电转换函数。
在一种可行的实现方式中,所述第二待处理图像为标准动态范围图像,所述第一目标图像为高动态范围图像,包括:所述第一转换函数包括反S型转换曲线;所述第四转换函数包括高动态范围光电转换函数;所述第五转换函数包括标准动态范围电光转换函数。
在一种可行的实现方式中,所述标准动态范围电光转换函数包括BT.1886电光转换函数,所述标准动态范围光电转换函数包括BT.1886光电转换函数。
在一种可行的实现方式中,所述第一待处理图像为第一高动态范围图像,所述第一目标图像为第二高动态范围图像,所述第一高动态范围图像的动态范围和所述第二高动态范围图像的动态范围不相同,包括:所述第一转换函数包括S型转换曲线或反S型转换曲线。
在一种可行的实现方式中,所述第二目标图像为第三高动态范围图像,所述第二高动态范围图像的和所述第三高动态范围图像所遵循的高动态图像标
准不相同,包括:所述第二转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第二高动态范围图像所遵循的高动态图像标准的图像;所述第三转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第三高动态范围图像所遵循的高动态图像标准的图像。
在一种可行的实现方式中,所述第二待处理图像为第四高动态范围图像,所述第一高动态范围图像的和所述第四高动态范围图像所遵循的高动态图像标准不相同,包括:所述第五转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第四高动态范围图像所遵循的高动态图像标准的图像;所述第四转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第一高动态范围图像所遵循的高动态图像标准的图像。
在一种可行的实现方式中,所述高动态范围电光转换函数包括:PQ电光转换函数,HLG电光转换函数或SLF电光转换函数。
在一种可行的实现方式中,所述高动态范围光电转换函数包括:PQ光电转换函数,HLG光电转换函数或SLF光电转换函数。
在一种可行的实现方式中,所述第一待处理图像位于第一待处理图像序列中,所述第一目标图像位于第一目标图像序列中,所述确定第一转换模块具体用于:根据以下信息中的至少一种获得所述动态参数:所述第一待处理图像或所述第一待处理图像序列的统计信息;所述第一待处理图像或所述第一待处理图像序列范围第一参考值;所述第一待处理图像或所述第一待处理图像序列范围第二参考值;所述第一目标图像或所述第一目标图像序列范围第一参考值;所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实现方式中,,所述第一待处理图像或所述第一待处理图像序列的统计信息至少包括以下信息中的一种:所述第一待处理图像或所述第一待处理图像序列的像素点的至少一个构成分量的非线性基色值或线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
在一种可行的实现方式中,所述第一待处理图像或所述第一待处理图像序列范围第一参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最大值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,
查找第一预置列表,得到的第一查表值;或,第一预设值。
在一种可行的实现方式中,,所述第一待处理图像或所述第一待处理图像序列范围第二参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最小值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第二预置列表,得到的第二查表值;或,第二预设值。
在一种可行的实现方式中,所述第一目标图像或所述第一目标图像序列范围第一参考值,包括:用于显示所述第一目标图像的显示设备的亮度最大值;或,第三预设值。
在一种可行的实现方式中,所述第一目标图像或所述第一目标图像序列范围第二参考值,包括:用于显示所述第一目标图像的显示设备的亮度最小值;或,第四预设值。
在一种可行的实现方式中,所述S型转换曲线为斜率先上升后下降的曲线。
在一种可行的实现方式中,所述S型转换曲线包含一段或多段曲线。
在一种可行的实现方式中,所述S型转换曲线形式如下:
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为所述转换值,所述a、b、p以及m参数为所述S型转换曲线的动态参数。
在一种可行的实现方式中,所述p以及m参数由根据所述第一待处理图像或所述第一待处理图像所在图像序列的统计信息,查找第三预置列表获得;
所述a以及b参数通过以下公式计算获得:
其中,所述L1为所述第一待处理图像或所述第一待处理图像所在图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像所在图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实现方式中,所述S型转换曲线形式由如下两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、K0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足K0<k1,且k1>k2。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第四预置列表的方式获得。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第五预置列表的方式获得。
所述L′1参数通过以下公式计算得到:
在一种可行的实现方式中,所述反S型转换曲线为斜率先下降后上升的曲线。
在一种可行的实现方式中,所述反S型转换曲线包含一段或多段曲线。
在一种可行的实现方式中,所述反S型转换曲线形式如下:
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为所述转换值,所述a、b、p以及m参数为所述反S型转换曲线的动态参数。
在一种可行的实现方式中,所述p以及m参数由查找第六预置列表的方式获得;所述a以及b参数通过以下公式计算:
其中,所述L1为所述第一待处理图像或所述第一待处理图像所在图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像所在图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实现方式中,所述反S型转换曲线形式由如下两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、K0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0>k1,且k1<k2。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第七预置列表的方式获得。
在一种可行的实现方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第八预置列表的方式获得。
所述L′1参数通过以下公式计算得到:
本发明实施例第三方面提供了一种图像处理方法,该方法用于将HDR图像处理为SDR图像,在该方法中,首先确定HDR图像的各个像素点的所有构成分量的电信号值中的最大值并获取S型转换曲线的动态参数,利用获取的动态参数,根据S型转换曲线对HDR图像各个像素点的所有构成分量的电信号值中的最大值进行转换,获得各个像素点的转换值,其中,上述S型转换曲线为根据动态参数对HDR图像的任一像素点的所有构成分量的电信号值中的最大值进行转换的函数,当获得了各个像素点对应的最大值以及转换值后,计算各个像素点对应的转换值与最大值的比值,根据计算出来的比值对HDR图像各个像素点的所有构成分量进行动态范围缩小调整。其中,该S型曲线表示曲线形状为“S”的曲线,即曲线的斜率先上升而后下降的曲线;接着根据HDR电光转换函数对目标图像信息,即包含HDR图像每个像素点经过动态范围缩小调整后的所有构成分量的电信号值的图像信息进行转换,得到SDR图像的各个像素点的所有构成分量的光信号值,最后根据SDR光电转换函数对SDR图像的各个像素点的所有构成分量的光信号值进行转换,得到SDR图像的各个像素点的所有构成分量的电信号值。
由上述描述可以知道,本发明实施例第三方面中,用于将HDR图像处理
为SDR图像,在将HDR图像处理为SDR图像的过程中,利用了不再是固定不变的静态参数,即利用了动态参数,根据S型转换曲线进行图像的动态压缩处理,相对于现有技术对图像进行动态范围缩小调整的过程中使用的是静态参数,本发明实施例中,可以有效地保证动态范围调整后,SDR图像显示效果与HDR图像显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
在一种可行的实现方式中,HDR图像位于HDR图像序列中,SDR图像位于SDR图像序列中,上述获取S型转换曲线的动态参数,具体是根据以下信息中的至少一种获得动态参数:HDR图像或HDR图像序列的统计信息;HDR图像或HDR图像序列范围第一参考值;HDR图像或HDR图像序列范围第二参考值;SDR图像或SDR图像序列范围第一参考值;SDR图像或SDR图像序列范围第二参考值。
即在本实现中,具体是根据以上的至少一种信息获得S型转换曲线的动态参数,增强了方案的可实施性。
在一种可行的实现方式中,HDR图像的统计信息至少包括以下信息中的一种:
HDR图像或者HDR图像序列的像素点的至少一个构成分量的电信号值中的最大值、最小值、平均值、标准差以及直方图分布信息;
即在本实现中,给出了HDR图像或HDR图像序列的统计信息具体可以是哪些信息,提高了方案的多样性以及可实施性。
在一种可行的实现方式中,上述构成分量包括R分量、G分量、B分量,或Y分量。
在一种可行的实现方式中,HDR图像或HDR图像序列范围第一参考值,可以是指,但不局限于参考HDR显示设备的亮度最大值,或者是根据HDR图像或HDR图像序列的统计信息,通过查找第一预置列表得到的第一查表值,或者是第一预设值。
在一种可行的实现方式中,HDR图像或HDR图像序列范围第二参考值,可以是指,但不局限于参考HDR显示设备的亮度最小值,或者是根据HDR图像或HDR图像序列的统计信息,通过查找第二预置列表得到的第二查表值,或者是第二预设值。
在一种可行的实现方式中,SDR图像或SDR图像序列范围第一参考值,可以是指,但不限于参考SDR显示设备的亮度最大值,或者是第三预设值。
而对于SDR图像或SDR图像序列范围第二参考值,可以是指,但不限于参考SDR显示设备的亮度最小值,或第四预设值。
即在上述实现中,给出了HDR图像或HDR图像序列范围第一参考值、HDR图像或HDR图像序列范围第二参考值、SDR图像或SDR图像序列范围第一参考值、SDR图像或SDR图像序列范围第二参考值的一些优选地取值情况,增强了方案的可实施性。
在一种可行的实现方式中,S型转换曲线可以为斜率先上升后下降的曲线。
在一种可行的实现方式中,结合上述实施例,S型转换曲线可以是包含一段或多段曲线的,斜率先上升后下降的曲线。
在本实现中,具体给出了了本发明实施例中的S型转换曲线的曲线斜率趋势走向。
在一种可行的实现方式中,S型转换曲线形式采用如以下公式所对应的曲线形式:
其中,在上述公式中,L为HDR图像各个像素点的所有构成分量的电信号值中的最大值,L′为输出值,即L代入上述公式后得到的转换值,而a、b、p以及m参数为S型转换曲线的动态参数。
本实现中,具体的给出了一种S型转换曲线形式,提高了方案的可实施性。
结合上述实施例,在一种可行的实现方式中,上述p以及m参数为由查找第三预置列表获得的参数,而a以及b参数是解方程组计算获得,方程组如下所示:
其中,L1为HDR图像或HDR图像序列范围第一参考值,L2为HDR图像或HDR图像序列范围第二参考值,L′1为SDR图像或SDR图像序列范围第一
参考值,L′2为SDR图像或SDR图像序列范围第二参考值。
即本实现中,结合具体的S型转换曲线形式,给出了怎么获得S型转换曲线的动态参数的方式,提高了方案的可实施性。
在一种可行的实现方式中,S型转换曲线形式还可以采用由如下两段函数所对应的曲线形式:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
为了便于理解,下面对上述分段函数中的参数进行介绍:其中,L为HDR图像各个像素点的所有构成分量的电信号值中的最大值,L′为各个像素点的所有构成分量的电信号值中的最大值代入上述公式后获得的各个像素点对应的转换值;L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为S型转换曲线的动态参数,L0、L′0、k0分别表示第一段曲线起点的输入、输出值、斜率;L1、L′1、k1分别表示第一段与第二段曲线连接点的输入值、输出值、斜率;L2、L′2、k2分别表示第二段曲线终点的输入值、输出值、斜率;其中,k0、k1、k2满足k0<k1>k2。
即在本实现中,给出了另一种具体的S型转换曲线形式,提高了方案的可实施性以及多样性。
在一种可行的实现方式中,L0为HDR图像或HDR图像序列范围第一参考值,L2为HDR图像或HDR图像序列范围第二参考值,L′0为SDR图像或SDR图像序列范围第一参考值,L′2为SDR图像或SDR图像序列范围第二参考值;而L1,L′1,k0,k1,k2参数由根据HDR图像或HDR图像序列的统计信息,通过查找第四预置列表的方式获得。
即本实现中,结合上述具体的S型转换曲线,给出了获取S型转换曲线的动态参数的方式。
在一种可行的实现方式中,L0为HDR图像或HDR图像序列范围第一参考值,L2为HDR图像HDR图像序列范围第二参考值,L′0为SDR图像或SDR
图像序列范围第一参考值,L′2为SDR图像或SDR图像序列范围第二参考值,即与上述实现相比,L0、L′0、L′2、L2参数的获取方式相同;L1,k0,k1,k2参数由根据HDR图像或HDR图像序列的统计信息,通过查找第四预置列表的方式获得,即与上述实现相比,L1,k0,k1,k2参数的获取方式也相同,但与L′1参数与上述实现的L′1与上述实现不同,在本实现中,L′1参数通过以下公式计算得到:
即本实现中,给出了另一获取L1参数的方式,提高了方案的多样性。
在一种可行的实现方式中,根据最大值和转换值的比值,对各像素点的所有构成分量进行动态范围缩小调整,具体可以是指将比值乘以各像素点的所有构成分量的电信号值,得到任一像素点的所有构成分量动态范围缩小调整后的电信号值。
即本实现中,给出了一种动态范围缩小调整的具体方式。提高了方案的可实施性。
本发明实施例第四方面提供了一种图像处理方法,该方法用于将SDR图像处理为HDR图像,在该方法中,通过获取SDR图像的各像素点的所有构成分量的电信号值,即获取SDR图像每个像素点的所有构成分量的电信号值,并获取反S型转换曲线的动态参数,接着根据SDR电光转换函数对SDR图像的各像素点的所有构成分量的电信号值进行电光转换,得到SDR图像的各像素点的所有构成分量对应的光信号值,再根据HDR光电转换函数对SDR图像的各像素点的所有构成分量的光信号值进行光电转换,得到目标图像信息,即SDR图像的所有构成分量的光信号值经过HDR光电转换函数转换后对应的电信号值,其中该反S型曲线表示曲线形状为倒“S”的曲线,即曲线的斜率先下降而后上升的曲线;确定目标图像信息各像素点的所有构成分量的电信号值中的最大值,根据反S型转换曲线对最大值进行转换处理,获得转换值,其中,反S型转换曲线为根据动态参数对最大值进行转换的函数,之后计算目标图像信息各像素点的转换值与对应的最大值的比值,根据目标图像信息各像素点的比值,对目标图像信息的对应像素点的所有构成分量的电信号值进行动态范围扩大调整,得到HDR图像的各像素点被动态范围扩大调整后的所有构成分量的电信号值。
由上述描述可以知道,本发明实施例第四方面中,提出了用于将SDR图像处理为HDR图像的方法,在将SDR图像处理为HDR图像的过程中,同样是利用了不再是固定不变的静态参数,即利用动态参数,根据反S型转换曲线进行图像的动态拉伸处理,相对于现有技术对图像进行动态范围扩大调整的过程中使用的是静态参数,本发明实施例中,可以有效地保证动态范围调整后,SDR图像显示效果与HDR图像显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
在一种可行的实现方式中,SDR图像位于SDR图像序列中,HDR图像位于HDR图像序列中,获取反S型转换曲线的动态参数包括,根据以下信息中的至少一种获得动态参数:SDR图像的统计信息或SDR图像序列的统计信息,SDR图像或SDR图像序列范围第一参考值;SDR图像或SDR图像序列范围第二参考值;HDR图像或HDR图像序列范围第一参考值;HDR图像或HDR图像序列范围第二参考值。
即在本实现中,具体是根据以上的至少一种信息获得反S型转换曲线的动态参数,当然,除了上述列举的信息外,还可以根据其他的信息获取反S型转换曲线的动态参数,增强了方案的可实施性以及多样性。
在一种可行的实现方式中,SDR图像的统计信息至少包括以下信息中的一种:
SDR图像或者SDR图像序列的像素点的至少一个构成分量的电信号值中的的最大值、最小值、平均值、标准差以及直方图分布信息。
即在本实现中,给出了SDR图像或SDR图像序列的统计信息具体可以是哪些信息,提高了方案的多样性以及可实施性。
在一种可行的实现方式中,构成分量包括R分量、G分量以及B分量,或Y分量。
在一种可行的实现方式中,HDR图像或HDR图像序列范围第一参考值可以是指,但不局限于参考HDR显示设备的亮度最大值,或第一预设值,对于HDR图像范围或HDR图像序列范围第二参考值,可以指,但不限于参考HDR显示设备的亮度最小值,或第二预设值。
在一种可行的实现方式中,SDR图像或SDR图像序列范围第二参考值可以是指,但不限于参考SDR显示设备的亮度最大值,或者根据SDR图像或
SDR图像序列的统计信息通过查找第五预置列表得到的第三查表值,或者是第三预设值。
在一种可行的实现方式中,SDR图像或SDR图像序列范围第二参考值可以是指,但不限于参考SDR显示设备的亮度最小值,或者是根据SDR图像或SDR图像序列的统计信息,通过查找第六预置列表得到的第三查表值,或者是第四预设值。
即在上述实现中,给出了SDR图像或SDR图像序列范围第一参考值、SDR图像或SDR图像序列范围第二参考值、HDR图像或HDR图像序列范围第一参考值、HDR图像或HDR图像序列范围第二参考值的一些优选地取值情况,增强了方案的可实施性。
在一种可行的实现方式中,反S型转换曲线为斜率先下降后上升的曲线。
在一种可行的实现方式中,反S型转换曲线包含一段或多段曲线。
在一种可行的实现方式中,反S型转换曲线形式采用如下公式所对应的曲线形式:
其中,在上述公式中,L为目标图像信息各像素点的所有构成分量的电信号值中的最大值,L′为转换值,而a、b、p以及m参数为反S型转换曲线的动态参数。
即本实现中,具体的给出了一种反S型转换曲线形式,提高了方案的可实施性。
在一种可行的实现方式中,上述p以及m参数为由查找第七预置列表的方式获得的参数,而a以及b参数则通过以下方程组计算得到:
其中,在上述方程组中,L1为SDR图像或SDR图像序列范围第一参考值,L2为SDR图像或SDR图像序列范围第二参考值,L′1为HDR图像或HDR图
像序列范围第一参考值,L′2为HDR图像或HDR图像序列范围第二参考值。
即本实现中,结合具体的反S型转换曲线形式,给出了怎么获得S型转换曲线的动态参数的方式,提高了方案的可实施性。
在一种可行的实现方式中,反S型转换曲线形式还可以采用由如下两段函数所对应的曲线形式:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,L为目标图像信息各像素点的所有构成分量的电信号值中的最大值,L′转换值;L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为反S型转换曲线的动态参数,L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;k0、k1、k2满足k0>k1<k2。
即在本实现中,给出了另一种具体的S型转换曲线形式,提高了方案的可实施性以及多样性。
在一种可行的实现方式中,
结合上述反S型转换曲线形式,L0为SDR图像或SDR图像序列范围第一参考值,L2为SDR图像或SDR图像序列范围第二参考值,L′0为HDR图像或HDR图像序列范围第一参考值,L′2为HDR图像或HDR图像序列范围第二参考值;L1,L′1,k0,k1,k2由根据SDR图像或SDR图像序列的统计信息,通过查找第八预置列表的方式获得。
即本实现中,结合上述具体的反S型转换曲线,给出了获取反S型转换曲线的动态参数的方式。
在一种可行的实现方式中,L0为SDR图像或SDR图像序列范围第一参考值,L2为SDR图像或SDR图像序列范围第二参考值,L′0为HDR图像或HDR图像序列范围第一参考值,L′2为HDR图像或HDR图像序列范围第二参考值;
L1,k0,k1,k2参数由根据HDR图像或HDR图像序列的统计信息,通过查找第八预置列表的方式获得;而L′1参数通过以下公式计算得到:
即本实现中,与上述实现相比,给出了另一获取L1参数的方式,提高了方案的多样性。
在一种可行的实现方式中,根据目标图像信息各像素点的比值,对目标图像信息的对应像素点的所有构成分量的电信号值进行动态范围扩大调整,具体是指:
将目标图像信息各像素点的比值乘以目标图像信息对应像素点的所有构成分量的电信号值,最终得到HDR图像的各像素点被动态范围扩大调整后的所有构成分量的电信号值。
本发明实施例第五方面提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码用于指示执行上述第一方面、第三方面、第四方面中的方法。
本发明实施例第六方面提供了一种图像处理装置,包括处理器和耦合于该处理器的存储器,该处理器用于执行上述第一方面、第三方面、第四方面中的方法。
由以上技术方案可以看出,本发明实施例中,提出了一种图像处理方法,在进行动态范围调整的过程中,利用的不再是固定不变的动态参数,可以有效地保证动态范围调整后,图像显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
为了更清楚地说明本发明实施例技术方案,下面将对实施例和现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本发明实施例中一种实施例用于图像处理的应用场景示意图;
图2为本发明实施例中提供一种图像处理方法一个实施例流程示意图;
图3为本发明实施例中一种S型转换曲线一个示意图;
图4为本发明实施例中一种由2段曲线组成的S型转换曲线一个示意图;
图5为本发明实施例一种反S型转换曲线一个示意图;
图6为本发明实施例中一种由2段曲线组成的反S型转换曲线一个示意图;
图7为本发明实施例中第一待处理图像转第一目标图像的动态调整过程示意图;
图8为本发明实施例一种图像处理装置一个实施例示意图;
图9为本发明实施例一种图像处理装置另一实施例示意图。
本发明实施例实施例提供了一种图像处理方法以及装置,用于有效地保证动态范围调整后,显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
由前述背景技术描述可知,现存图像中存在SDR图像和HDR图像两种动态范围的图像,并且显示设备也存在具有不同显示能力的HDR显示设备和SDR显示设备,为了实现图像在SDR显示设备以及具有不同显示能力的HDR显示设备上兼容显示,且有效地保证像显示效果一致,即不出现对比度变
化、细节丢失等问题,进而减少对图像的显示效果的影响。在本发明实施例中,提出了一种图像处理方法,在图像转换过程中,使用的不再是固定不变的静态参数,而是根据动态参数,利用预设的转换曲线实现图像转换,不同动态范围的图像更好兼容不同显示能力的显示设备。举例来说,即使得动态范围调整后的SDR图像在SDR显示设备上的显示效果,与未动态范围调整前的HDR图像在HDR显示设备上的显示效果保持一致性,减少对转换后的图像显示效果的影响。图1示出了图像处理的方法的常见应用场景。图像处理装置可以对输入的待处理的图像进行指定的图像处理,并输出处理后的目标图像。
首先对本发明实施例中涉及到的一些物理概念进行一下介绍和解释。
像素点是构成图像的基本单元,像素点的颜色通常用若干个(示例性的,比如三个)相对独立的属性来描述,这些独立属性综合作用,自然就构成一个空间坐标,即颜色空间。在本发明实施例中,组成像素点的独立属性称为每个像素点的构成分量。示例性的,构成分量可以是图像颜色分量,例如R分量、G分量、B分量或Y分量。一个对应于特定图像颜色分量的数值,称为该构成分量的基色值。而基色值具有不同的存在形式,例如:线性基色值,与光强度成正比,其值归一化到[0,1],也称为光信号值,其中1表示最高显示亮度,使用不同转移函数时1的含义不同,如当使用PQ转移函数时,1表示最高显示亮度10000nits,如当使用SLF转移函数时,1表示最高显示亮度10000nits,如当使用HLG转移函数时,1表示最高显示亮度2000nits,如当使用BT.1886转移函数时,示例性的,1一般表示最高显示亮度300nits。非线性基色值,是图像信息的归一化数字表达值,其值归一化到[0,1],也称为电信号值。线性基色值和非线性基色值间存在转换关系,例如:光电转移函数(Optical-Electro Transfer Function,OETF)可以用来实现线性基色值到非线性基色值的转换,而电光转移函数(Electro-Optical Transfer Function,EOTF)可以用来实现非线性基色值到线性基色值的转换。
常用的SDR光电转移函数包括国际电信联盟无线通信组(International Telecommunications Union-Radio Communications Sector,ITU-R)BT.1886光电转换函数;对应的,SDR电光转换函数包括ITU-R BT.1886电光转换函数。常用的HDR光电转换函数具体可以包括,但不仅限于如下函数:感知量化
(perceptual quantizer,PQ)光电转换函数,混合对数伽马(Hybrid Log-Gamma,HLG)光电转换函数,场景亮度保真(Scene Luminance Fidelity,SLF)光电转换函数。对应的,HDR电光转换函数具体可以包括,但不仅限于如下函数:PQ电光转换函数,HLG电光转换函数,SLF电光转换函数。
上述不同的光电/电光转换函数由不同的高动态范围图像解决方案分别提出,例如:PQ光电/电光转换函数(也称PQ转换曲线)由SMPTE2084标准定义,HLG光电/电光转换函数(也称HLG转换曲线)由BBC和NHK联合提出高动态图像标准定义。应理解,示例性的,经由PQ转换曲线转换的图像遵循SMPTE2084标准,经由HLG转换曲线转换的图像遵循HLG标准。
同时,在本发明实施例中,示例性的,使用PQ转换曲线进行转换后的数据,称为PQ域的光/电信号值;使用HLG转换曲线进行转换后的数据,称为HLG域的光/电信号值;使用SLF转换曲线进行转换后的数据,称为SLF域的光/电信号值。
下面将通过具体的实施例对本申请提出的一种图像处理方法的进行详细的描述:
图2为在本发明实施例中提供一种图像处理方法一个实施例10流程示意图,包括:
101、确定第一待处理图像的每个像素点的所有构成分量的非线性基色值;
本实施例中,第一待处理图像的每个像素点的所有构成分量指的是像素点中与亮度相关的分量。
其中,第一待处理图像具体可以是指特定颜色空间的图像,例如可以是RGB颜色空间,或YUV、YCrCb颜色空间的图像。
应理解,上述列举颜色空间在这里只是举例说明,但并不对本申请的获取的第一待处理图像的颜色空间类型造成限定,还可以是指其他的颜色空间,具体此处不做限定。为了便于理解,下面以第一待处理图像为不同颜色空间的情况进行描述:
在一种可行的实施方式中,当第一待处理图像为RGB颜色空间的图像时,图像各像素点的所有构成分量包括R分量,G分量以及B分量,本领域
技术人员可以知道,R分量、G分量以及B分量用于表征图像各颜色分量的亮度,因此,确定第一待处理图像的每个像素点的所有构成分量的非线性基色值,即是指可以获取输入图像的每个像素点的R分量、G分量以及B分量的非线性基色值。
在一种可行的实施方式中,当第一待处理图像为RGB颜色空间的图像时,第一待处理图像的每个像素点的Y分量可以通过R,G以及B分量计算获得,如Y=a11*R+a12*G+a13*B,其中,a11、a12以及a13为加权因数。本领域技术人员能够理解,a11、a12、a13的取值可以有多种选择,本发明实施例对此不作限定。例如,Y=0.2126*R+0.7152*G+0.0722*B或者Y=0.2627*R+0.6780*G+0.0593*B。本领域技术人员可以知道,R分量、G分量、B分量及Y分量均与HDR图像的亮度有关,因此,确定第一待处理图像的每个像素点的所有构成分量的非线性基色值,即是指可以获取输入图像的每个像素点的R分量、G分量、B分量及Y分量的非线性基色值。
在一种可行的实施方式中,当第一待处理图像为YUV颜色空间的图像,图像各像素点的所有构成分量包括Y分量、U分量以及V分量,本领域技术人员可以知道,U分量以及V分量与图像的亮度无关,Y分量与图像的亮度有关,确定第一待处理图像的每个像素点的所有构成分量的非线性基色值,即是指输入图像每一个像素点的Y分量的非线性基色值。
应理解,由于非线性基色值是图像信息的归一化数字表达值,上述图像的非线性基色值为线性信号值经过光电转换函数转换后的图像信号值。
为了便于叙述,本实施例中下文,将以第一待处理图像采用RGB颜色空间进行表示为例进行描述。
102、确定第一待处理图像的每个像素点的所有构成分量的非线性基色值的最大值;
本实施例中,当确定第一待处理图像的每个像素点的所有构成分量的非线性基色值后,逐个像素点确定第一待处理图像的每个像素点的所有构成分量的非线性基色值的最大值,即每个像素点会获得一个对应的最大值,另外应理解,当第一待处理图像只包含一个适用的构成分量时,例如,处于YUV颜色空间时的Y分量,所有构成分量的非线性基色值的最大值即为该适用的构成分量的非线性基色值的最大值。
示例性的,假设第一待处理图像的像素点包含像素点k,其中像素点k的R分量非线性基色值为0.5,G分量非线性基色值为0.6、B分量非线性基色值为0.7,即确定0.7为像素点k三个分量中的最大值,其中,非线性基色值采用归一化方式表示,其最大取值为1,最小取值为0。
103、确定第一转换函数的动态参数;
示例性的,第一转换函数可以为S型转换曲线或者反S型转换曲线。
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像到SDR图像的转换,则第一转换函数选择S型转换曲线;
在一种可行的实施方式中,需要利用本发明实施例实现SDR图像到HDR图像的转换,则第一转换函数选择反S型转换曲线;
在一种可行的实施方式中,需要利用本发明实施例实现不同动态范围的HDR图像之间的转换,则第一转换函数选择S型转换曲线或者反S型转换曲线。
在本发明实施例中,确定第一转换函数的动态参数包括:根据以下信息中的至少一种获得动态参数:第一待处理图像的统计信息;第一待处理图像范围第一参考值;第一待处理图像范围第二参考值;第一目标图像范围第一参考值;第一目标图像范围第二参考值。特别的,当第一待处理图像以及第一目标图像以序列的形式存在时,以上信息还包括:第一待处理图像所在序列的统计信息;第一待处理图像所在序列范围第一参考值;第一待处理图像所在序列范围第二参考值;第一目标图像所在序列范围第一参考值;第一目标图像所在序列范围第二参考值。
在本发明实施例中,第一待处理图像或第一待处理图像所在序列的统计信息具体是指与第一待处理图像或第一待处理图像序列属性相关的信息,例如,是至少包括以下信息中的一种:
第一待处理图像或第一待处理图像的像素点的至少一个构成分量的非线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
或者还可以是,第一待处理图像或第一待处理图像的像素点的至少一个构成分量的线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
在一种可行的实施方式中,上述统计信息包括第一待处理图像或第一待处
理图像的像素点的亮度分量(Y分量)非线性基色值的最大值、最小值、平均值、标准差以及直方图分布信息中的至少一者。
应理解,第一待处理图像或第一待处理图像序列属性相关的信息除了上述列举的情况外,还可以是指其他的信息,例如,还可以是指第一待处理图像或第一待处理图像的至少一个构成分量的非线性基色值的方差等信息,或者上述列举的信息之间的某种函数关系作为统计信息。例如可以是指第一待处理图像或第一待处理图像序列的平均值与标准差的和,具体此处不做限定。
应理解,第一待处理图像或第一待处理图像序列的平均值具体可以是指:
第一待处理图像或第一待处理图像序列的像素点集合的R分量非线性基色值的平均值,或G分量非线性基色值的平均值,或B分量非线性基色值的平均值,或Y分量非线性基色值的平均值。
或者,第一待处理图像或第一待处理图像序列的像素点集合的R分量线性基色值的平均值,或G分量线性基色值的平均值,或B分量线性基色值的平均值,或Y分量线性基色值的平均值。
应理解,针对不同颜色空间的第一待处理图像或第一待处理图像序列,其对应的非线性基色值或者线性基色值的平均值具体可以有多种情况,上述示例性地以颜色空间为RGB颜色空间以及YUV颜色空间为例进行描述,对于其他颜色空间,不再赘述。
在本发明实施例中,第一待处理图像或第一待处理图像序列范围第一参考值,可以包括:
用于显示第一待处理图像的显示设备的亮度最大值,其中,该显示设备为预先配置,为人为主观选择的,作为确定第一转换函数的动态参数时用于显示第一待处理图像的显示设备。
或,
根据第一待处理图像或第一待处理图像序列的统计信息,查找第一预置列表,得到的第一查表值;
或,
第一预设值,例如,第一预设值设为0.85或者0.53。
应理解,在本发明实施例中,根据第一待处理图像或第一待处理图像序列
的统计信息,第一预置列表的方式获得上述第一待处理图像范围第一参考值,具体如下所示:
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像到SDR图像的转换,第一待处理图像为HDR图像,以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的和为例,对根据第一待处理图像的统计信息,通过查找第一预置列表的方式得到第一查表值,即上述第一待处理图像范围第一参考值进行描述,其中,第一预置列表的列表信息如表1所示:
| 平均值与标准差之间的和 | 0.2 | 0.5 | 0.7 |
| 第一待处理图像(HDR)范围第一参考值 | 0.85 | 0.9 | 0.92 |
表1
如表1所示,例如:当第一待处理图像的平均值以及标准差之间的和大于0.7时,则第一待处理图像范围第一参考值取0.92;当第一待处理图像的平均值以及标准差之间的和小于0.2时,则第一待处理图像范围第一参考值取0.85;当第一待处理图像的平均值以及标准差之间的和介于0.2与0.5之间时,则第一待处理图像范围第一参考值的取值可以根据数据0.2以及0.5,利用插值的方式获得,当介于0.5与0.7之间时,也可以采取插值的方式获得,其中,可以采用线性插值、加权平均插值等插值方式获得,具体此处不做限定,也不再赘述。
在一种可行的实施方式中,需要利用本发明实施例实现SDR图像到HDR图像的转换,第一待处理图像为SDR图像,以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的和为例,对根据第一待处理图像的统计信息,通过查找第一预置列表的方式得到第一查表值,即上述第一待处理图像范围第一参考值进行描述,其中,第一预置列表的列表信息如表2所示:
| 平均值与标准差之间的和 | 0.2 | 0.5 | 0.7 |
| 第一待处理图像(SDR)范围第一参考值 | 0.53 | 0.56 | 0.58 |
表2
如表2所示,例如:当第一待处理图像的平均值以及标准差之间的和大于0.7时,则第一待处理图像范围第一参考值取0.58;当第一待处理图像的平均值以及标准差之间的和小于0.2时,则第一待处理图像范围第一参考值取0.53;当第一待处理图像的平均值以及标准差之间的和介于0.2与0.5之间时,则第一待处理图像范围第一参考值的取值可以根据数据0.2以及0.5,利用插值的方式获得,当介于0.5与0.7之间时,也可以采取插值的方式获得,其中,可以采用线性插值、加权平均插值等插值方式获得,具体此处不做限定,也不再赘述。
在一种可行的实施方式中,需要利用本发明实施例实现不同动态范围的HDR图像之间转换,第一待处理图像为HDR图像,以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的和为例,对根据第一待处理图像的统计信息,通过查找第一预置列表的方式得到第一查表值,即上述第一待处理图像范围第一参考值进行描述,其中,第一预置列表的列表信息如表3所示:
| 平均值与标准差之间的和 | 0.2 | 0.5 | 0.7 |
| 第一待处理图像(HDR)范围第一参考值 | 0.82 | 0.85 | 0.90 |
表3
如表3所示,例如:当第一待处理图像的平均值以及标准差之间的和大于0.7时,则第一待处理图像范围第一参考值取0.90;当第一待处理图像的平均值以及标准差之间的和小于0.2时,则第一待处理图像范围第一参考值取0.82;当第一待处理图像的平均值以及标准差之间的和介于0.2与0.5之间时,则第一待处理图像范围第一参考值的取值可以根据数据0.2以及0.5,利用插值的方式获得,当介于0.5与0.7之间时,也可以采取插值的方式获得,其中,可以采用线性插值、加权平均插值等插值方式获得,具体此处不做限定,也不再赘述。
应理解,表1-3为预先配置的列表,表1-3中的数据为人为主观经验数据获得的最优参数。另外应理解,表1-3在这里只是以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的和为例进行说明,通过第一待
处理图像的其他的统计信息,或者通过第一待处理图像序列的统计信息也可以通过查表的方式获得第一待处理图像范围第一参考值,具体此处不做限定,也不再赘述。
在本发明实施例中,第一待处理图像或第一待处理图像序列范围第二参考值,可以包括:
用于显示第二待处理图像的显示设备的亮度最小值,其中,该显示设备为预先配置,为人为主观选择的,作为确定第一转换函数的动态参数时用于显示第一待处理图像的显示设备。
或,
根据第一待处理图像或第一待处理图像序列的统计信息,查找第二预置列表,得到的第二查表值;
或,
第二预设值,例如,第一预设值设为0.05或者0.12。
同理,在本实施例中,通过第一待处理图像或第一待处理图像序列的统计信息,查找第二预置列表的方式获得上述第一待处理图像范围第二参考值。具体如下所示:
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像到SDR图像的转换,第一待处理图像为HDR图像,以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的差为例,对根据第一待处理图像的统计信息,通过预置查找表的方式获得第二查表值,即上述第一待处理图像范围第二参考值进行描述,其中,第二预置列表的列表信息如表4所示:
| 平均值与标准差之间的差 | 0.1 | 0.2 | 0.35 |
| 第一待处理图像(HDR)范围第二参考值 | 0 | 0.005 | 0.01 |
表4
如表4所示,例如:当第一待处理图像的平均值以及标准差之间的差大于0.35时,则第一待处理图像范围第二参考值取0.01;当第一待处理图像的平均值以及标准差之间的和小于0.1时,则第一待处理图像范围第二参考值取0;当第一待处理图像的平均值以及标准差之间的和介于0.1与0.2之间时,则第
一待处理图像范围第二参考值的取值可以根据0.1以及0.2,利用插值的方式获得。其中,可以采用线性插值、加权平均插值等插值方式获得,具体此处不做限定,此处也不再赘述。
在一种可行的实施方式中,需要利用本发明实施例实现SDR图像到HDR图像的转换,第一待处理图像为SDR图像,以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的差为例,对根据第一待处理图像的统计信息,通过预置查找表的方式获得第二查表值,即上述第一待处理图像范围第二参考值进行描述,其中,第二预置列表的列表信息如表5所示:
| 平均值与标准差之间的差 | 0.1 | 0.2 | 0.35 |
| 第一待处理图像(SDR)范围第二参考值 | 0.1 | 0.12 | 0.15 |
表5
如表5所示,例如:当第一待处理图像的平均值以及标准差之间的差大于0.35时,则第一待处理图像范围第二参考值取0.15;当第一待处理图像的平均值以及标准差之间的和小于0.1时,则第一待处理图像范围第二参考值取0.1;当第一待处理图像的平均值以及标准差之间的和介于0.1与0.2之间时,则第一待处理图像范围第二参考值的取值可以根据0.1以及0.2,利用插值的方式获得。其中,可以采用线性插值、加权平均插值等插值方式获得,具体此处不做限定,此处也不再赘述。
在一种可行的实施方式中,需要利用本发明实施例实现不同动态范围的HDR图像之间转换,第一待处理图像为HDR图像,以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的差为例,对根据第一待处理图像的统计信息,通过预置查找表的方式获得第二查表值,即上述第一待处理图像范围第二参考值进行描述,其中,第二预置列表的列表信息如表6所示:
| 平均值与标准差之间的差 | 0.1 | 0.2 | 0.35 |
| 第一待处理图像(HDR)范围第二参考值 | 0.005 | 0.01 | 0.012 |
表6
如表6所示,例如:当第一待处理图像的平均值以及标准差之间的差大于0.35时,则第一待处理图像范围第二参考值取0.012;当第一待处理图像的平均值以及标准差之间的和小于0.1时,则第一待处理图像范围第二参考值取0.005;当第一待处理图像的平均值以及标准差之间的和介于0.1与0.2之间时,则第一待处理图像范围第二参考值的取值可以根据0.1以及0.2,利用插值的方式获得。其中,可以采用线性插值、加权平均插值等插值方式获得,具体此处不做限定,此处也不再赘述。
同样应理解,表4-6为预先配置的列表,表4-6中的数据为人为主观经验数据获得的最优参数。另外应理解,表4-6在这里只是以第一待处理图像的统计信息为第一待处理图像的平均值以及标准差之间的差为例进行说明,通过第一待处理图像的其他的统计信息,也可以通过查表的方式获得第一待处理图像范围第二参考值,具体此处不做限定,也不再赘述。
在本发明实施例中,第一目标图像或第一目标图像序列范围第一参考值,可以包括:
用于显示第一目标图像的显示设备的亮度最大值,其中,该显示设备为预先配置,为人为主观选择的,作为确定第一转换函数的动态参数时用于显示第一目标图像的显示设备。
或,
第三预设值,例如,第三预设值设为0.53或0.85。
在本发明实施例中,第一目标图像或第一目标图像序列范围第二参考值,可以包括:
用于显示第一目标图像的显示设备的亮度最小值,其中,该显示设备为预先配置,为人为主观选择的,作为确定第一转换函数的动态参数时用于显示第一目标图像的显示设备。
或,
第四预设值,例如,第四预设值设为0.12或0.05。
为了便于叙述与理解,步骤104中将以实际的第一转换函数为例,对第一转换函数的动态参数的获取方式进行介绍,详见步骤104。
应理解,步骤102与103之间无时序关系限定,也可以先执行步骤103,再执行步骤102。
104、根据已经确定了动态参数后的第一转换函数,将每个像素点的最大值转换为转换值;
即本发明实施例中,当确定了第一待处理图像每个像素点的所有构成分量的非线性基色值中的最大值,可以根据第一转换函数对第一待处理图像每个像素点的最大值进行转换,得到第一待处理图像每个像素点对应的转换值,即第一待处理图像中的每一个像素点对应一个最大值以及转换值。
为了便于理解与叙述,下面先对本申请所涉及的第一转换函数进行描述:
在一种可行的实施方式中,第一转换函数为S型转换曲线。
在本发明实施例中,优选地,在本发明实施例中的S型转换曲线为斜率先上升后下降的曲线,如图3所示,图3为在本发明实施例中一种斜率先上升后下降的S型转换曲线一个示意图。
结合图3,在本发明实施例中的S型转换曲线还可以是包含一段或多段曲线且斜率先上升后下降的曲线。如图4所示,图4为在本发明实施例中一种由2段曲线组成的S型转换曲线示意图。图4中,黑点表示两段曲线的连接点。
为了便于理解,下面通过具体的形式对在本发明实施例中所优先采取的2种S型转换曲线进行描述:
方式一、S型转换曲线可以采取如下形式的曲线:
其中,L为第一待处理图像的各像素点,即第一待处理图像中的每一个像素点的所有构成分量的非线性基色值中的最大值,L′为每个像素点对应的转换值,a、b、p以及m参数为S型转换曲线的动态参数,其中,p以及m参数用来控制曲线形状以及曲线的弯曲程度,a以及b参数用来曲线的范围,即曲线起点,终点的位置。
优选地,在本实施例中,p以及m参数可以通过多种方式获得,下面分别进行描述:
1、根据第一待处理图像或第一待处理图像序列的统计信息,通过查找第三预置列表的方式获得p以及m参数。
为了便于描述,第一待处理图像或第一待处理图像序列的统计信息以第一待处理图像序列的Y通道的非线性基色值的平均值为例进行说明,这里假设
第一待处理图像序列的Y通道的非线性基色值的平均值为y,第三预置列表的信息如下表3所示:
| y | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| p | 6.0 | 5.0 | 4.5 | 4.0 | 3.2 |
| m | 2.2 | 2.25 | 2.3 | 2.35 | 2.4 |
表7
如表7所示,当第一待处理图像序列的Y通道的非线性基色值的平均亮度值y大于0.6时,p参数取3.2,m参数取2.4;当y小于0.1时,p参数取6.0,m参数取2.2;当y介于0.55与0.6之间时,p以及m参数,可以通过插值方式获得。
其中,插值方法可以使用任意方式,例如线性插值、加权平均插值等方式,具体此处不做限定。例如,这里以p为例进行说明,当y介于0.55与0.6之间时,可以通过如下线性插值方式获得p参数:
p=4.0+(y-0.55)/(0.6-0.55)*(3.2-4.0);
对于其他情况,例如当y介于0.1与0.25时,可以此类推获得对应的p以及m参数,具体此处不做赘述。
应理解,表7为预先配置的列表,表7中的数据为人为主观经验数据获得的最优参数。另外应理解,表7在这里只是以第一待处理图像序列的统计信息为第一待处理图像序列的Y通道的非线性基色值的平均值y为例进行说明,通过第一待处理图像或第一待处理图像序列的其他的统计信息,也可以通过查表的方式获得p以及m参数,具体此处不做限定,也不再赘述。
2、根据第一目标图像显示设备的性能参数,例如伽马(Gamma)值,以及第一待处理图像或第一待处理图像序列的统计信息共同确定p、m参数。
例如、可以先确定第一目标图像显示设备的Gamma值,将参考第一目标图像显示设备的伽马Gamma值作为m参数,其中,示例性的,一般的SDR显示设备的Gamma均为2.4,即可以取m参数为2.4;而p参数则通过查找上述表3的方式获得。
应理解,除了以上2种方式外,还可以其他的方式获得p、m参数,具体
此处不做限定,例如:
3、可以嵌入至前期制作中,通过调色人员手动调整,使得第一目标图像与获取的第一待处理图像的色彩、饱和度以及对比度等颜色信息基本保持一致时所对应的p、m参数,接收调色人员调整出的p以及m参数。
上面对如何获得p、m参数的几个方式进行了介绍,下面对如何获得a以及b参数进行介绍:
当经过上述描述中的方式确定了p以及m参数后,可以通过以下方程组计算获得a以及b参数:
其中,所述L1为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
方式二、采取如下形式的S型转换曲线,由两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
l′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,L为第一待处理图像各像素点的所有构成分量的非线性基色值中的最大值,L′为各个像素点对应的转换值;
L0、L1、L2、l′0、L′1、L′2、k0、k1以及k2为S型转换曲线动态参数,L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;k0、k1、k2满足k0<k1,且k1>k2。,即保证本方式
二中的S型转换曲线为斜率先上升后下降的曲线。
优选地,L0为第一待处理图像或第一待处理图像序列范围第一参考值,L2为第一待处理图像或第一待处理图像序列范围第二参考值,L′0为第一目标图像或第一目标图像序列范围第一参考值,L′2为第一目标图像或第一目标图像序列范围第二参考值;
其中,L1,L′1,k0,k1,k2参数由根据第一待处理图像或第一待处理图像序列的统计信息,通过查找第四、五预置列表的方式获得。
其中,第四预置列表包括表4以及第五预置列表包括表5,对于L1,k0,k1,k2,可以查找下表8的方式获得,这里以第一待处理图像或第一待处理图像序列的统计信息为第一待处理图像序列的Y通道的非线性基色值的平均值为例进行描述,这里假设第一待处理图像序列的Y通道的非线性基色值的平均值为y,则其对应的列表信息具体如下表8所示:
| y | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| L1 | 0.13 | 0.28 | 0.34 | 0.58 | 0.63 |
| k0 | 0 | 0.05 | 0.1 | 0.15 | 0.2 |
| k1 | 0.8 | 1.0 | 1.2 | 1.4 | 1.5 |
| k2 | 0 | 0.05 | 0.1 | 0.15 | 0.2 |
表8
如表8所示,例如,当y为0.1时,对应的,L1取0.13,k0取0,k1取0.8,k2取0,当y为其他数值时,根据表8以此类推可以获得对应的L1,k0,k1,k2参数,具体此处不再赘述。
这里应理解,当y介于表8中y对应的数值时,例如,当y介于0.5与0.55之间时,可以通过插值方式获得对应的L1,k0,k1,k2参数,具体此处不再描述。
对于L′1,可以通过查找表9的方式获得,这里以第一待处理图像或第一待处理图像序列的统计信息为第一待处理图像的Y通路非线性基色平均值与标准差的和为例进行描述,这里假设第一待处理图像的的平均值与标准差和为x,具体如下表9所示:
| x | 0.2 | 0.5 | 0.7 |
| L′1 | 0.3 | 0.4 | 0.5 |
表9
如表9所示,例如,当x为0.2时,L′1取0.3,当x为0.5时,L′1取0.7,当x介于0.2与0.5之间时,可以通过插值的方式获得对应的L′1,具体的如何通过插值方式获得,这里不再赘述。
应理解,在本实施例中,L′1除了通过查表的方式获得外,还可以通过预置计算公式获得,例如可以通过以下公式获得L′1:
本实施例中,当获取了S型转换曲线动态参数后,可以利用S型转换曲线对第一待处理图像各像素点的所有构成分量非线性基色值最大值进行处理,以S型转换曲线为上述方式一、方式二所述的S型转换曲线为例,可以将第一待处理图像各像素点的所有构成分量非线性基色值的最大值代入方式一以及方式二中所示的公式,获得转换值。
在一种可行的实施方式中,第一转换函数为反S型转换曲线。
在本发明实施例中,优选地,在本发明实施例中的反S型转换曲线为斜率先下降后上升的曲线,如图5所示,图5为在本发明实施例中一种斜率下降后上升的反S型转换曲线一个示意图。
结合图5,在本发明实施例中的反S型转换曲线可以是包含一段或多段曲线,斜率先下降后上升的曲线,如图6所示,图6为在本发明实施例中一种由2段曲线组成的反S型转换曲线示意图,黑点表示两段曲线的连接点。
为了便于理解,下面通过具体的形式对在本发明实施例中所优先采取的反S型转换曲线进行描述:
方式一、反S型转换曲线可以采取如下形式的曲线:
其中,L为目标图像信息各像素点的所有构成分量的非线性基色值中的最
大值,L′为转换后的最大值,a、b、p以及m参数为反S型转换曲线的动态参数,p以及m参数用来控制曲线形状以及曲线的弯曲程度,a以及b参数用来曲线的范围,即曲线起点,终点的位置。
其中,优选地,在本实施例中,p以及m参数可以通过多种方式,下面分别进行描述:
1、根据第一待处理图像或第一待处理图像序列的统计信息,通过查找第六预置列表的方式获得p以及m参数。
为了便于描述,这里假设第一待处理图像或第一待处理图像序列的Y通道的非线性基色值的平均值为y,第七预置列表的信息如下表10所示:
| y | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| p | 6.0 | 5.0 | 4.5 | 4.0 | 3.2 |
| m | 2.2 | 2.25 | 2.3 | 2.35 | 2.4 |
表10
如表10所示,当第一待处理或第一待处理图像序列的Y通道的非线性基色值的平均亮度值y大于0.6时,p参数取3.2,m参数取2.4;当y小于0.1时,p参数取6.0,m参数取2.2;当y介于0.55与0.6之间时,p以及m参数,可以通过插值方式获得,具体此处不做限定,也不再赘述。
2、根据第一目标图像显示设备的性能参数,例如Gamma值。以及第一待处理图像或第一待处理图像序列的统计信息共同获得p、m参数。
例如、可以选择第一目标图像显示设备的伽马(Gamma)值作为m参数,中,而p参数则通过查找上述表3的方式获得。
应理解,除了以上2种方式外,还可以其他的方式获得p、m参数,具体此处不做限定,例如:
3、可以嵌入至前期制作中,通过调色人员手动调整,使得获取的第一待处理图像与第一目标图像的色彩、饱和度以及对比度等颜色信息基本保持一致时所对应的p、m参数,接收调整出的p以及m参数。
上面对如何获得p、m参数的方式进行了介绍,下面对如何获得a以及b参数进行介绍:
当经过上述描述中的方式确定了p以及m参数后,通过解以下方程组计算获得a以及b参数:
其中,L1为第一待处理图像或第一待处理图像序列范围第一参考值,L2为第一待处理图像或第一待处理图像序列范围第二参考值,L′1为输出第一目标图像范围第一参考值,L′2为输出第一目标图像范围第二参考值。
方式二、采取如下形式的反S型转换曲线,由两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,L为目标图像信息各像素点的所有构成分量的非线性基色值中的最大值,L′为转换值;
其中,L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为反S型转换曲线动态参数,L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;其中,k0、k1、k2满足k0>k1,且k1<k2,即保证本方式二中的反S型转换曲线为斜率先下降后上升的曲线。
优选地,本实施例中,L0为第一待处理图像或第一待处理图像序列范围第一参考值,L2为第一待处理图像或第一待处理图像序列范围第二参考值,L′0为第一目标图像或第一目标图像序列范围第一参考值,L′2为第一目标图像或第一目标图像序列范围第二参考值;
L1,L′1,k0,k1,k2参数根据第一待处理图像或第一待处理图像序列的统计信息,通过查找第七、八预置列表的方式获得。
其中,第七预置列表包括表11以及第八预置列表包括表12。对于L1,k0,k1,k2,可以查找下表11的方式获得,这里以第一待处理图像或第一待处理图像序列的统计信息为第一待处理图像或第一待处理图像序列的Y通道的非线性基色值的平均值为例进行描述,这里假设第一待处理图像或第一待处理图像序列的Y通道的非线性基色值的平均值为y,具体如下表11所示:
| y | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| L1 | 0.13 | 0.28 | 0.34 | 0.58 | 0.63 |
| k0 | 0.8 | 1.0 | 1.2 | 1.4 | 1.5 |
| k1 | 0 | 0.05 | 0.1 | 0.15 | 0.2 |
| k2 | 0.8 | 1.0 | 1.2 | 1.4 | 1.5 |
表11
如表11所示,例如,当y为0.1时,对应的,L1取0.13,k0取0.8,k1取0,k2取0.8,当y为其他数值时,根据表11以此类推可以获得对应的L1,k0,k1,k2参数,具体此处不再赘述。
对于L′1,可以通过查找表12的方式获得,这里以第一待处理图像或第一待处理图像序列的统计信息为第一待处理图像或第一待处理图像序列的平均值与标准差之间的和为例进行描述,这里假设第一待处理图像或第一待处理图像序列的平均值与标准差之间的和为x,具体如下表12所示:
| x | 0.2 | 0.5 | 0.7 |
| L′1 | 0.3 | 0.4 | 0.5 |
表12
如表12所示,例如,当x为0.2时,L′1取0.3,当x为0.5时,L′1取0.4,当x介于0.2与0.5之间时,可以通过插值的方式获得对应的L′1,具体的如何通过插值方式获得,这里不再赘述。
应理解,在本实施例中,L′1除了通过查表方式获得外,还可以通过预置计
算公式获得,例如可以通过以下公式获得L′1:
本实施例中,当获取了反S型转换曲线动态参数后,可以利用反S型转换曲线对第一待处理图像各像素点的所有构成分量非线性基色值最大值进行处理,以反S型转换曲线为上述方式一、方式二所述的反S型转换曲线为例,可以将第一待处理图像各像素点的所有构成分量非线性基色值的最大值代入方式一以及方式二中所示的公式,获得转换值。
105、计算每个像素点的转换值和对应的最大值的比值;
本发明实施例中,当确定了第一待处理图像各像素点的最大值以及对应的转换值后,可以计算第一待处理图像各像素点的转换值与对应的最大值的比值。
106、根据比值,对每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
其中,当第一待处理图像的图像动态范围大于第一目标图像的图像动态范围时,根据上述比值,对每个像素点的所有构成分量的非线性基色值的进行缩小动态范围调整;反之,
当第一待处理图像的图像动态范围小于第一目标图像的图像动态范围时,根据上述比值,对每个像素点的所有构成分量的非线性基色值的进行扩大动态范围调整。
在一种可行的实施方式中,分别计算该比值和每个像素点的所有构成分量的非线性基色值的乘积,得到每个像素点的调整后的所有构成分量的非线性基色值。
为了便于理解,下面结合图7进行描述,图7为在本发明实施例中第一待处理图像转第一目标图像的动态调整过程示意图:
如图7所示,获取到第一待处理图像后,可以逐个点获取第一待处理图像每一个像素点的所有构成分量的非线性基色值中的最大值MAX,即各像素点对应的R分量、G分量以及B分量的非线性基色值中的最大值。
将各个像素点的MAX值通过第一转换函数进行处理,获得各像素点MAX2值,计算获得各个像素点的MAX2值与对应MAX值的比值,最后将
该比值乘于第一待处理图像对应像素点的R分量、G分量、B分量的非线性基色值,最终得到第一待处理图像的各像素点的所有构成分量被动态范围调整后的非线性基色值。
应理解,上述只是以第一待处理图像为RGB格式图像为例进行举例说明,当第一待处理图像为其他颜色空间的图像时,例如YUV颜色空间所对应的图像时,适用的所有构成分量的非线性基色值只包含了Y分量非线性基色值,获取的非线性基色值最大值也就是Y分量非线性基色值
应理解,根据上述比值除了将该比值乘于输入图像各像素点的R分量、G分量、B分量的非线性基色值,进行动态压缩处理外,还可以根据该比值进行其他的动态压缩处理方法,只要使得能对第一待处理图像各像素点的所有构成分量进行动态范围缩小或扩大调整处理,且最终能较好兼容第一目标图像的显示设备显示即可,具体此处不做限定。
在本发明实施例中,图像转换过程使用的不再是固定不变的静态参数,而是根据动态参数,利用预设的转换曲线实现图像转换,不同动态范围的图像更好兼容不同显示能力的显示设备。
在本发明的另一个实施例11中,在上述实施例10的步骤106之后,还包括:
207、根据第二转换函数,将第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值;
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像到SDR图像的转换,可以根据HDR电光转换函数对目标图像信息进行电光转换,得到SDR图像的各像素点的所有构成分量的线性基色值,其中,该目标图像信息包含第一待处理图像各像素点经过动态范围缩小调整后的所有构成分量的非线性基色值。
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像之间的转换,不妨设第一目标图像为使用了第一标准定义的第一转换曲线进行转换而得到的HDR图像,在本发明实施例中,也称为遵循第一标准的图像,则,在本步骤中,第二转换函数为第一标准定义的第一转换曲线。即,根据第一转换曲线,将第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第
二目标图像的对应像素点的所有构成分量的线性基色值。示例性的,不妨设第一目标图像为PQ域数据,则PQ转换曲线将PQ域的第一目标图像的像素点的非线性基色值转换为第二目标图像的像素点的线性基色值。应理解,高动态范围图像标准所定义的转换曲线包括,但不限于PQ转换曲线、SLF转换曲线、HLG转换曲线,不做限定。
在本发明的另一个实施例12中,在上述实施例11的步骤207之后,还包括:
308、根据第三转换函数,将第二目标图像的对应像素点的所有构成分量的线性基色值转换为第二目标图像的所述对应像素点的所有构成分量的非线性基色值;
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像到SDR图像的转换,根据SDR光电转换函数对SDR图像各像素点的所有构成分量的线性基色值进行光电转换获得输出SDR图像各像素点的所有构成分量的非线性基色值,最终可以输出至SDR显示设备上显示。
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像之间的转换,不妨设第二目标图像为使用了第二标准定义的第二转换曲线进行转换而得到的HDR图像,在本发明实施例中,也称为遵循第二标准的图像,则,在本步骤中,第三转换函数为第二标准定义的第二转换曲线。即,根据第二转换曲线,将第二目标图像的每个像素点的所有构成分量的线性基色值转换为第二目标图像的对应像素点的所有构成分量的非线性基色值。示例性的,不妨设第二目标图像为HLG域数据,则HLG转换曲线将第二目标图像的像素点的线性基色值转换为HLG域的第二目标图像的像素点的非线性基色值。应理解,高动态范围图像标准所定义的转换曲线包括,但不限于PQ转换曲线、SLF转换曲线、HLG转换曲线,不做限定。
在本发明的另一个实施例13中,在上述实施例11的步骤207之后,还包括:
409、判断输出第二目标图像显示设备的颜色空间与第二目标图像的非线性基色值所对应的颜色空间是否相同;
若不同,则将第二目标图像的非线性基色值所对应的颜色空间转换为输出第二目标图像显示设备的颜色空间。
例如,若第二目标图像的非线性基色值所对应的颜色空间为BT.2020色彩空间,而输出第二目标图像显示设备是BT.709色彩空间,则从BT.2020色彩空间转换成BT.709色彩空间彩空间,之后再执行上述实施例12的步骤308。
在本发明实施例中,可以有效地保证动态范围调整后,目标图像显示效果与第一待处理图像显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
在本发明的另一个实施例14中,在上述实施例10的步骤101之前,还包括:
510、根据第四转换函数,将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为第一待处理图像的对应像素点的所有构成分量的非线性基色值。
在一种可行的实施方式中,需要利用本发明实施例实现SDR图像到HDR图像的转换,当获得了SDR图像各像素点的所有构成分量的值后,根据HDR光电转换函数对SDR图像各像素点的所有构成分量的值进行光电转换,得到目标图像信息,所述目标图像为SDR图像的值经过HDR光电转换函数转换后对应的非线性基色值。
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像之间的转换,不妨设第一待处理图像为使用了第一标准定义的第一转换曲线进行转换而得到的HDR图像,在本发明实施例中,也称为遵循第一标准的图像,则,在本步骤中,第四转换函数为第一标准定义的第一转换曲线。即,根据第一转换曲线,将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为第一待处理图像的对应像素点的所有构成分量的非线性基色值。示例性的,不妨设第一待处理图像为PQ域数据,则PQ转换曲线将第二待处理图像的像素点的线性基色值转换为PQ域的第一待处理图像的像素点的非线性基色值。应理解,高动态范围图像标准所定义的转换曲线包括,但不限于PQ转换曲线、SLF转换曲线、HLG转换曲线,不做限定。
在本发明的另一个实施例15中,在上述实施例14的步骤510之前,还包括:
611、根据第五转换函数,将第二待处理图像的每个像素点的所有构成分量的非线性基色值转换为第二待处理图像的对应像素点的所有构成分量的线
性基色值。
在一种可行的实施方式中,需要利用本发明实施例实现SDR图像到HDR图像的转换,当获取了SDR图像的各像素点的所有构成分量的非线性基色值后,根据SDR电光转换函数将其进行电光转换,得到SDR图像各像素点的所有构成分量的值。
在一种可行的实施方式中,需要利用本发明实施例实现HDR图像之间的转换,不妨设第二待处理图像为使用了第二标准定义的第二转换曲线进行转换而得到的HDR图像,在本发明实施例中,也称为遵循第二标准的图像,则,在本步骤中,第五转换函数为第二标准定义的第二转换曲线。即,根据第五转换曲线,将第二目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值。示例性的,不妨设第二目标图像为HLG域数据,则HLG转换曲线将HLG域的第二目标图像的像素点的非线性基色值转换为第二目标图像的像素点的线性基色值。应理解,高动态范围图像标准所定义的转换曲线包括,但不限于PQ转换曲线、SLF转换曲线、HLG转换曲线,不做限定。
在本发明的另一个实施例16中,在上述实施例15的步骤611之后,还包括:
712、判断第二待处理图像显示设备的颜色空间与第一待处理图像的颜色空间是否相同;
若不同,则将第一待处理图像的颜色空间转换为第二待处理图像显示设备的颜色空间。
例如,若第一待处理图像的颜色空间为BT.709颜色空间,而第二待处理图像显示设备是颜色空间为BT.2020,则从BT.709颜色空间转换成BT.2020颜色空间,之后再执行上述实施例14的步骤510。
在本发明实施例中,可以有效地保证动态范围调整后,目标图像显示效果与第一待处理图像显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
在本发明的另一个实施例17中,实现了HDR输入图像的像素点的线性基色值到非线性基色值的转换。
示例性的,HDR输入信号源,包括浮点或者半浮点的线性EXR格式HDR图像数据,PQ或者Slog-3(采集模式)采集的HDR图像数据以及SLF HDR图像数据输入。
示例性的,线性基色值(R,G,B)到PQ域非线性基色值(R’,G’,B’)的转换,遵循以下公式:
R′=PQ_TF(max(0,min(R/10000,1)))
G′=PQ_TF(max(0,min(G/10000,1)))
B′=PQ_TF(max(0,min(B/10000,1)))
其中:
示例性的,线性基色值(R,G,B)到SLF域非线性基色值(R’,G’,B’)的转换,遵循以下公式:
R′=SLF_TF(max(0,min(R/10000,1)))
G′=SLF_TF(max(0,min(G/10000,1)))
B′=SLF_TF(max(0,min(B/10000,1)))
其中:
m=0.14
p=2.3
a=1.12762
b=-0.12762
在本发明的另一个实施例18中,实现了HDR输入图像的像素点的非线性基色值到线性基色值的转换。
示例性的,HDR输入信号源,包括浮点或者半浮点的线性EXR格式HDR图像数据,PQ或者Slog-3(采集模式)采集的HDR图像数据以及SLF HDR图像数据输入。
示例性的,从Slog-3的非线性基色值到SLF域的非线性基色值的转换包括:
801、把S-Log3域的HDR非线性基色值转换为HDR线性基色值;
If in>=171.2102946929/1023.0
out=(10.0^((in*1023.0-420.0)/261.5))*(0.18+0.01)-0.01
else
out=(in*1023.0-95.0)*0.01125000/(171.2102946929-95.0)
其中,in为输入值,out为输出值。
802、按照实施例17中方法将HDR线性基色值转化为SLF非线性基色值。
示例性的,从PQ域的非线性基色值到SLF域的非线性基色值的转换包括:
901、将PQ域的HDR非线性基色值(R,G,B)转换为HDR线性基色值(R’,G’,B’);
R=10000*inversePQ_TF(R′)
G=10000*inversePQ_TF(G′)
B=10000*inversePQ_TF(B′)
其中:
902、将HDR线性基色值(R,G,B)转换为SLF域HDR非线性基色值(R’,G’,B’)。
示例性的,从SLF域的非线性基色值到线性基色值的转换包括:
R=10000*inverseSLF_TF(R′)
G=10000*inverseSLF_TF(G′)
B=10000*inverseSLF_TF(B′)
其中:
m=0.14
p=2.3
a=1.12762
b=-0.12762
在本发明的另一个实施例19中,实现了HDR非线性基色值被SDR兼容显示的调整,包括:
HDR非线性基色值经过SDR显示兼容模块处理可以得到SDR非线性基色值,以确保SDR非线性基色值可以在SDR设备上正确显示。显示兼容模块包含动态范围调整、色彩调整、非线性转线性、以及ITU-R BT.1886EOTF逆转换。
具体的,SDR显示兼容的动态范围调整包括:
动态范围调整处理根据动态元数据对输入的HDR非线性信号R’、G’、B’进行动态范围调整,得到适合SDR动态范围的信号R1、G1、B1。本发明实施例根据动态元数据生成动态范围调整曲线,把HDR非线性信号中最大值作为参考值并对其调整动态范围,计算参考值调整前后的比值作为调整系数c,并把调整系数应用到HDR非线性信号。
曲线动态范围调整参数作用是调整HDR非线性信号的动态范围,HDR非线性信号包括但不限于SLF域的HDR非线性信号以及PQ域的HDR非线性信号等。SLF域与PQ域的动态范围调整参数的具体表达形式略有不同,由于SLF域的HDR非线性信号与PQ域的HDR非线性信号间存在较好的对应关系,容易由SLF域的动态范围调整参数推导出其对应的PQ域动态范围调整参数。本发明实施例中,SLF域的动态范围调整曲线对应的公式如下,
其中参数p,m用来控制曲线形状和弯曲程度,根据动态元数据生成;参数a,b用来控制曲线范围,即起点与终点的位置。参数p与图像动态元数据中的平均值y存在分段线性对应关系,其中分段的关键点对应关系如下表。
| 平均值y | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| 参数p | 6.0 | 5.0 | 4.5 | 4.0 | 3.2 |
表13
平均值y大于0.6时,p参数取3.2;平均值小于0.1时,p参数取6.0;当平均值介于表中相邻两项之间时,参数p可以通过线性插值方式获得。
例如,当平均值介于0.55与0.6之间时,可以通过如下线性插值方式获得参数p:
p=4.0+(y-0.55)/(0.6-0.55)*(3.2-4.0)
参数m为输出SDR显示设备的伽玛值,通常为2.4。
参数a、b可以通过解以下方程组计算得到:
其中,L1为HDR图像非线性参考最大值,L2为HDR图像非线性参考最小值,L1′为SDR图像非线性参考最大值,L2′为所述SDR图像非线性参考最小值。L1、L2由动态元数据中的平均值Y和标准差V计算得到。
L1与Y+V存在分段线性对应关系,其中分段的关键点对应关系如下表。
| 平均值与标准差的和 | 0.2 | 0.5 | 0.7 |
| HDR图像SLF域参考最大值 | 0.85 | 0.9 | 0.92 |
表14
当Y+V大于0.7时,则L1取0.92;当Y+V小于0.2时,则L1取0.85;当Y+V介于表中两个相邻数据之间时,则L1可以利用线性插值的方式得到。
L2与Y-V存在分段线性对应关系,其中分段的关键点对应关系如下表。
| 平均值与标准差之间的差 | 0.1 | 0.2 | 0.35 |
| HDR图像SLF域最小值 | 0 | 0.005 | 0.01 |
表15
如表15所示,例如:当Y-V大于0.35时,则L2取0.01;当Y-V小于0.1时,则L2取0;当Y-V介于表中两个相邻数据之间时,则L2可以利用线性插值的方式获得。
L1′、L2′由输出SDR设备的显示最大亮度及最小亮度,经过HDR线性转非线性变换得到。如常见的SDR显示设备的最大显示亮度为300尼特、最小显示亮度为0.1尼特,其对应的非线性值L1′为0.64、L2′为0.12。
具体的,SDR显示兼容的色彩调整包括:
色彩调整根据动态元数据及调整系数c对动态范围调整后的HDR非线性信号R1、G1、B1进行处理,得到处理后的HDR非线性信号R2、G2、B2。
根据HDR非线性信号值R1、G1、B1计算图像的亮度值Y1,计算方法参考Rec.709及Rec.2020亮度计算方法。色彩调整系数Alphy1由动态范围调整系数c计算得到,计算公式为幂函数F1(c)=cd。系数d与图像动态元数据中的平均值y存在分段线性对应关系,其中分段的关键点对应关系如下表。
| 平均值 | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| 系数d | 0.15 | 0.18 | 0.2 | 0.22 | 0.25 |
表16
如表16所示,当平均值y小于0.1时系数d取0.15当平均亮度值y大于0.6时,系数d取0.25,当平均值y在两个表值之间时,可以通过线性插值方式计算获得系数d。
分量调整系数AlphyR、AlphyG、AlphyB,由亮度值Y1分别与R1、G1、B1值的比值(即Y1/R1、Y1/G1、Y1/B1)经过幂函数F2处理后得到,幂函数F2的公式为F2(x)=xe;系数e与图像动态元数据中的平均值y存在分段线性对应关系,其中分段的关键点对应关系如下表:
| 平均值 | 0.1 | 0.25 | 0.3 | 0.55 | 0.6 |
| 系数e | 1.2 | 1.0 | 0.8 | 0.6 | 0.2 |
表17
如表17所示,当平均值y小于0.1时,系数e可以取1.2;当平均值y大于0.6时,系数e可以取0.2,当平均值y介于表中两个相邻数据之间时,则可以采取线性插值方式获得系数e。
在本发明的另一个实施例20中,实现了HDR非线性基色值被HDR兼容显示的调整,包括:
HDR非线性信号R’、G’、B’经过显示适应调整处理可以得到HDR非线性信号R”、G”、B”,以确保HDR非线性信号可以在不同HDR设备上正确显示。HDR显示兼容调整模块包含动态范围调整、色彩调整。
动态范围调整处理使用实施例19中所述的方法,区别在于:L1′、L2′由输出HDR设备的显示最大亮度及最小亮度,经过HDR线性转非线性变换得到。系数p、m均需要通过图像动态元数据的经过实施例19中查找表的方式获得,表项内容需要根据不同HDR显示设备通过实验标定获得。
色彩范围调整处理使用实施例19中所述的方法,区别在于:系数d、e均需要通过图像动态元数据经过查找表的方式获得,表项内容需要根据不同HDR显示设备通过实验标定获得。
图8为在本发明实施例中提供一种图像处理装置的一个实施例21的装置框图,包括:
第一确定模块2101,用于确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值,具体用于执行实施例10中步骤101及102的方法,不再赘述;
第二确定模块2102,用于确定第一转换函数的动态参数,具体用于执行实施例10中步骤103的方法,不再赘述;
第一转换模块2103,用于根据确定所述动态参数后的所述第一转换函数,将所述每个像素点的所述最大值转换为转换值,具体用于执行实施例10中步骤104的方法,不再赘述;
计算模块2104,用于计算所述每个像素点的所述转换值和所述最大值的比值,具体用于执行实施例10中步骤105的方法,不再赘述;
调整模块2105,用于根据所述比值,对所述每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
在一种可行的实施方式中,所述调整模块2105具体用于:当所述第一待处理图像的图像动态范围大于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行缩小动态范围调整;或者,当所述第一待处理图像的图像动态范围小于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行扩大动态范围调整。
在一种可行的实施方式中,所述调整模块2105还具体用于:分别计算所述比值和所述每个像素点的所述所有构成分量的非线性基色值的乘积,得到所述每个像素点的所述调整后的所有构成分量的非线性基色值。具体用于执行实施例10中步骤106的方法,不再赘述。
在一种可行的实施方式中,所述构成分量包括R分量、G分量、B分量或Y分量。
在一种可行的实施方式中,所述装置还包括:第二转换模块2106,用于根据第二转换函数,将所述第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值。具体用于执行实施例11中步骤207的方法,不再赘述。
在一种可行的实施方式中,所述装置还包括:第三转换模块2107,用于
根据第三转换函数,将所述第二目标图像的对应像素点的所有构成分量的线性基色值转换为所述第二目标图像的所述对应像素点的所有构成分量的非线性基色值。具体用于执行实施例12中步骤308的方法,不再赘述。
在一种可行的实施方式中,所述装置还包括:第四转换模块2108,用于根据第四转换函数,将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值。具体用于执行实施例14中步骤510的方法,不再赘述。
在一种可行的实施方式中,所述装置还包括:第五转换模块2109,用于根据第五转换函数,将所述第二待处理图像的每个像素点的所有构成分量的非线性基色值转换为所述第二待处理图像的对应像素点的所有构成分量的线性基色值。具体用于执行实施例15中步骤611的方法,不再赘述。
在一种可行的实施方式中,所述第一待处理图像为高动态范围图像,所述第二目标图像为标准动态范围图像,包括:所述第一转换函数包括S型转换曲线;所述第二转换函数包括高动态范围电光转换函数;所述第三转换函数包括标准动态范围光电转换函数。
在一种可行的实施方式中,所述第二待处理图像为标准动态范围图像,所述第一目标图像为高动态范围图像,包括:所述第一转换函数包括反S型转换曲线;所述第四转换函数包括高动态范围光电转换函数;所述第五转换函数包括标准动态范围电光转换函数。
在一种可行的实施方式中,所述标准动态范围电光转换函数包括BT.1886电光转换函数,所述标准动态范围光电转换函数包括BT.1886光电转换函数。
在一种可行的实施方式中,所述第一待处理图像为第一高动态范围图像,所述第一目标图像为第二高动态范围图像,所述第一高动态范围图像的动态范围和所述第二高动态范围图像的动态范围不相同,包括:所述第一转换函数包括S型转换曲线或反S型转换曲线。
在一种可行的实施方式中,所述第二目标图像为第三高动态范围图像,所述第二高动态范围图像的和所述第三高动态范围图像所遵循的高动态图像标准不相同,包括:所述第二转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第二高动态范围图像所遵循的高动态图像标准的图像;所述第三转换函数包括高动态范围光电转换函数,所述高动
态范围光电转换函数用于转换符合所述第三高动态范围图像所遵循的高动态图像标准的图像。
在一种可行的实施方式中,所述第二待处理图像为第四高动态范围图像,所述第一高动态范围图像的和所述第四高动态范围图像所遵循的高动态图像标准不相同,包括:所述第五转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第四高动态范围图像所遵循的高动态图像标准的图像;所述第四转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第一高动态范围图像所遵循的高动态图像标准的图像。
在一种可行的实施方式中,所述高动态范围电光转换函数包括:PQ电光转换函数,HLG电光转换函数或SLF电光转换函数。
在一种可行的实施方式中,所述高动态范围光电转换函数包括:PQ光电转换函数,HLG光电转换函数或SLF光电转换函数。
在一种可行的实施方式中,所述第一待处理图像位于第一待处理图像序列中,所述第一目标图像位于第一目标图像序列中,所述确定第一转换模块2103具体用于:根据以下信息中的至少一种获得所述动态参数:所述第一待处理图像或所述第一待处理图像序列的统计信息;所述第一待处理图像或所述第一待处理图像序列范围第一参考值;所述第一待处理图像或所述第一待处理图像序列范围第二参考值;所述第一目标图像或所述第一目标图像序列范围第一参考值;所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实施方式中,所述第一待处理图像或所述第一待处理图像序列的统计信息至少包括以下信息中的一种:所述第一待处理图像或所述第一待处理图像序列的像素点的至少一个构成分量的非线性基色值或线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
在一种可行的实施方式中,所述第一待处理图像或所述第一待处理图像序列范围第一参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最大值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第一预置列表,得到的第一查表值;或,第一预设值。
在一种可行的实施方式中,所述第一待处理图像或所述第一待处理图像序列范围第二参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最
小值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第二预置列表,得到的第二查表值;或,第二预设值。
在一种可行的实施方式中,所述第一目标图像或所述第一目标图像序列范围第一参考值,包括:用于显示所述第一目标图像的显示设备的亮度最大值;或,第三预设值。
在一种可行的实施方式中,所述第一目标图像或所述第一目标图像序列范围第二参考值,包括:用于显示所述第一目标图像的显示设备的亮度最小值;或,第四预设值。
在一种可行的实施方式中,所述S型转换曲线为斜率先上升后下降的曲线。
在一种可行的实施方式中,所述S型转换曲线包含一段或多段曲线。
在一种可行的实施方式中,所述S型转换曲线形式如下:
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为所述转换值,所述a、b、p以及m参数为所述S型转换曲线的动态参数。
在一种可行的实施方式中,所述p以及m参数由根据所述第一待处理图像或所述第一待处理图像所在图像序列的统计信息,查找第三预置列表获得;所述a以及b参数通过以下公式计算获得:
其中,所述L1为所述第一待处理图像或所述第一待处理图像所在图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像所在图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实施方式中,所述S型转换曲线形式由如下两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;
所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、K0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0<k1,且k1>k2。
在一种可行的实施方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;
所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第四预置列表的方式获得。
在一种可行的实施方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;
所述L1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第五预置列表的方式获得。
所述L′1参数通过以下公式计算得到:
在一种可行的实施方式中,所述反S型转换曲线为斜率先下降后上升的曲线。
在一种可行的实施方式中,所述反S型转换曲线包含一段或多段曲线。
在一种可行的实施方式中,所述反S型转换曲线形式如下:
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为所述转换值,所述a、b、p以及m参数为所述反S型转换曲线的动态参数。
在一种可行的实施方式中,所述p以及m参数由查找第六预置列表的方式获得;
所述a以及b参数通过以下公式计算:
其中,所述L1为所述第一待处理图像或所述第一待处理图像所在图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像所在图像序列范围第二参考值,所述L′1为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值。
在一种可行的实施方式中,所述反S型转换曲线形式由如下两段函数构成:
当L0≤L≤L1时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;
当L1<L≤L2时,采用以下公式计算L′值:
L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;
其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;
所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态
参数,所述L0、L′0、K0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0>k1,且k1<k2。
在一种可行的实施方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;
所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第七预置列表的方式获得。
在一种可行的实施方式中,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;
所述L1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第八预置列表的方式获得。
所述L′1参数通过以下公式计算得到:
应理解,上述装置的各可行的实现方式与实施例10的方法的各可行的实现方式方案一致,不再赘述。
在本发明实施例中,可以有效地保证动态范围调整后,目标图像显示效果与第一待处理图像显示效果的一致性,减少出现对比度变化、细节丢失等问题的概率,进而减少对图像的显示效果的影响。
上面从模块化功能实体的角度对本申请实施例中的图像处理装置进行描述,下面从硬件处理的角度对本申请实施例中的图像处理装置进行描述,如图9所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例对应的方法部分,请参阅图9,本申请实施例提供的图像处理装置另一实施例22结构示意图,包括:处理器2201、存储器
2202、通信接口2203,其中处理器2201、存储器2202、通信接口2203之间通过总线2204连接。
该图像处理装置2200,可因配置或性能不同而产生比较大的差异,如可以包括一个或多个处理器2201(例如,一个或一个以上处理器)以及存储器2202,用于存储程序代码2205以及数据2206,当所述程序代码2205被所述处理器2201执行时,可以实现本申请实施例一或者实施例一种描述的方法。本领域技术人员可以理解,图9中示出的终端设备结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,本申请不做任何限定。
应理解,上述装置实施例所涉及到的处理器2201可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器2201还可以进一步包括硬件芯片,具体可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器(programmable logic device,PLD)或其组合。另外PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合,在本发明实施例中不做任何限定。该处理器2201用于执行方法实施例10至20中的步骤,具体可以参阅上述方法实施例10至20中的描述,具体此处不再赘述。
其中,存储器2202可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器2202还可以包括上述种类的存储器的组合。该存储器用于存储该图像处理装置2200用于执行实施例一或二所描述的方法时的数据或者信息,例如用来存储第一转换函数的动态参数等信息,用于存储输入的第一待处理图像或第一待处理图像序列,第一目标图像或第一目标图像序列等数据2206。
其中,通信接口2203用于与外部设备进行通信。
总线2204可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)
总线等。所述总线还可以分为地址总线、数据总线、控制总线等。为便于表示,图9仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
应理解,该图像处理装置2200还可以包括一个或一个以上电源2207,该图像处理装置2200的功能或、步骤或者更多的细节,可以对应参阅上述方法实施例10至20中的描述,具体此处不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,模块和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。所述集成的模块以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
Claims (72)
- 一种图像处理方法,其特征在于,包括:确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值;确定第一转换函数的动态参数;根据确定所述动态参数后的所述第一转换函数,将所述每个像素点的所述最大值转换为转换值;计算所述每个像素点的所述转换值和所述最大值的比值;根据所述比值,对所述每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
- 根据权利要求1所述的方法,其特征在于,所述根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行动态范围调整,包括:当所述第一待处理图像的图像动态范围大于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行缩小动态范围调整;或者,当所述第一待处理图像的图像动态范围小于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行扩大动态范围调整。
- 根据权利要求1或2所述的方法,其特征在于,所述根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行动态范围调整,包括:分别计算所述比值和所述每个像素点的所述所有构成分量的非线性基色值的乘积,得到所述每个像素点的所述调整后的所有构成分量的非线性基色值。
- 根据权利要求1至3任一项所述的方法,其特征在于,所述构成分量包括R分量、G分量、B分量或Y分量。
- 根据权利要求1至4任一项所述的方法,其特征在于,所述获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值之后,还包括:根据第二转换函数,将所述第一目标图像的每个像素点的所有构成分量的 非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值。
- 根据权利要求5所述的方法,其特征在于,所述将所述第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值之后,还包括:根据第三转换函数,将所述第二目标图像的对应像素点的所有构成分量的线性基色值转换为所述第二目标图像的所述对应像素点的所有构成分量的非线性基色值。
- 根据权利要求1至4任一项所述的方法,其特征在于,所述确定第一待处理图像的每个像素点的所有构成分量的非线性基色值中的最大值之前,还包括:根据第四转换函数,将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值。
- 根据权利要求7所述的方法,其特征在于,所述将第二待处理图像的每个像素点的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值之前,还包括:根据第五转换函数,将所述第二待处理图像的每个像素点的所有构成分量的非线性基色值转换为所述第二待处理图像的对应像素点的所有构成分量的线性基色值。
- 根据权利要求6所述的方法,其特征在于,所述第一待处理图像为高动态范围图像,所述第二目标图像为标准动态范围图像,包括:所述第一转换函数包括S型转换曲线;所述第二转换函数包括高动态范围电光转换函数;所述第三转换函数包括标准动态范围光电转换函数。
- 根据权利要求8所述的方法,其特征在于,所述第二待处理图像为标准动态范围图像,所述第一目标图像为高动态范围图像,包括:所述第一转换函数包括反S型转换曲线;所述第四转换函数包括高动态范围光电转换函数;所述第五转换函数包括标准动态范围电光转换函数。
- 根据权利要求9或10所述的方法,其特征在于,所述标准动态范围电光转换函数包括BT.1886电光转换函数,所述标准动态范围光电转换函数包括BT.1886光电转换函数。
- 根据权利要求1所述的方法,其特征在于,所述第一待处理图像为第一高动态范围图像,所述第一目标图像为第二高动态范围图像,所述第一高动态范围图像的动态范围和所述第二高动态范围图像的动态范围不相同,包括:所述第一转换函数包括S型转换曲线或反S型转换曲线。
- 根据权利要求12所述的方法,其特征在于,所述第二目标图像为第三高动态范围图像,所述第二高动态范围图像的和所述第三高动态范围图像所遵循的高动态图像标准不相同,包括:所述第二转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第二高动态范围图像所遵循的高动态图像标准的图像;所述第三转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第三高动态范围图像所遵循的高动态图像标准的图像。
- 根据权利要求12所述的方法,其特征在于,所述第二待处理图像为第四高动态范围图像,所述第一高动态范围图像的和所述第四高动态范围图像所遵循的高动态图像标准不相同,包括:所述第五转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第四高动态范围图像所遵循的高动态图像标准的图像;所述第四转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第一高动态范围图像所遵循的高动态图像标准的图像。
- 根据权利要求9至14所述的方法,其特征在于,所述高动态范围电光转换函数包括:PQ电光转换函数,HLG电光转换函数或SLF电光转换函数。
- 根据权利要求10至14所述的方法,其特征在于,所述高动态范围光电转换函数包括:PQ光电转换函数,HLG光电转换函数或SLF光电转换函数。
- 根据权利要求1至16任一项所述的方法,其特征在于,所述第一待处理 图像位于第一待处理图像序列中,所述第一目标图像位于第一目标图像序列中,所述确定第一转换函数的动态参数包括:根据以下信息中的至少一种获得所述动态参数:所述第一待处理图像或所述第一待处理图像序列的统计信息;所述第一待处理图像或所述第一待处理图像序列范围第一参考值;所述第一待处理图像或所述第一待处理图像序列范围第二参考值;所述第一目标图像或所述第一目标图像序列范围第一参考值;所述第一目标图像或所述第一目标图像序列范围第二参考值。
- 根据权利要求17所述的方法,其特征在于,所述第一待处理图像或所述第一待处理图像序列的统计信息至少包括以下信息中的一种:所述第一待处理图像或所述第一待处理图像序列的像素点的至少一个构成分量的非线性基色值或线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
- 根据权利要求17或18所述的方法,其特征在于,所述第一待处理图像或所述第一待处理图像序列范围第一参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最大值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第一预置列表,得到的第一查表值;或,第一预设值。
- 根据权利要求17或18所述的方法,其特征在于,所述第一待处理图像或所述第一待处理图像序列范围第二参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最小值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第二预置列表,得到的第二查表值;或,第二预设值。
- 根据权利要求17或18所述的方法,其特征在于,所述第一目标图像或所 述第一目标图像序列范围第一参考值,包括:用于显示所述第一目标图像的显示设备的亮度最大值;或,第三预设值。
- 根据权利要求17或18所述的方法,其特征在于,所述第一目标图像或所述第一目标图像序列范围第二参考值,包括:用于显示所述第一目标图像的显示设备的亮度最小值;或,第四预设值。
- 根据权利要求9或12所述的方法,其特征在于,所述S型转换曲线为斜率先上升后下降的曲线。
- 根据权利要求9或12所述的方法,其特征在于,所述S型转换曲线包含一段或多段曲线。
- 根据权利要求9或12所述的方法,其特征在于,所述S型转换曲线形式由如下两段函数构成:当L0≤L≤L1时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;当L1<L≤L2时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0<k1,且k1>k2。
- 根据权利要求27所述的方法,其特征在于,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第四预置列表的方式获得。
- 根据权利要求10或12所述的方法,其特征在于,所述反S型转换曲线为斜率先下降后上升的曲线。
- 根据权利要求10或12所述的方法,其特征在于,所述反S型转换曲线包含一段或多段曲线。
- 根据权利要求10或12所述的方法,其特征在于,所述反S型转换曲线形式由如下两段函数构成:当L0≤L≤L1时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0>k1,且k1<k2。
- 根据权利要求34所述的方法,其特征在于,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第七预置列表的方式获得。
- 一种图像处理装置,其特征在于,包括:第一确定模块,用于确定第一待处理图像的每个像素点的所有构成分量的 非线性基色值中的最大值;第二确定模块,用于确定第一转换函数的动态参数;第一转换模块,用于根据确定所述动态参数后的所述第一转换函数,将所述每个像素点的所述最大值转换为转换值;计算模块,用于计算所述每个像素点的所述转换值和所述最大值的比值;调整模块,用于根据所述比值,对所述每个像素点的所有构成分量的非线性基色值的进行动态范围调整,获得第一目标图像的每个对应像素点的所有构成分量的非线性基色值。
- 根据权利要求37所述的装置,其特征在于,所述调整模块具体用于:当所述第一待处理图像的图像动态范围大于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行缩小动态范围调整;或者,当所述第一待处理图像的图像动态范围小于所述第一目标图像的图像动态范围时,根据所述比值,对所述每个像素点的所述所有构成分量的非线性基色值的进行扩大动态范围调整。
- 根据权利要求37或38所述的装置,其特征在于,所述调整模块具体用于:分别计算所述比值和所述每个像素点的所述所有构成分量的非线性基色值的乘积,得到所述每个像素点的所述调整后的所有构成分量的非线性基色值。
- 根据权利要求37至39任一项所述的装置,其特征在于,所述构成分量包括R分量、G分量、B分量或Y分量。
- 根据权利要求37至40任一项所述的装置,其特征在于,所述装置还包括:第二转换模块,用于根据第二转换函数,将所述第一目标图像的每个像素点的所有构成分量的非线性基色值转换为第二目标图像的对应像素点的所有构成分量的线性基色值。
- 根据权利要求41所述的装置,其特征在于,所述装置还包括:第三转换模块,用于根据第三转换函数,将所述第二目标图像的对应像素点的所有构成分量的线性基色值转换为所述第二目标图像的所述对应像素点的所有构成分量的非线性基色值。
- 根据权利要求37至40任一项所述的装置,其特征在于,所述装置还包括:第四转换模块,用于根据第四转换函数,将第二待处理图像的每个像素点 的所有构成分量的线性基色值转换为所述第一待处理图像的对应像素点的所有构成分量的非线性基色值。
- 根据权利要求43所述的装置,其特征在于,所述装置还包括:第五转换模块,用于根据第五转换函数,将所述第二待处理图像的每个像素点的所有构成分量的非线性基色值转换为所述第二待处理图像的对应像素点的所有构成分量的线性基色值。
- 根据权利要求42所述的装置,其特征在于,所述第一待处理图像为高动态范围图像,所述第二目标图像为标准动态范围图像,包括:所述第一转换函数包括S型转换曲线;所述第二转换函数包括高动态范围电光转换函数;所述第三转换函数包括标准动态范围光电转换函数。
- 根据权利要求44所述的装置,其特征在于,所述第二待处理图像为标准动态范围图像,所述第一目标图像为高动态范围图像,包括:所述第一转换函数包括反S型转换曲线;所述第四转换函数包括高动态范围光电转换函数;所述第五转换函数包括标准动态范围电光转换函数。
- 根据权利要求45或46所述的装置,其特征在于,所述标准动态范围电光转换函数包括BT.1886电光转换函数,所述标准动态范围光电转换函数包括BT.1886光电转换函数。
- 根据权利要求37所述的装置,其特征在于,所述第一待处理图像为第一高动态范围图像,所述第一目标图像为第二高动态范围图像,所述第一高动态范围图像的动态范围和所述第二高动态范围图像的动态范围不相同,包括:所述第一转换函数包括S型转换曲线或反S型转换曲线。
- 根据权利要求48所述的装置,其特征在于,所述第二目标图像为第三高动态范围图像,所述第二高动态范围图像的和所述第三高动态范围图像所遵循的高动态图像标准不相同,包括:所述第二转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第二高动态范围图像所遵循的高动态图像标准的图像;所述第三转换函数包括高动态范围光电转换函数,所述高动态范围光电转 换函数用于转换符合所述第三高动态范围图像所遵循的高动态图像标准的图像。
- 根据权利要求48所述的装置,其特征在于,所述第二待处理图像为第四高动态范围图像,所述第一高动态范围图像的和所述第四高动态范围图像所遵循的高动态图像标准不相同,包括:所述第五转换函数包括高动态范围电光转换函数,所述高动态范围电光转换函数用于转换符合所述第四高动态范围图像所遵循的高动态图像标准的图像;所述第四转换函数包括高动态范围光电转换函数,所述高动态范围光电转换函数用于转换符合所述第一高动态范围图像所遵循的高动态图像标准的图像。
- 根据权利要求45至50所述的装置,其特征在于,所述高动态范围电光转换函数包括:PQ电光转换函数,HLG电光转换函数或SLF电光转换函数。
- 根据权利要求46至50所述的装置,其特征在于,所述高动态范围光电转换函数包括:PQ光电转换函数,HLG光电转换函数或SLF光电转换函数。
- 根据权利要求37至52任一项所述的装置,其特征在于,所述第一待处理图像位于第一待处理图像序列中,所述第一目标图像位于第一目标图像序列中,所述确定第一转换模块具体用于:根据以下信息中的至少一种获得所述动态参数:所述第一待处理图像或所述第一待处理图像序列的统计信息;所述第一待处理图像或所述第一待处理图像序列范围第一参考值;所述第一待处理图像或所述第一待处理图像序列范围第二参考值;所述第一目标图像或所述第一目标图像序列范围第一参考值;所述第一目标图像或所述第一目标图像序列范围第二参考值。
- 根据权利要求53所述的装置,其特征在于,所述第一待处理图像或所述第一待处理图像序列的统计信息至少包括以下信息中的一种:所述第一待处理图像或所述第一待处理图像序列的像素点的至少一个构成分量的非线性基色值或线性基色值中的最大值、最小值、平均值、标准差以及直方图分布信息。
- 根据权利要求53或54所述的装置,其特征在于,所述第一待处理图像或 所述第一待处理图像序列范围第一参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最大值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第一预置列表,得到的第一查表值;或,第一预设值。
- 根据权利要求53或54所述的装置,其特征在于,所述第一待处理图像或所述第一待处理图像序列范围第二参考值,包括:用于显示所述第一待处理图像的显示设备的亮度最小值;或,根据所述第一待处理图像或所述第一待处理图像序列的统计信息,查找第二预置列表,得到的第二查表值;或,第二预设值。
- 根据权利要求53或54所述的装置,其特征在于,所述第一目标图像或所述第一目标图像序列范围第一参考值,包括:用于显示所述第一目标图像的显示设备的亮度最大值;或,第三预设值。
- 根据权利要求53或54所述的装置,其特征在于,所述第一目标图像或所述第一目标图像序列范围第二参考值,包括:用于显示所述第一目标图像的显示设备的亮度最小值;或,第四预设值。
- 根据权利要求45或48所述的装置,其特征在于,所述S型转换曲线为斜率先上升后下降的曲线。
- 根据权利要求45或48所述的装置,其特征在于,所述S型转换曲线包含一段或多段曲线。
- 根据权利要求45或48所述的装置,其特征在于,所述S型转换曲线形式由如下两段函数构成:当L0≤L≤L1时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;当L1<L≤L2时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;所述L1、 L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0<k1,且k1>k2。
- 根据权利要求63所述的装置,其特征在于,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第四预置列表的方式获得。
- 根据权利要求46或48所述的装置,其特征在于,所述反S型转换曲线为斜率先下降后上升的曲线。
- 根据权利要求46或48所述的装置,其特征在于,所述反S型转换曲线包含一段或多段曲线。
- 根据权利要求46或48所述的装置,其特征在于,所述反S型转换曲线形式由如下两段函数构成:当L0≤L≤L1时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′0+(t3-2t2+t)(L1-L0)k0+(-2t3+3t2)L′1+(t3-t2)(L1-L0)k1;当L1<L≤L2时,采用以下公式计算L′值:L′=(2t3-3t2+1)L′1+(t3-2t2+t)(L2-L1)k1+(-2t3+3t2)L′2+(t3-t2)(L2-L1)k2;其中,所述L为所述第一待处理图像的所述每个像素点的所有构成分量的非线性基色值中的最大值,所述L′为转换值;所述L0、L1、L2、L′0、L′1、L′2、k0、k1以及k2为所述S型转换曲线的动态参数,所述L0、L′0、k0表示第一段曲线起点的输入、输出值、斜率;所述L1、L′1、k1表示第一段与第二段曲线连接点的输入值、输出值、斜率;所述L2、L′2、k2表示第二段曲线终点的输入值、输出值、斜率;所述k0、k1、k2满足k0>k1,且k1<k2。
- 根据权利要求70所述的装置,其特征在于,所述L0为所述第一待处理图像或所述第一待处理图像序列范围第一参考值,所述L2为所述第一待处理图像或所述第一待处理图像序列范围第二参考 值,所述L′0为所述第一目标图像或所述第一目标图像序列范围第一参考值,所述L′2为所述第一目标图像或所述第一目标图像序列范围第二参考值;所述L1,L′1,k0,k1,k2参数由根据所述第一待处理图像或所述第一待处理图像序列的统计信息,通过查找第七预置列表的方式获得。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201680086182.6A CN109313796B (zh) | 2016-08-22 | 2016-08-30 | 一种图像处理方法以及装置 |
| US16/281,606 US11030729B2 (en) | 2016-08-22 | 2019-02-21 | Image processing method and apparatus for adjusting a dynamic range of an image |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2016/096294 WO2018035696A1 (zh) | 2016-08-22 | 2016-08-22 | 一种图像处理方法以及装置 |
| CNPCT/CN2016/096294 | 2016-08-22 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US16/281,606 Continuation US11030729B2 (en) | 2016-08-22 | 2019-02-21 | Image processing method and apparatus for adjusting a dynamic range of an image |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018035879A1 true WO2018035879A1 (zh) | 2018-03-01 |
Family
ID=61246047
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/096294 Ceased WO2018035696A1 (zh) | 2016-08-22 | 2016-08-22 | 一种图像处理方法以及装置 |
| PCT/CN2016/097375 Ceased WO2018035879A1 (zh) | 2016-08-22 | 2016-08-30 | 一种图像处理方法以及装置 |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/096294 Ceased WO2018035696A1 (zh) | 2016-08-22 | 2016-08-22 | 一种图像处理方法以及装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US11030729B2 (zh) |
| CN (1) | CN109313796B (zh) |
| WO (2) | WO2018035696A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109545153A (zh) * | 2018-11-23 | 2019-03-29 | 深圳Tcl新技术有限公司 | 液晶屏的亮度调整方法、电视机和存储介质 |
| CN112005271A (zh) * | 2018-04-02 | 2020-11-27 | 华为技术有限公司 | 利用连续编解码器进行视频编码 |
| CN114467298A (zh) * | 2019-10-18 | 2022-05-10 | 华为技术有限公司 | 一种图像信号转换处理方法、装置及终端设备 |
| US20230049334A1 (en) * | 2020-05-08 | 2023-02-16 | Huawei Technologies Co., Ltd. | High dynamic range hdr video processing method, encoding device, and decoding device |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10917583B2 (en) * | 2018-04-27 | 2021-02-09 | Apple Inc. | Standard and high dynamic range display systems and methods for high dynamic range displays |
| CN109558837B (zh) * | 2018-11-28 | 2024-03-22 | 北京达佳互联信息技术有限公司 | 人脸关键点检测方法、装置及存储介质 |
| CN117176937A (zh) * | 2019-09-27 | 2023-12-05 | 苹果公司 | 基于注视的曝光 |
| US11792531B2 (en) * | 2019-09-27 | 2023-10-17 | Apple Inc. | Gaze-based exposure |
| CN115428007A (zh) * | 2020-05-09 | 2022-12-02 | 华为技术有限公司 | 一种图像处理方法及装置 |
| WO2022087973A1 (zh) * | 2020-10-29 | 2022-05-05 | Oppo广东移动通信有限公司 | 图像处理方法及装置、计算机可读介质和电子设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101901475A (zh) * | 2010-06-12 | 2010-12-01 | 北京理工大学 | 基于视网膜自适应模型的高动态范围图像色调映射方法 |
| CN104835131A (zh) * | 2015-04-20 | 2015-08-12 | 中国科学技术大学先进技术研究院 | 一种基于ic实现hdr图像生成及色调映射的方法和系统 |
| CN105745914A (zh) * | 2013-11-22 | 2016-07-06 | 杜比实验室特许公司 | 用于逆色调映射的方法和系统 |
| CN105794216A (zh) * | 2014-09-08 | 2016-07-20 | 索尼公司 | 图像处理设备和图像处理方法 |
| WO2016124942A1 (en) * | 2015-02-06 | 2016-08-11 | British Broadcasting Corporation | Method and apparatus for conversion of hdr signals |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100631512B1 (ko) * | 2004-08-10 | 2006-10-09 | 엘지전자 주식회사 | 비선형 라플라시안을 이용한 색상 변이 향상 장치 및 방법 |
| CN101588436B (zh) * | 2008-05-20 | 2013-03-27 | 株式会社理光 | 一种压缩原始图像动态范围的方法、装置和数码相机 |
| CN101540832B (zh) * | 2009-04-24 | 2011-02-09 | 段江 | 图像信号的动态范围匹配方法 |
| CN101707666A (zh) * | 2009-11-26 | 2010-05-12 | 北京中星微电子有限公司 | 一种高动态范围的调整方法和装置 |
| CN107103588B (zh) * | 2011-09-27 | 2025-08-22 | 皇家飞利浦有限公司 | 用于图像的动态范围变换的装置和方法 |
| KR101871945B1 (ko) * | 2013-01-17 | 2018-08-02 | 한화에어로스페이스 주식회사 | 영상 처리 장치 및 방법 |
| JP6421504B2 (ja) * | 2014-07-28 | 2018-11-14 | ソニー株式会社 | 画像処理装置及び画像処理方法 |
| US10504216B2 (en) * | 2015-01-09 | 2019-12-10 | Koninklijke Philips N.V. | Luminance changing image processing with color constancy |
| US9544560B2 (en) * | 2015-01-09 | 2017-01-10 | Vixs Systems, Inc. | Dynamic range converter with generic architecture and methods for use therewith |
| CN105741245B (zh) * | 2016-01-30 | 2018-06-12 | 哈尔滨工业大学 | 基于灰度变换的自适应对比度增强算法 |
| RU2728516C2 (ru) * | 2016-03-18 | 2020-07-30 | Конинклейке Филипс Н.В. | Кодирование и декодирование hdr видео |
-
2016
- 2016-08-22 WO PCT/CN2016/096294 patent/WO2018035696A1/zh not_active Ceased
- 2016-08-30 CN CN201680086182.6A patent/CN109313796B/zh active Active
- 2016-08-30 WO PCT/CN2016/097375 patent/WO2018035879A1/zh not_active Ceased
-
2019
- 2019-02-21 US US16/281,606 patent/US11030729B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101901475A (zh) * | 2010-06-12 | 2010-12-01 | 北京理工大学 | 基于视网膜自适应模型的高动态范围图像色调映射方法 |
| CN105745914A (zh) * | 2013-11-22 | 2016-07-06 | 杜比实验室特许公司 | 用于逆色调映射的方法和系统 |
| CN105794216A (zh) * | 2014-09-08 | 2016-07-20 | 索尼公司 | 图像处理设备和图像处理方法 |
| WO2016124942A1 (en) * | 2015-02-06 | 2016-08-11 | British Broadcasting Corporation | Method and apparatus for conversion of hdr signals |
| CN104835131A (zh) * | 2015-04-20 | 2015-08-12 | 中国科学技术大学先进技术研究院 | 一种基于ic实现hdr图像生成及色调映射的方法和系统 |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112005271A (zh) * | 2018-04-02 | 2020-11-27 | 华为技术有限公司 | 利用连续编解码器进行视频编码 |
| EP3762895A4 (en) * | 2018-04-02 | 2021-04-21 | Huawei Technologies Co., Ltd. | VIDEO ENCODING WITH CONSECUTIVE CODECS |
| US11323749B2 (en) | 2018-04-02 | 2022-05-03 | Huawei Technologies Co., Ltd. | Video coding with successive codecs |
| CN112005271B (zh) * | 2018-04-02 | 2022-07-19 | 华为技术有限公司 | 利用连续编解码器进行视频编码 |
| CN109545153A (zh) * | 2018-11-23 | 2019-03-29 | 深圳Tcl新技术有限公司 | 液晶屏的亮度调整方法、电视机和存储介质 |
| CN114467298A (zh) * | 2019-10-18 | 2022-05-10 | 华为技术有限公司 | 一种图像信号转换处理方法、装置及终端设备 |
| US20220256157A1 (en) * | 2019-10-18 | 2022-08-11 | Huawei Technologies Co., Ltd. | Method and apparatus for processing image signal conversion, and terminal device |
| US12284350B2 (en) * | 2019-10-18 | 2025-04-22 | Huawei Technologies Co., Ltd. | Method and apparatus for processing image signal conversion, and terminal device |
| US20230049334A1 (en) * | 2020-05-08 | 2023-02-16 | Huawei Technologies Co., Ltd. | High dynamic range hdr video processing method, encoding device, and decoding device |
| US12470832B2 (en) * | 2020-05-08 | 2025-11-11 | Huawei Technologies Co., Ltd. | High dynamic range HDR video processing method, encoding device, and decoding device |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2018035696A1 (zh) | 2018-03-01 |
| CN109313796B (zh) | 2022-07-26 |
| US20190188837A1 (en) | 2019-06-20 |
| CN109313796A (zh) | 2019-02-05 |
| US11030729B2 (en) | 2021-06-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018035879A1 (zh) | 一种图像处理方法以及装置 | |
| CN108090879B (zh) | 一种对输入的高动态范围图像进行处理的方法和显示设备 | |
| KR102701013B1 (ko) | 동적 범위 맵핑 방법 및 장치 | |
| CN108109180B (zh) | 一种对输入的高动态范围图像进行处理的方法和显示设备 | |
| CN112565636B (zh) | 图像处理方法、装置、设备和存储介质 | |
| CN109274985B (zh) | 视频转码方法、装置、计算机设备和存储介质 | |
| CN107888943B (zh) | 图像处理 | |
| CN111292269B (zh) | 图像色调映射方法、计算机装置及计算机可读存储介质 | |
| WO2021004176A1 (zh) | 一种图像处理的方法及装置 | |
| CN111260593A (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| CN111885312B (zh) | Hdr图像的成像方法、系统、电子设备及存储介质 | |
| US11257443B2 (en) | Method for processing image, and display device | |
| WO2018132987A1 (zh) | 一种亮度调节方法及终端 | |
| CN115496668A (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| WO2017203942A1 (ja) | 画像処理装置、および画像処理方法、並びにプログラム | |
| WO2021073304A1 (zh) | 一种图像处理的方法及装置 | |
| CN111311500B (zh) | 一种对图像进行颜色还原的方法和装置 | |
| JP2018511193A (ja) | ピクチャの逆トーン・マッピングのための方法及び装置 | |
| CN108024104B (zh) | 一种对输入的高动态范围图像进行处理的方法和显示设备 | |
| CN108694030B (zh) | 处理高动态范围图像的方法和装置 | |
| CN105959584A (zh) | 一种图像处理方法、图像处理装置及显示装置 | |
| WO2021226769A1 (zh) | 一种图像处理方法及装置 | |
| CN120339435A (zh) | 图像处理方法、装置、设备、存储介质和程序产品 | |
| CN116684630B (zh) | 一种基于极轻量级Unet的动态范围压缩方法及系统 | |
| CN116320776A (zh) | 图像处理方法、装置、芯片、电子设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16913900 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16913900 Country of ref document: EP Kind code of ref document: A1 |