# US 2023/0054046 A1 · Dynamic range mapping method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0054046 A1
- Document ID: US20230054046A1
- Status: Published application
- Kind: A1
- Application number: 17/975,893
- Filed: 2022-10-28
- Published: 2023-02-23
- Earliest claimed: 2020-04-30
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Weiwei XU; Quanhe YU; Hu CHEN; Yichuan WANG
- Web page: https://patentgrep.com/patent/US20230054046A1

## CPC

- G06T 5/92: based on global image properties
- G06V 10/60: relating to illumination properties, e.g. using a reflectance or lighting model
- G09G 3/3406: {Control of illumination source (illumination devices structurally associated with liquid crystal cells G02F1/1336)}
- G06T 2207/10024: Color image
- G06T 2207/20208: High dynamic range [HDR] image processing
- G09G 2320/0626: for control of overall brightness
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G09G: ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION (arrangements for transferring data between digital computers and displays G06F3/14; static indicating arrangements comprising an association of a number of separate sources or light control cells G09F9/00; static indicating arrangements comprising integral associations of a number of light sources H01J, H01K, H10H, H05B33/12; scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission, details thereof H04N1/00)

## Abstract

This application provides a dynamic range mapping method and apparatus. The dynamic range mapping method includes: obtaining a display parameter of a terminal device; obtaining feature information of image data; obtaining a first parameter of a first tone mapping curve of the image data; when a preset condition is met, obtaining a second parameter of a second tone mapping curve based on the first parameter, the display parameter of the terminal device, and the feature information of the image data, where output luminance at a first point on the second tone mapping curve is not greater than input luminance at the first point on the second tone mapping curve; and performing dynamic range mapping on the image data based on the second parameter of the second tone mapping curve.

## Claims

### Claim 1

A dynamic range mapping method, comprising:
obtaining a display parameter of a terminal device;
obtaining feature information of image data;
obtaining a first parameter of a first tone mapping curve of the image data;
when a preset condition is met, obtaining a second parameter of a second tone mapping curve based on the first parameter, the display parameter of the terminal device, and the feature information of the image data, wherein output luminance at a first point on the second tone mapping curve is not greater than input luminance at the first point on the second tone mapping curve; and
performing dynamic range mapping on the image data based on the second parameter of the second tone mapping curve.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the preset condition is met when any one of the following conditions is met:
when tone mapping is performed on the image data based on the first parameter, output luminance at a second point on the first tone mapping curve is greater than input luminance at the second point on the first tone mapping curve; or
a parameter pP1 in the first parameter is greater than a first value Tp, wherein the first value Tp is obtained based on aP1 in the first parameter and a preset correspondence between aP1 and pP1; or
a parameter aP1 in the first parameter is greater than a second value Ta, wherein the second value Ta is obtained based on pP1 in the first parameter and a preset correspondence between aP1 and pP1; or
a product of a parameter aP1 and a parameter pP1 in the first parameter is greater than a third value Tap, wherein the third value Tap is a preset rational number.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the second parameter comprises a first linear spline curve parameter, and the first linear spline curve parameter comprises a slope MB[0][0] of a first linear spline on the second tone mapping curve and/or a maximum value TH3[0] of a luminance value of a range pixel of the first linear spline and/or an intersection point base_offset of the first linear spline and a vertical coordinate axis.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the first parameter comprises a second linear spline curve parameter, the second linear spline curve parameter comprises a slope MB_mid[0][0] of a second linear spline on the first tone mapping curve and/or a maximum value TH3_mid[0] of a luminance value of a range pixel of the second linear spline, the display parameter comprises maximum display luminance MaxDisplay of the terminal device, and the feature information comprises a maximum luminance correction value max_lum of the image data; and
the obtaining a second parameter of a second tone mapping curve based on the first parameter, the display parameter, and the feature information comprises:
adjusting the curve parameters MB_mid[0][0] and TH3_mid[0] based on the maximum display luminance MaxDisplay and the maximum luminance correction value max_lum to obtain the curve parameters MB[0][0] and TH3[0].

### Claim 5 (depends on 4)

The method according to claim 4, wherein the curve parameters MB_mid[0][0] and TH3_mid[0], and the curve parameters MB[0][0] and TH3[0] satisfy the following formulas:
MB[0][0]=min(max(MB_mid[0][0]+(1−MB_mid[0][0])*(WA)N1,MB_mid[0][0]),1), and
TH3[0]=min(max(TH3_mid[0]+(max_lum−TH3_mid[0])*(WA)N2,TH3_mid[0]),1), wherein
WA
=
MaxDisplay
max_lum
-
MaxDisplay
G
⁡
(
MaxDisplay
,
m_a
⁢
_T
)
1
-
MaxDisplay
G
⁡
(
MaxDisplay
,
m_a
⁢
_T
)
,
G
⁡
(
L
,
m_a
)
=
(
K
⁢
3
×
(
L
-
m_b
m_a
)
1
m
⁢
_
⁢
m
m_p
-
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
(
L
-
m_b
m_a
)
1
m
⁢
_
⁢
m
)
1
m
⁢
_
⁢
n
,
or
G
⁡
(
L
,
m_a
)
=
(
K
⁢
3
×
(
L
m_a
)
1
m
⁢
_
⁢
m
m_p
-
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
(
L
m_a
)
1
m
⁢
_
⁢
m
)
1
m
⁢
_
⁢
n
,
wherein
L is an input signal, G(L) is an inverse function of a function H(L) corresponding to a tone mapping curve, m_a, m_b, m_m, m_n, k1, k2, and k3 are curve parameters, G(L, m_a_T) indicates a G(L) value corresponding to an input variable L when a value of a parameter M_a of G(L) is m_a_T, N1 and N2 are rational numbers, max(a, b) indicates calculating a larger value of a and b, min(a, b) indicates calculating a smaller value of a and b, and H(L) is
H
⁡
(
L
)
=
m_a
×
(
m_p
×
L
m
⁢
_
⁢
n
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
L
m
⁢
_
⁢
n
+
K
⁢
3
)
m
⁢
_
⁢
m
+
m_b
,
or
H
⁡
(
L
)
=
m_a
×
(
m_p
×
L
m
⁢
_
⁢
n
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
L
m
⁢
_
⁢
n
+
K
⁢
3
)
m
⁢
_
⁢
m
.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the second parameter comprises a cubic spline curve parameter, and the cubic spline curve parameter comprises interpolation point values TH1[1], TH2[1], and TH3[1] of a cubic spline on the second tone mapping curve, wherein TH1[1] indicates a minimum value of a luminance value of a first range pixel of the cubic spline, TH2[1] indicates a maximum value of the luminance value of the first range pixel of the cubic spline and a minimum value of a luminance value of a second range pixel of the cubic spline, and TH3[1] indicates a maximum value of the luminance value of the second range pixel of the cubic spline.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the obtaining a first parameter of a first tone mapping curve of the image data comprises:
obtaining metadata of the image data; and
determining the first parameter of the first tone mapping curve based on the metadata and the display parameter.

### Claim 8

A dynamic range mapping apparatus, comprising:
at least one processor; and
at least one memory coupled to the at least one processor and storing instructions, which when executed by the at least one processor, cause the at least one processor to:
obtain a display parameter of a terminal device,
obtain feature information of image data; and
obtain a first parameter of a first tone mapping curve of the image data;
when a preset condition is met, obtain a second parameter of a second tone mapping curve based on the first parameter, the display parameter of the terminal device, and the feature information of the image data, wherein output luminance at a first point on the second tone mapping curve is not greater than input luminance at the first point on the second tone mapping curve; and
perform dynamic range mapping on the image data based on the second parameter of the second tone mapping curve.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein the preset condition is met when any one of the following conditions is met:
when tone mapping is performed on the image data based on the first parameter, output luminance at a second point on the first tone mapping curve is greater than input luminance at the second point on the first tone mapping curve; or
a parameter pP1 in the first parameter is greater than a first value Tp, wherein the first value Tp is obtained based on aP1 in the first parameter and a preset correspondence between aP1 and pP1; or
a parameter aP1 in the first parameter is greater than a second value Ta, wherein the second value Ta is obtained based on pP1 in the first parameter and a preset correspondence between aP1 and pP1; or
a product of a parameter aP1 and a parameter pP1 in the first parameter is greater than a third value Tap, wherein the third value Tap is a preset rational number.

### Claim 10 (depends on 8)

The apparatus according to claim 8, wherein the second parameter comprises a first linear spline curve parameter, and the first linear spline curve parameter comprises a slope MB[0][0] of a first linear spline on the second tone mapping curve and/or a maximum value TH3[0] of a luminance value of a range pixel of the first linear spline and/or an intersection point base_offset of the first linear spline and a vertical coordinate axis.

### Claim 11 (depends on 8)

The apparatus according to claim 8, wherein the first parameter comprises a second linear spline curve parameter, the second linear spline curve parameter comprises a slope MB_mid[0][0] of a second linear spline on the first tone mapping curve and/or a maximum value TH3_mid[0] of a luminance value of a range pixel of the second linear spline, the display parameter comprises maximum display luminance MaxDisplay of the terminal device, and the feature information comprises a maximum luminance correction value max_lum of the image data; and
the at least one processor is configured to:
adjust the curve parameters MB_mid[0][0] and TH3_mid[0] based on the maximum display luminance MaxDisplay and the maximum luminance correction value max_lum to obtain the curve parameters MB[0][0] and TH3[0].

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the curve parameters MB_mid[0][0] and TH3_mid[0], and the curve parameters MB[0][0] and TH3[0] satisfy the following formulas:
MB[0][0]=min(max(MB_mid[0][0]+(1−MB_mid[0][0])*(WA)N1,MB_mid[0][0]),1) and
TH3[0]=min(max(TH3_mid[0]+(max_lum−TH3_mid[0])*(WA)N2,TH3_mid[0]),1), wherein
WA
=
MaxDisplay
max_lum
-
MaxDisplay
G
⁡
(
MaxDisplay
,
m_a
⁢
_T
)
1
-
MaxDisplay
G
⁡
(
MaxDisplay
,
m_a
⁢
_T
)
,
G
⁡
(
L
,
m_a
)
=
(
K
⁢
3
×
(
L
-
m_b
m_a
)
1
m
⁢
_
⁢
m
m_p
-
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
(
L
-
m_b
m_a
)
1
m
⁢
_
⁢
m
)
1
m
⁢
_
⁢
n
,
or
G
⁡
(
L
,
m_a
)
=
(
K
⁢
3
×
(
L
m_a
)
1
m
⁢
_
⁢
m
m_p
-
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
(
L
m_a
)
1
m
⁢
_
⁢
m
)
1
m
⁢
_
⁢
n
,
wherein
L is an input signal, G(L) is an inverse function of a function H(L) corresponding to a tone mapping curve, m_a, m_b, m_m, m_n, k1, k2, and k3 are curve parameters, G(L, m_a_T) indicates a G(L) value corresponding to an input variable L when a value of a parameter M_a of G(L) is m_a_T, N1 and N2 are rational numbers, max(a, b) indicates calculating a larger value of a and b, min(a, b) indicates calculating a smaller value of a and b, and H(L) is
H
⁡
(
L
)
=
m_a
×
(
m_p
×
L
m
⁢
_
⁢
n
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
L
m
⁢
_
⁢
n
+
K
⁢
3
)
m
⁢
_
⁢
m
+
m_b
,
or
H
⁡
(
L
)
=
m_a
×
(
m_p
×
L
m
⁢
_
⁢
n
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
L
m
⁢
_
⁢
n
+
K
⁢
3
)
m
⁢
_
⁢
m
.

### Claim 13 (depends on 8)

The apparatus according to claim 8, wherein the second parameter comprises a cubic spline curve parameter, and the cubic spline curve parameter comprises interpolation point values TH1[1], TH2[1], and TH3[1] of a cubic spline on the second tone mapping curve, wherein TH1[1] indicates a minimum value of a luminance value of a first range pixel of the cubic spline, TH2[1] indicates a maximum value of the luminance value of the first range pixel of the cubic spline and a minimum value of a luminance value of a second range pixel of the cubic spline, and TH3[1] indicates a maximum value of the luminance value of the second range pixel of the cubic spline.

### Claim 14 (depends on 8)

The apparatus according to claim 8, wherein the at least one processor is configured to:
obtain metadata of the image data; and
determine the first parameter of the first tone mapping curve based on the metadata and the display parameter.

### Claim 15

A computer-readable storage medium, comprising a computer program, wherein when executed on a computer or by a processor, cause the computer or the processor to perform following steps-operations:
obtaining a display parameter of a terminal device;
obtaining feature information of image data;
obtaining a first parameter of a first tone mapping curve of the image data;
when a preset condition is met, obtaining a second parameter of a second tone mapping curve based on the first parameter, the display parameter of the terminal device, and the feature information of the image data, wherein output luminance at a first point on the second tone mapping curve is not greater than input luminance at the first point on the second tone mapping curve; and
performing dynamic range mapping on the image data based on the second parameter of the second tone mapping curve.

### Claim 16 (depends on 15)

The computer-readable storage medium according to claim 15, wherein the preset condition is met when any one of the following conditions is met:
when tone mapping is performed on the image data based on the first parameter, output luminance at a second point on the first tone mapping curve is greater than input luminance at the second point on the first tone mapping curve; or
a parameter pP1 in the first parameter is greater than a first value Tp, wherein the first value Tp is obtained based on aP1 in the first parameter and a preset correspondence between aP1 and pP1; or
a parameter aP1 in the first parameter is greater than a second value Ta, wherein the second value Ta is obtained based on pP1 in the first parameter and a preset correspondence between aP1 and pP1; or
a product of a parameter aP1 and a parameter pP1 in the first parameter is greater than a third value Tap, wherein the third value Tap is a preset rational number.

### Claim 17 (depends on 15)

The computer-readable storage medium according to claim 15, wherein the second parameter comprises a first linear spline curve parameter, and the first linear spline curve parameter comprises a slope MB[0][0] of a first linear spline on the second tone mapping curve and/or a maximum value TH3[0] of a luminance value of a range pixel of the first linear spline and/or an intersection point base_offset of the first linear spline and a vertical coordinate axis.

### Claim 18 (depends on 15)

The computer-readable storage medium according to claim 15,
wherein the first parameter comprises a second linear spline curve parameter, the second linear spline curve parameter comprises a slope MB_mid[0][0] of a second linear spline on the first tone mapping curve and/or a maximum value TH3_mid[0] of a luminance value of a range pixel of the second linear spline, the display parameter comprises maximum display luminance MaxDisplay of the terminal device, and the feature information comprises a maximum luminance correction value max_lum of the image data; and
the computer or the processor is further configured to:
adjust the curve parameters MB_mid[0][0] and TH3_mid[0] based on the maximum display luminance MaxDisplay and the maximum luminance correction value max_lum to obtain the curve parameters MB[0][0] and TH3[0].

### Claim 19 (depends on 18)

The computer-readable storage medium according to claim 18, wherein the curve parameters MB_mid[0][0] and TH3_mid[0], and the curve parameters MB[0][0] and TH3[0] satisfy the following formulas:
MB[0][0]=min(max(MB_mid[0][0]+(1−MB_mid[0][0])*(WA)N1,MB_mid[0][0]),1), and
TH3[0]=min(max(TH3_mid[0]+(max_lum−TH3_mid[0])*(WA)N2,TH3_mid[0]),1), wherein
WA
=
MaxDisplay
max_lum
-
MaxDisplay
G
⁡
(
MaxDisplay
,
m_a
⁢
_T
)
1
-
MaxDisplay
G
⁡
(
MaxDisplay
,
m_a
⁢
_T
)
,
G
⁡
(
L
,
m_a
)
=
(
K
⁢
3
×
(
L
-
m_b
m_a
)
1
m
⁢
_
⁢
m
m_p
-
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
(
L
-
m_b
m_a
)
1
m
⁢
_
⁢
m
)
1
m
⁢
_
⁢
n
,
or
G
⁡
(
L
,
m_a
)
=
(
K
⁢
3
×
(
L
m_a
)
1
m
⁢
_
⁢
m
m_p
-
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
(
L
m_a
)
1
m
⁢
_
⁢
m
)
1
m
⁢
_
⁢
n
,
wherein
L is an input signal, G(L) is an inverse function of a function H(L) corresponding to a tone mapping curve, m_a, m_b, m_m, m_n, k1, k2, and k3 are curve parameters, G(L, m_a_T) indicates a G(L) value corresponding to an input variable L when a value of a parameter M_a of G(L) is m_a_T, N1 and N2 are rational numbers, max(a, b) indicates calculating a larger value of a and b, min(a, b) indicates calculating a smaller value of a and b, and H(L) is
H
⁡
(
L
)
=
m_a
×
(
m_p
×
L
m
⁢
_
⁢
n
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
L
m
⁢
_
⁢
n
+
K
⁢
3
)
m
⁢
_
⁢
m
+
m_b
,
or
H
⁡
(
L
)
=
m_a
×
(
m_p
×
L
m
⁢
_
⁢
n
(
K
⁢
1
×
m_p
-
K
⁢
2
)
×
L
m
⁢
_
⁢
n
+
K
⁢
3
)
m
⁢
_
⁢
m
.

### Claim 20 (depends on 15)

The computer-readable storage medium according to claim 15, wherein the computer or the processor is further configured to:
obtain metadata of the image data; and
determine the first parameter of the first tone mapping curve based on the metadata and the display parameter.
