METHOD AND DEVICE FOR MATCHING COLORS BETWEEN COLOR PICTURES OF DIFFERENT DYNAMIC RANGE

20180007392 · 2018-01-04

    Inventors

    Cpc classification

    International classification

    Abstract

    A method is disclosed that comprises mapping a high-dynamic range luminance picture to a standard-dynamic range luminance picture based on a backlight value Ba.sub.c associated with the high-dynamic range luminance picture.

    Claims

    1-16. (canceled)

    17. A method of mapping colors from an input color gamut into an output color gamut, comprising a chroma scaling in which chroma components of colors are scaled by a chroma scaling factor β″, and a chroma mapping of said scaled chroma components, wherein said chroma scaling factor β″ is determined such as to minimize a sum of chrominance distances between colors of an input set distributed in said input color gamut and colors of an output set obtained by chroma mapping said colors of the input set using said chroma mapping.

    18. The method of claim 17, wherein said mapping further comprises a tone mapping or an inverse tone mapping luminance component of said colors.

    19. The method of claim 18, wherein said tone mapping or an inverse tone mapping is non-linear in function of said luminance component.

    20. The method of claim 18, wherein the chroma scaling factor of a color depends on the luminance component of said color.

    21. The method of claim 17, wherein the chroma scaling factor depends on a modulation value Ba representative of a brightness of a color picture to map, of a group of pictures (GOP) to map, or of a part of a color picture to map.

    22. The method of claim 17, wherein said chroma mapping is performed in a LUV color space.

    23. The method of claim 17, wherein the input color gamut is defined as a finite set of points in the CIExy color space.

    24. The method of claim 23, wherein said distribution is obtained through a uniform meshing in the CIExy color space.

    25. The method of claim 17, wherein perceptual weights are associated with said colors of said input and output sets such that said chrominance distances of said sum are weighted by said perceptual weight.

    26. The method of claim 17, wherein values of said chroma scaling factor are provided in a look up table with respect to values of the luminance component of the output color picture.

    27. The method of claim 26, wherein, for different modulation values of the input color picture, dedicated look up tables or a combined look up table are provided.

    28. The method of claim 27, wherein a desired multiplicative factor associated with a dedicated backlight value is either read from the look up table or determined by interpolation between corresponding multiplicative factors associated with neighboring backlight values.

    29. The method of claim 17, wherein the perceived color error distance is based on the ab distance in the Lab colorspace.

    30. A device for mapping colors from an input color gamut into an output color gamut, comprising at least one processor configured to: chroma scale chroma components of colors by a chroma scaling factor β″, and chroma map said scaled chroma components, wherein said chroma scaling factor β″ is determined such as to minimize a sum of chrominance distances between colors of an input set distributed in said input color gamut and colors of an output set obtained by chroma mapping said colors of the input set using said chroma mapping.

    31. The device of claim 30, wherein said at least one processor is further configured to tone map or inverse tone map luminance component of said colors.

    32. A computer program product comprising program code instructions to execute the step of the method according to claim 17 when this program is executed on a computer.

    Description

    BRIEF DESCRIPTION OF DRAWINGS

    [0047] In the drawings, an embodiment of the present disclosure is illustrated:

    [0048] FIG. 1 shows examples of chromaticity diagrams;

    [0049] FIG. 2 shows schematically a diagram of the steps of a first example of a method of encoding a color picture;

    [0050] FIG. 3 illustrates the principle of a gamut mapping in accordance with the present disclosure;

    [0051] FIG. 4 shows schematically a diagram of the sub-steps of the step 12;

    [0052] FIG. 5 shows schematically a diagram of the sub-steps of the step 11;

    [0053] FIG. 6 shows schematically a diagram of the steps of a first example of a method of decoding a color picture from at least one bitstream;

    [0054] FIG. 7 shows schematically a diagram of the sub-steps of the step 22;

    [0055] FIG. 8 shows schematically a diagram of the sub-steps of the step 23;

    [0056] FIG. 9 shows schematically a diagram of the steps of a second example of a method of encoding a color picture;

    [0057] FIG. 10 shows schematically a diagram of the steps of a second example of a method of decoding a color picture from at least one bitstream;

    [0058] FIG. 11 shows schematically a diagram of the steps of a method for matching colors between color pictures of different dynamic range in accordance with an embodiment of the disclosure;

    [0059] FIG. 12 shows schematically a diagram of the steps of a method for matching colors between color pictures of different dynamic range in accordance with another embodiment of the disclosure;

    [0060] FIG. 13 illustrates a discretized gamut with uniform meshs;

    [0061] FIG. 14 illustrates a set of discretized gamuts for various values of Y.sub.0;

    [0062] FIG. 15 illustrates a discretized gamut with weighted meshs;

    [0063] FIG. 16 schematically shows a plot of a cost function cost (β″);

    [0064] FIG. 17 schematically shows plots of cost functions cost (β″.sub.codec(Ba,L)) for various values of Ba; and

    [0065] FIG. 18 shows an example of an architecture of a device in accordance with an embodiment of the disclosure.

    DESCRIPTION OF EMBODIMENTS

    [0066] The present disclosure will be described more fully hereinafter with reference to the accompanying figures, in which embodiments of the disclosure are shown. This disclosure may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein. Accordingly, while the disclosure is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that there is no intent to limit the disclosure to the particular forms disclosed, but on the contrary, the disclosure is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the disclosure as defined by the claims.

    [0067] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises”, “comprising,” “includes” and/or “including” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Moreover, when an element is referred to as being “responsive” or “connected” to another element, it can be directly responsive or connected to the other element, or intervening elements may be present. In contrast, when an element is referred to as being “directly responsive” or “directly connected” to other element, there are no intervening elements present. As used herein the term “and/or” includes any and all combinations of one or more of the associated listed items and may be abbreviated as “/”.

    [0068] It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element without departing from the teachings of the disclosure.

    [0069] Although some of the diagrams include arrows on communication paths to show a primary direction of communication, it is to be understood that communication may occur in the opposite direction to the depicted arrows.

    [0070] Some embodiments are described with regard to block diagrams and operational flowcharts in which each block represents a circuit element, module, or portion of code which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in other implementations, the function(s) noted in the blocks may occur out of the order noted. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending on the functionality involved.

    [0071] Reference herein to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one implementation of the disclosure. The appearances of the phrase “in one embodiment” or “according to an embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments necessarily mutually exclusive of other embodiments.

    [0072] Reference numerals appearing in the claims are by way of illustration only and shall have no limiting effect on the scope of the claims.

    [0073] While not explicitly described, the present embodiments and variants may be employed in any combination or sub-combination.

    [0074] A color picture is considered as having three color components in which the pixel values of the color picture are represented. The present disclosure, although explained by way of concrete example, is not limited to any color space in which the three components are represented but extends to any color space such as RGB, CIELUV, XYZ, CIELab, etc.

    [0075] In an embodiment, a factor (i.e a real value) depends on a modulation value Ba. A modulation (or backlight) value is usually associated with an HDR picture and is representative of the brightness of the HDR picture. Here, the term (modulation) backlight is used by analogy with TV sets made of a color panel, like a LCD panel for instance, and a rear illumination apparatus, like a LED array for instance. The rear apparatus, usually generating white light, is used to illuminate the color panel to provide more brightness to the TV. As a consequence, the luminance of the TV is the product of the luminance of rear illuminator and of the luminance of the color panel. This rear illuminator is often called “modulation” or “backlight” and its intensity is somewhat representative of the brightness of the overall scene.

    [0076] FIG. 2 shows schematically a diagram of the steps of a first example of a method of encoding a color picture I.

    [0077] In step 11, a module C obtains a luminance component L and two chrominance components C1 and C2 from a color picture I to be encoded. For instance the components (L, C1, C2) may belong to the YUV color space, obtained after applying an OETF on the color picture I, and the color components Ec may belong either to a linear RGB or XYZ color space.

    [0078] In step 12, a module GM maps the luminance L and chrominance C1, C2 components onto a final luminance component L″ and two final chrominance components C″1, C″2 in order that the gamut G2 of colors obtained from said final luminance (L″) and chrominance (C″1, C″2) components maps onto the gamut G1 of the colors of the color picture I to be encoded.

    [0079] FIG. 3 illustrates such a gamut mapping. In dashed line is represented the gamut (R,G,B,W) of the colors obtained from the component L and the two chrominance components C1 and C2 and in solid line the gamut (R′, G′, B′, W′) of the colors of the picture I to be encoded.

    [0080] Mapping the gamut (R, G, B, W) onto the gamut (R′, G′, B′, W′) means mapping the primaries R, G, B to the primaries R′, G′, B′ respectively and mapping the white point W to the white point W′. The purpose of the mapping is to transform (L, C1, C2) into (L″, C″1, C″2) such that the perceived colors obtained from the L″, C″1, C″2 components match the colors of the color picture I better than (L, C1, C2) do.

    [0081] In step 13, an encoder ENC encodes the final luminance L″ component and the two final chrominance components C″1, C″2.

    [0082] According to an embodiment, the encoded component L″ and chrominance components C″1, C″2 are stored in a local or remote memory and/or added into a bitstream F.

    [0083] According to an embodiment of the step 12, illustrated in FIG. 4, the two final chrominance components C″1, C″2 are obtained by scaling (step 121) each of the two chrominance components C1, C2 by a factor β.sup.−1(Ba,L(i)) that depends on both a modulation value Ba, obtained from the luminance component L, and the value of each pixel i of the luminance component L, and a module LCC (step 122) obtains the final luminance component L″ by linearly combining together the luminance component L and the two final chrominance components C″1, C″2:

    [00002] { L = L - mC 1 - nC 2 C 1 = β - 1 ( Ba , L ( i ) ) * C 1 C 2 = β - 1 ( Ba , L ( i ) ) * C 2 ( A )

    [0084] where m and n are coefficients (real values) that avoid color saturation by correcting the highest luminance peaks.

    [0085] According to an embodiment, the coefficients m and n are stored in either a local or remote memory and/or added to a bitstream BF as illustrated in FIG. 4.

    [0086] According to a variant of the module LCC (of equation A), the values of the final luminance component L″ are always lower than the values of the luminance component L:


    L″=L−max(0,mC.sub.1′+nC.sub.2′)

    [0087] This ensures that the values of the final luminance component L″ do not exceed the values of the luminance component L and thus ensures that no color saturation occurs.

    [0088] According to an embodiment of the step 11, illustrated in FIG. 5, in step 110, a module IC obtains a component Y that represents the luminance of the color picture I by linearly combining together the three components Ec:

    [00003] Y = A 1 [ E 1 E 2 E 3 ]

    where A1 is the first row of a 3×3 matrix A that defines a color space transforms from the (E1, E2, E3) color space to a color space (Y, C1, C2).

    [0089] In step 130, a module FM obtains the luminance component L by applying a non-linear function f on the component Y:


    L=f(Ba,Y)  (1)

    where Ba is a modulation value obtained from the component Y by the module BaM (step 120).

    [0090] Applying the non-linear function f on the component Y reduces its dynamic range. In other terms, the dynamic of the luminance component L is reduced compared to the dynamic of the component Y.

    [0091] Basically the dynamic range of the component Y is reduced in order that the luminance values of the component L are represented by using 10 bits.

    [0092] According to an embodiment, the component Y is divided by the modulation value Ba before applying the non-linear function f:


    L=f(Y/Ba)  (2)

    [0093] According to an embodiment, the non-linear function f is a gamma function:


    L=B.Math.Y.sub.1.sup.Y

    [0094] where Y.sub.1 equals either Y or Y/Ba according to the embodiments of eq. (1) or (2), B is a constant value, γ is a parameter (real value strictly below 1).

    [0095] According to an embodiment, the non-linear function f is a S-Log function:


    L=a.Math.ln(Y.sub.1+b)+c

    where a, b and c are parameters (real values) of a SLog curve determined such that f(0) and f(1) are invariant, and the derivative of the SLog curve is continuous in 1 when prolonged by a gamma curve below 1. Thus, a, b and c are functions of the parameter γ.

    [0096] Typical values are shown in Table 1.

    TABLE-US-00001 TABLE 1 γ a B c 1/2.0 0.6275 0.2550 0.8575 1/2.4 0.4742 0.1382 0.9386 1/2.8 0.3861 0.0811 0.9699

    [0097] In an advantageous embodiment, a value of γ close to 1/2.5 is efficient in terms of HDR compression performance as well as good viewability of the obtained SDR luma. Thus, the 3 parameters may advantageously take the following values: a=0.44955114, b=0.12123691, c=0.94855684.

    [0098] According to an embodiment, the non-linear function f is either a gamma correction or a SLog correction according to the pixel values of the component Y.

    [0099] Applying a gamma correction on the component Y, pulls up the dark regions but does not lower enough high lights to avoid burning of bright pixels.

    [0100] Then, according to an embodiment, the module FM applies either the gamma correction or the SLog correction according to the pixel values of the component Y. An information data Inf may indicate whether either the gamma correction or Slog correction applies.

    [0101] For example, when the pixel value of the component Y is below a threshold (equal to 1), then the gamma correction is applied and otherwise the SLog correction is applied.

    [0102] According to an embodiment of the step 120, the modulation value Ba is an average, median, min or max value of the pixel values of the component Y. These operations may be performed in the linear HDR luminance domain Y.sub.lin or in a non-linear domain like In(Y) or Y.sup.γ with γ<1.

    [0103] According to an embodiment, when the method is used to encode several color pictures belonging to a sequence of pictures, a modulation value Ba is determined for each color picture, a Group of Pictures (GOP) or for a part of a color picture such as, but not limited to, a slice or a Transfer Unit as defined in HEVC.

    [0104] According to an embodiment, the value Ba and/or the parameters of the non-linear function f (such as a, b, c or γ) and/or the information data Inf is (are) stored in a local or remote memory and/or added into a bitstream BF as illustrated in FIGS. 2 and 5.

    [0105] In step 140, a module CC obtains at least one color component EC (c=1, 2, 3) from the color picture I. A color component Ec may be obtained directly from a local or a remote memory or by applying a color transform on the color picture I.

    [0106] In step 150, an intermediate color component E′c (c=1, 2 or 3) is obtained by scaling each color component Ec by a factor r(L) that depends on the luminance component L:

    [00004] { E 1 ( i ) = E 1 ( i ) * r ( L ( i ) ) E 2 ( i ) = E 2 ( i ) * r ( L ( i ) ) E 3 ( i ) = E 3 ( i ) * r ( L ( i ) )

    [0107] where r(L(i)) is a factor (real value), determined by the module RM (step 160), that depends on the value of a pixel i of the component L, E.sub.c′(i) is the value of the pixel i of the intermediate color component E′c, and E.sub.c (i) is the value of the pixel i of the color component Ec.

    [0108] Scaling by a factor means multiplying by said factor or dividing by the inverse of said factor.

    [0109] Scaling each color component Ec by the factor r(L) that depends on the luminance component L preserves the hue of the colors of the color picture I.

    [0110] According to an embodiment of the step 160, the factor r(L) is the ratio of the luminance component L over the component Y:

    [00005] r ( L ( i ) ) = L ( i ) Y ( i )

    [0111] with Y(i) being the value of a pixel i of the component Y. Actually, the value Y(i) of a pixel of the component Y depends non-ambiguously on the value L(i) of a pixel of the luminance component L, such that the ratio can be written as a function of L(i) only.

    [0112] This embodiment is advantageous because scaling each color component Ec by the factor r(L) that further depends on the component Y preserves the hue of the colors of the color picture I and thus improves the visual quality of the decoded color picture.

    [0113] More precisely, in colorimetry and color theory, colorfulness, chroma, and saturation refer to the perceived intensity of a specific color. Colorfulness is the degree of difference between a color and gray. Chroma is the colorfulness relative to the brightness of another color that appears white under similar viewing conditions. Saturation is the colorfulness of a color relative to its own brightness.

    [0114] A highly colorful stimulus is vivid and intense, while a less colorful stimulus appears more muted, closer to gray. With no colorfulness at all, a color is a “neutral” gray (a picture with no colorfulness in any of its colors is called grayscale). Any color can be described from its colorfulness (or chroma or saturation), lightness (or brightness), and hue.

    [0115] The definition of the hue and saturation of the color depends on the color space used to represent said color.

    [0116] For example, when a CIELUV color space is used, the saturation s.sub.uv is defined as the ratio between the chroma C.sub.uv* over the luminance L*.

    [00006] s uv = C uv * L * = u * 2 + v * 2 L *

    [0117] The hue is then given by

    [00007] h uv = arc .Math. .Math. tan .Math. v * u *

    [0118] According to another example, when a CIELAB color space is used, the saturation is defined as the ratio of the chroma over the luminance:

    [00008] s ab = C ab * L * = a * 2 + b * 2 L *

    [0119] The hue is then given by

    [00009] h ab = arc .Math. .Math. tan .Math. b * a *

    [0120] These equations are a reasonable predictor of saturation and hue that are in agreement with the human perception of saturation, and demonstrate that adjusting the brightness in CIELAB (or CIELUV) color space while holding the angle a*/b* (or u*/v*) fixed does affect the hue and thus the perception of a same color. In step 150, scaling the color components Ec by a same factor preserves this angle, thus the hue.

    [0121] Now let us consider that the color picture I is represented in the CIELUV color space and a picture 12 that is formed by combining together the luminance component L, whose dynamic range is reduced compared to the dynamic range of the luminance of the color picture I (step 130), and two chrominance components U (=C1) and V (=C2) of the CIELUV color space. The colors of the picture 12 are thus differently perceived by a human being because the saturation and the hue of the colors changed. The method (step 150) determines the chrominance components C1 and C2 of the picture 12 in order that the hue of the colors of the picture I2 best match the hue of the colors of the color picture I.

    [0122] According to an embodiment of the step 160, the factor r(L) is given by:

    [00010] r ( L ( i ) ) = max .Math. { 5 , L ( i ) } 2048 .Math. max .Math. { 0.01 , Y ( i ) }

    [0123] This last embodiment is advantageous because it prevents the factor from going to zero for very dark pixels, i.e. allows the ratio to be invertible regardless of the pixel value.

    [0124] In step 170, the two chrominance components C1, C2 are obtained from said at least one intermediate color components E′c.

    [0125] FIG. 6 shows schematically a diagram of the steps of a method of decoding a color picture from at least a bitstream in accordance with an embodiment of the disclosure.

    [0126] In step 21, a decoder DEC obtains a luminance component L″ and two chrominance components C″1, C″2 either from a local or remote memory or by decoding at least partially a bitstream F.

    [0127] In step 22, a module IGM obtains a final luminance component L and two final chrominance components C1, C2 from said luminance L″ and chrominance C″1, C″2 components by applying an inverse mapping on the colors obtained from said luminance L″ and chrominance C″1, C″2 components.

    [0128] In step 23, a module INVC obtains at least one color component Ec of the color picture to be decoded from said final luminance L component and said two final chrominance C1, C2 components. The decoded picture being obtained by combining together said at least one color component Ec.

    [0129] According to an embodiment of the step 22, illustrated in FIG. 7, a module ILCC obtains (step 222) the final luminance component L by linearly combining together the luminance component L″ and the two chrominance components C″1, C″2, and the two final chrominance components C1, C2 are obtained by scaling (step 221) each of the two chrominance components C″1, C″2 by a factor β (Ba,L(i)) that depends on both a modulation value Ba and the value of each pixel i of the final luminance component L, and:

    [00011] { L = L + mC 1 + nC 2 C 1 = β ( Ba , L ( i ) ) * C 1 C 2 = β ( Ba , L ( i ) ) * C 2 ( J )

    where m and n are coefficient (real values). The coefficients m and n may be those obtained by the factorization of the matrix Φ.sub.Ba(L), i.e. m and n are those obtained in Φ.sub.0. Consequently, they depend on the gamut of the color picture I (for instance BT.709 or BT.2020 gamut). Typical values for m and n are m≈n in the interval [0.1, 0.5]

    [0130] Equation (J) is considered as being an inverse mapping applies on the colors obtained from the luminance L″ and chrominance C″1, C″2 components. Equation (J) is directly obtained from equation (A) that is considered as being a color mapping.

    [0131] According to a variant of the module ILCC, the values of the final luminance component L are always higher than the values of the luminance component L″:


    L=L″+max(0,mC.sub.1′+nC.sub.2′)

    [0132] This embodiment is advantageous because it ensures that the final luminance component L does not exceed a potential clipping value that is usually used by the decoder to define a luminance peak. When a luminance peak is required by a decoder and when the final luminance component L is given by equation (J), the final luminance component L is clipped introducing some artefacts.

    [0133] According to an embodiment, the modulation value Ba and/or the coefficients m and n are obtained from a remote or local memory such a Look-Up-Table, or from a bitstream BF as illustrated in FIG. 7.

    [0134] According to an embodiment, the factor β.sup.−1(Ba,L(i)) is obtained from a Look-Up-Table (LUT) for a specific modulation value Ba and a specific value L(i) of the final luminance component L. Thus, for multiple luminance peak values such as for example, 1000, 1500 and 4000 nits, a specific factor β.sup.−1(Ba,L(i)) is stored in a LUT for each specific modulation value Ba.

    [0135] According to a variant, the factor β.sup.−1(Ba,L(i)) for a specific modulation value Ba is obtained for a value of a pixel of the final luminance component L by interpolating the luminance peaks between the multiple luminance peaks for which LUT are stored.

    [0136] According to an embodiment of the step 23, illustrated in FIG. 8, in step 220, a module IFM obtains a first component Y by applying a non-linear function f.sup.−1 on the final luminance component L in order that the dynamic of the first component Y is increased compared to the dynamic of the final luminance component L:


    Y=f.sup.−1(Ba,L)  (A3)

    [0137] The non-linear function f.sup.−1 is the inverse of the non-linear function f (step 130).

    [0138] Thus, the embodiments of the function f.sup.−1 are defined according to the embodiments of the function f.

    [0139] According to an embodiment, the parameters of the non-linear function f.sup.−1 (such as a, b, c or γ) and/or the information data Inf is (are) obtained from a local or remote memory (for example a Look-Up-Table) and/or from a bitstream BF as illustrated in FIG. 8.

    [0140] According to an embodiment, the luminance component L is multiplied by the modulation value Ba after having applied the non-linear function f.sup.−1:


    Y=Ba*f.sup.−1(L)  (A4)

    [0141] According to an embodiment, the non-linear function f.sup.−1 is the inverse of a gamma function.

    [0142] The component Y is then given by:

    [00012] Y 1 = L 1 / Y B

    [0143] where Y.sub.1 equals Y or Y/Ba according to the embodiments of eq. (A3) or (A4), B is a constant value, γ is a parameter (real value strictly below 1).

    [0144] According to an embodiment, the non-linear function f.sup.−1 is the inverse of a S-Log function. The component Y.sub.1 is then given by:

    [00013] Y 1 = exp ( L - c a ) - b

    [0145] According to an embodiment, the non-linear function f is the inverse of either a gamma correction or a SLog correction according to the pixel values of the component Y. This is indicated by the information data Inf.

    [0146] In step 230, a module ILC obtains at least one color component Ec from the first component Y, the two final chrominance components C1, C2, and from a factor r(L) that depends on the final luminance component L. The decoded color picture is then obtained by combining together said at least one color component Ec.

    [0147] Referring now to FIG. 9 and FIG. 10, a second example of a generic encoding scheme (encoder and decoder) is illustrated that depends mainly on a set of two-variable functions β″(Ba,L), β′(Ba,L) and g(Ba,L) and of two constant parameters a and b that are used for the mapping from HDR to SDR of the luminance and the chrominance such that colors, as well as texture, are preserved in the SDR image/video compared to the original HDR image/video. While g(Ba,L) is preferably a Slog function in the variable L, the triplet (a, b, β″) should be optimized to lead to the best possible SDR/HDR color matching (hue and perceived saturation) depending on the peak luminance, the input/output gamut's, and the backlight value Ba.

    [0148] The encoding involves the function β″(Ba,L), and the decoding involves the function β′(Ba,L).

    [0149] Referring to FIG. 9, a diagram illustrating steps of an example of a method of encoding 900 a color picture is schematically shown. The encoder side processing steps are summarized as follows. In a first step 910, a luminance dynamic reduction is performed to get L as a dynamic reduced version of an input high dynamic range luminance Y=Y.sub.HDR, in the shown example obtained from an input RGB.sub.HDR image. In the shown example, a reduction of the HDR luminance Y.sub.HDR dynamic is performed to get a luma L=L.sub.SDR, for example on 10 bits, wherein L=L.sub.SDR=g(Y.sub.HDR) with g being a non-linear function used to compress the dynamic. In the shown embodiment, the function g may also depend on the backlight value Ba, in the shown example being derived from analyzing the input luminance.

    [0150] In a second step 920, a construction of two dynamic reduced chroma components is performed, U′V′ in the shown example. This completes L.sub.SDR such that a SDR picture or video with three components is obtained, L.sub.SDR UV in the shown example, wherein R.sup.#B.sup.#G.sup.# are determined as the square root of RGB.sub.HDR and {tilde over (R)}{tilde over (G)}{tilde over (B)} are the normalization of R.sup.#B.sup.#G.sup.# by a common multiplicative factor β″. Here, β″(L.sub.SDR) is a given function depending at least on L.sub.SDR. In the shown example, the two chroma components U′ V′ are determined as [U′; V′]=Mat.sub.2×3 [{tilde over (R)}; {tilde over (G)}; {tilde over (B)}] in where the matrix is a 2×3 matrix.

    [0151] In a third step 930, a correction of the color components by a gamut mapping is performed, here from LU′V′ to L′U″V″. In the shown example, a gamut mapping from the SDR space LUV.sub.SDR with incorrect hues and saturations to the corrected space L′U′V′.sub.SDR is carried out that preserves HDR colors better. In the shown example [L′; U″; V″]=Mat.sub.3×3(L) [L; U′; V′].

    [0152] Referring to FIG. 10, a diagram illustrating steps of an example of a corresponding method of decoding 1000 a color picture is schematically shown. The decoder side processing steps are summarized as follows.

    [0153] In a first step 1030, which may be considered an inverse of corresponding third step 930 shown in FIG. 9, a correction of the color components back to LU′V′ from L′U″V″ by a gamut de-mapping is performed. In the shown example, [L; U″; V′]=Mat.sub.3×3 [L′; U″; V″] is determined.

    [0154] In a second step 1010, which may be considered an inverse of corresponding first step 910 shown in FIG. 9, a luminance dynamic expansion is performed to get Y back, i.e. for the shown example Y.sub.HDR=f.sup.−1(L.sub.SDR).

    [0155] In a third step 1020, which may be considered an inverse of corresponding second step 920 shown in FIG. 9, RGB.sub.HDR are recovered from YU′V′. This includes a re-normalization of U′V′ into U.sub.rV.sub.r by a common multiplicative factor β′ and the determination of a value S by S=√{square root over (Y+k.sub.0U.sub.r.sup.2+k.sub.1V.sub.r.sup.2+k.sub.2U.sub.rV.sub.r)}. In the shown example, R.sup.#, G.sup.# and B.sup.# are determined as [R.sup.#;G.sup.#;B.sup.#]=Mat.sub.3×3 [S;U.sub.r;V.sub.r] and RGB.sub.HDR is obtained as the square of R.sup.#G.sup.#B.sup.#.

    [0156] By construction, in order to get a decoder that is the exact inverse of the encoder, one must take β′=1/β″. As a consequence, for a given couple (a,b), the determination of β″ is sufficient to define both the encoder end the decoder.

    [0157] The problem to solve is to find β″ such that SDR L′U″V″ colors correspond at best to the input HDR colors (hue and perceived saturation) and the process is decodable, i.e. the scaling by β″ avoids clipping in U″V″ as best as possible.

    [0158] Referring to FIG. 11, a method for matching colors between color pictures of different dynamic range in accordance with an embodiment of the disclosure is schematically shown. The method comprises obtaining an input color gamut of an input color picture 1101, obtaining an output color gamut of an output color picture 1102, and modifying 1103 the output color gamut to match the input color gamut, wherein the modifying comprises calculating a reduced, e.g. minimized, perceived color error distance between the input color gamut and the output color gamut.

    [0159] The minimization will be explained, by way of example, with reference to the embodiment shown in FIG. 12, where the output color picture is an SDR version of an HDR input color picture at an input of a encoder mainly corresponding to an encoding described with reference to FIG. 9. Therefore, a detailed description of the corresponding encoding steps 1210, 1220, 1230 is omitted and the description focusses on the optimization problem.

    [0160] An optimization of β″ is performed such that the distance between an input HDR gamut 1201 and the output associated SDR gamut 1202 is minimized in terms of perceived color distortion or error. To do so, one must define precisely the notion of gamut, the image of a gamut by the codec, and the distance between two gamuts.

    [0161] For solving the the minimization problem, the following parameters are fixed: the backlight Ba, the matrix of the [L′; U″; V″]=Mat.sub.3×3(L) [L; U′; V′], i.e. the two parameters (a,b), and a luminance level Y.sub.0.

    [0162] An optimized β″, i.e. β″(Ba,L.sub.0,a,b), value is then deduced that minimizes the distance between an input HDR gamut at luminance Y.sub.0 and an output SDR gamut at luma L.sub.0=f(Y.sub.0).

    [0163] The input HDR gamut is given by (x,y) points in the 2D gamut triangle (BT709 or BT2020 triangle for instance) and a luminance Y.sub.0. In variants, another space may be used to describe the gamut, for instance the subspace ab of the Lab space, etc. For the presented example, one deduces absolute linear XYZ.sub.HDR coordinates 1203 from the conversion formulas


    X=Y.sub.0x/y,Y=Y.sub.0 and Z=Y.sub.0(1−x−y)/y.

    [0164] The input color gamut described in the XYZ color space is transformed into its representation in the RGB color space using, e.g. depending on the input color image, a 3×3 transformation matrix for transforming the gamut from XYZ representation to RGB representation in accordance with ITU Rec.709 or ITU Rec.2020, respectively. Then, thanks to the transformation using BT709 or BT2020 3×3 matrix E 404 from XYZ to RGB, one gets the linear RGB.sub.HDR components that are used as the input of the LUV encoder 1210, 1220, 1230, as shown in FIG. 12:

    [00014] [ R G B ] = E [ X Y Z ]

    [0165] On the output side, the encoding 1210, 1220, 1230, here the LUV codec explained with reference to FIG. 9, provides L′U′V′ 1205 corresponding to the standard YUV image displayed on a SDR display. This is changed back to gammatized R′G′B′.sub.SDR space 1206 by applying the inverse matrix A.sup.−1 of the standard BT709/2020 RGB->YUV matrix defined by the ITU-R; and then back to the linear RGB.sub.SDR space by applying 1207 the gammatized-to-linear BT709/2020 EOTF. The coordinates in the gamut are determined by applying a transformation into the XYZ.sub.SDR space using the inverse 1208 of the matrix E used on the input side, and finally (x,y).sub.SDR is found 1209 out by x=X/(X+Y+Z) and y=Y/(X+Y+Z).

    [0166] Thus, the shown LUV generic codec defines a mapping


    θ.sub.Ba,Y.sub.0.sub.,a,b(β′,*):(x,y).sub.HDRcustom-character(x,y).sub.SDR

    For fixed a,b, the minimization of the distance between the input and output couples (x,y) on the gamut determines a value of β″ depending on (Ba,Y.sub.0) or equivalently (Ba,L.sub.0) as follows


    β″(Ba,L.sub.0)=argmin.sub.β″∫∫.sub.gamutd.sub.xy(θ.sub.Ba,Y.sub.0.sub.,a,b(β″,(x,y)),(x,y))d(x,y)

    [0167] where d.sub.xy is a chrominance distance defined on the gamut.

    [0168] In the following, the construction of the domain of the integral and the distance d.sub.xy is shown. The gamut is defined by the (x,y) coordinates of the three primaries. For instance, the triangle of the BT709 gamut is the triangle with the three following vertices:


    x.sub.R=0.64,y.sub.R=0.33,x.sub.G=0.30,y.sub.G=0.60 and x.sub.B=0.15,y.sub.B=0.06.

    [0169] The color points inside the gamut G are defined as the positive weighted combination of the primaries, i.e. the convex hull of the three primaries.

    [00015] ( x , y ) G .Math. λ , μ , v 0 .Math. .Math. s . t . .Math. λ + μ + v = 1 and .Math. ( x , y ) = ( x R , y R ) + μ ( x G , y G ) + v ( x B , y B )

    [0170] The meshing of the gamut is performed by the meshing of the parameters (λ,μ) in the domain [0,1].sup.2 and a mesh is valid if and only if ν=1−λ−μ is positive. A uniform meshing on these two parameters leads to a gamut discretization as shown in FIG. 13.

    [0171] The gamut closure is determined by discarding xy meshes for which, given by Y.sub.0, a component of its linear RGB representation exceeds the peak luminance P. The remaining gamut is shown in FIG. 14 for various values of Y.sub.0. Only the white point 601 remains near the peak Y.sub.0=P.

    [0172] However, this uniform meshing in the xy space does not reflect the sensitivity of human beings to colors. Ideally, one would expect more meshes in sensible zones and less meshes where the color difference is much less perceived. In theory, one should map a uniform meshing from an Euclidian perceptual color space onto the xy space. This is achieved by using the Lab color space and replacing the mapped non-uniform meshing by weights on each mesh in the xy space.

    [0173] Let us consider the function ω:(x,y).fwdarw.(L,a,b) that maps a gamut point (x,y) to a Lab space point (L,a,b), in the shown example assuming that the luminance Y.sub.0 is unity.

    [0174] With X=x/y, Y=Y.sub.0=1 and Z=(1−x−y)/y, the corresponding Lab space points are determined by L=116f(Y/Y.sub.f), a=500(f(X/Y.sub.f)−f(Y/Y.sub.f)) and b=200(f(Y/Y.sub.f)−f(Z/Y.sub.f)),

    [0175] where Y.sub.f is an environmental luminance reference and f is the following non-linear transform

    [00016] f ( t ) = { t 1 / 3 if .Math. .Math. t > ( 6 29 ) 3 1 3 .Math. ( 29 3 ) 2 .Math. t - 4 29 otherwise

    [0176] It can be seen that, Y and L being fixed, the luma component L plays no role and ω actually maps a 2D xy volume on a 2D ab volume. The change in volume is provided by the absolute value J(x,y):=|Jac(ω)| of the determinant of the Jacobian matrix Jac(ω) of ω defined by

    [00017] Jac ( ω ) = [ x .Math. a y .Math. a x .Math. b y .Math. b ] .

    [0177] The volume occupied by a xy mesh is proportional to J(x,y) in the uniform ab color space. So, the error of color coding at a point (x,y) is multiplied by J(x,y) in the Lab space. That is why the weighted distance is defined as


    d.sub.xy:=J(x,y)d.sub.ab

    [0178] on the space xy to measure the color difference and where d.sub.ab is a distance on the uniform color space ab.

    [0179] The weights of each mesh are illustrated in FIG. 15 where the radius of each dot is proportional to J(x,y). This emphases the well-known fact that human beings are most sensitive to errors in red (corresponding to the rightmost section of the shown gamut triangle) than to errors in other colors.

    [0180] Actually, weights as shown have been obtained by using a more elaborated Lab, see Lab 1994 and Lab 2000 formulas, than the one described above, with extra terms dealing with a lower sensitivity to high saturation and to more sensitivity to gray. The integral on the gamut should be understood as the sum on all meshes. This leads to the precise optimization problem

    [00018] β opt ( Ba , L 0 ) = arg .Math. .Math. min β .Math. .Math. ( x , y ) mesh .Math. .Math. J ( x , y ) .Math. d ab ( θ Ba , Y 0 , a , b ( β , ( x , y ) ) , ( x , y ) ) .

    [0181] given that the meshes are of uniform sizes in xy. Now we focus on a formula for d.sub.ab.

    [0182] There is a correlation between, on one hand, the lightness L and the non-normalized saturation (or so-called chroma)


    C.sub.ab:=√{square root over (a.sup.2+b.sup.2)}

    [0183] in the Lab space (It should be noted that the parameters a and b defining L′ from L differ from a, b used for the Lab space) and, on the other hand, the perceived saturation of a color S.sub.ab. It is somewhat accepted that the perceived saturation S.sub.ab follows more or less the ratio below between chroma and luma.


    S.sub.ab=C.sub.ab/Y.sup.1/3

    [0184] The distance d.sub.ab is now constructed such that the perceived saturation S.sub.ab is preserved between HDR and SDR. Let us define the Lab mapping


    Γ:(x,y,Y.sub.0,Y.sub.f)custom-character(a,b)


    thanks to the formulas


    X=Y.sub.0x/y,Y=Y.sub.0 and Z=Y.sub.0(1−x−y)/y


    a=500(f(X/Y.sub.f)−f(Y/Y.sub.f)) and b=200(f(Y/Y.sub.f)−f(Z/Y.sub.f))

    [0185] Preserving the hue means keeping the ratio a vs. b, while also preserving the chroma C.sub.ab means keeping a and b. Alternatively, preserving the hue and perceived saturation S.sub.ab is achieved by keeping the two ratios


    a/Y.sup.1/3 and b/Y.sup.1/3.

    [0186] That is why the following function is considered representative of the perceived saturation, namely the couple (a/Y.sub.0.sup.1/3, b/Y.sub.0.sup.1/3),


    Ξ.sub.Y.sub.0:(x,y)custom-characterΓ(x,y,Y.sub.0,Y.sub.0)

    [0187] such that the transform θ.sub.Ba,Y.sub.0(β″,*) should be invariant under Ξ.sub.Y.sub.0 as the value β″ is constructed in order to preserve the perceived saturation. One may simplify the formula Ξ.sub.Y.sub.0 to get rid of the parameter Y.sub.0.


    Ξ(x,y)=(500(f(x/y)−1),200(1−f((1−x−y)/y)))

    [0188] For the described example, the norm ∥ ∥.sub.2 can be used because the Lab space is uniform Euclidian perceptual space. The index L.sub.0 in Ξ.sub.L.sub.0 is understood as the use of the SDR luminance as environmental luminance reference, i.e. Y.sub.SDR=OETF.sub.BT.sup.−1(L.sub.0).

    [0189] The optimal β″ preserving the saturation is obtained from the following minimization problem.

    [00019] β opt , sat ( Ba , L 0 ) = .Math. arg .Math. .Math. min β .Math. .Math. ( x , y ) mesh .Math. J ( x , y ) .Math. .Math. Ξ θ Ba , Y 0 , a , b ( β , ( x , y ) ) - .Math. Ξ .Math. ( x , y ) .Math. 2 = .Math. : .Math. arg .Math. .Math. min β .Math. cost ( β )

    [0190] The optimal β″.sub.opt,sat is found through a systematic search in a suitable interval. For the example shown in FIG. 8, this search easily leads to a result, as the plot of the cost function cost(β″) proves it for the example parameters Ba=3.9, P=4000, Y.sub.0=500, a=0.4799 and, b=0.4658.

    [0191] Finally, the value β″=β″.sub.codec used in the codec is adjusted from β″.sub.opt,sat up to a multiplicative constant (close to unity) to obtain a fine adjustment of the perceived saturation between LDR and HDR:β″.sub.codec∝β″.sub.opt,sat

    [0192] Referring to FIG. 17, the shape of β″.sub.codec can be found from the saturation optimization explained above. FIG. 17 shows a plot of β″.sub.codec(Ba,L) vs. L for the whole range L=[0,1024] for various values of Ba. It is clear that a LUT (look up table) for β″.sub.codec(Ba,*) can be easily interpolated from hard coded LUT for other values of Ba.

    [0193] In FIGS. 9 to 13, the steps may also be considered as modules or functional units, which may or may not be in relation with distinguishable physical units. For example, these modules or some of them may be brought together in a unique component or circuit, or contribute to functionalities of a software. A contrario, some modules may potentially be composed of separate physical entities. The apparatus which are compatible with the disclosure are implemented using either pure hardware, for example using dedicated hardware such ASIC or FPGA or VLSI, respectively <<Application Specific Integrated Circuit>>, <<Field-Programmable Gate Array>>, <<Very Large Scale Integration>>, or from several integrated electronic components embedded in a device or from a blend of hardware and software components.

    [0194] FIG. 18 represents an exemplary architecture of a device 1000 which may be configured to implement a method described in relation with FIGS. 1 to 4.

    [0195] Device 1800 comprises the following elements that are linked together by a data and address bus 1801: [0196] a microprocessor 1802 (or CPU), which is, for example, a DSP (or Digital Signal Processor); [0197] a ROM (or Read Only Memory) 1803; [0198] a RAM (or Random Access Memory) 1804; [0199] an I/O interface 1805 for transmission and/or reception of data, from an application; and [0200] a battery 1806.

    [0201] According to a variant, the battery 1806 is external to the device. Each of these elements of FIG. 18 are well-known by those skilled in the art and will not be disclosed further. In each of mentioned memory, the word <<register>> used in the specification can correspond to area of small capacity (some bits) or to very large area (e.g. a whole program or large amount of received or decoded data). ROM 1803 comprises at least a program and parameters. Algorithm of the methods according to the disclosure is stored in the ROM 1803. When switched on, the CPU 1802 uploads the program in the RAM and executes the corresponding instructions.

    [0202] RAM 1804 comprises, in a register, the program executed by the CPU 1802 and uploaded after switch on of the device 1800, input data in a register, intermediate data in different states of the method in a register, and other variables used for the execution of the method in a register.

    [0203] The implementations described herein may be implemented in, for example, a method or a process, an apparatus, a software program, a data stream, or a signal. Even if only discussed in the context of a single form of implementation (for example, discussed only as a method or a device), the implementation of features discussed may also be implemented in other forms (for example a program). An apparatus may be implemented in, for example, appropriate hardware, software, and firmware. The methods may be implemented in, for example, an apparatus such as, for example, a processor, which refers to processing devices in general, including, for example, a computer, a microprocessor, an integrated circuit, or a programmable logic device. Processors also include communication devices, such as, for example, computers, cell phones, portable/personal digital assistants (“PDAs”), and other devices that facilitate communication of information between end-users.

    [0204] According to a specific embodiment, the color picture is obtained from a source. For example, the source belongs to a set comprising: [0205] a local memory (1803 or 1804), e.g. a video memory or a RAM (or Random Access Memory), a flash memory, a ROM (or Read Only Memory), a hard disk; [0206] a storage interface, e.g. an interface with a mass storage, a RAM, a flash memory, a ROM, an optical disc or a magnetic support; [0207] a communication interface (1805), e.g. a wireline interface (for example a bus interface, a wide area network interface, a local area network interface) or a wireless interface (such as a IEEE 802.11 interface or a Bluetooth® interface); and [0208] a picture capturing circuit (e.g. a sensor such as, for example, a CCD (or Charge-Coupled Device) or CMOS (or Complementary Metal-Oxide-Semiconductor)).

    [0209] According to different embodiments, the picture is sent to a destination; specifically, the destination belongs to a set comprising: [0210] a local memory (1803 or 1804), e.g. a video memory or a RAM (or Random Access Memory), a flash memory, a ROM (or Read Only Memory), a hard disk; [0211] a storage interface, e.g. an interface with a mass storage, a RAM, a flash memory, a ROM, an optical disc or a magnetic support; [0212] a communication interface (1805), e.g. a wireline interface (for example a bus interface, a wide area network interface, a local area network interface) or a wireless interface (such as a IEEE 802.11 interface or a Bluetooth® interface); and [0213] a display.

    [0214] According to different embodiments, a bitstream BF and/or F is obtained from a source. Exemplarily, the bitstream is read from a local memory, e.g. a video memory (1804), a RAM (1804), a ROM (1803), a flash memory (1803) or a hard disk (1803). In a variant, the bitstream is received from a storage interface, e.g. an interface with a mass storage, a RAM, a ROM, a flash memory, an optical disc or a magnetic support and/or received from a communication interface (1805), e.g. an interface to a point to point link, a bus, a point to multipoint link or a broadcast network.

    [0215] According to different embodiments, device 1800 being configured to implement a method described in relation with FIGS. 9 to 13, belongs to a set comprising: [0216] a mobile device; [0217] a communication device; [0218] a game device; [0219] a set top box; [0220] a TV set; [0221] a tablet (or tablet computer); [0222] a laptop; [0223] a display and [0224] a decoding chip.

    [0225] Implementations of the various processes and features described herein may be embodied in a variety of different equipment or applications. Examples of such equipment include an encoder, a decoder, a post-processor processing output from a decoder, a pre-processor providing input to an encoder, a video coder, a video decoder, a video codec, a web server, a set-top box, a laptop, a personal computer, a cell phone, a PDA, and any other device for processing a picture or a video or other communication devices. As should be clear, the equipment may be mobile and even installed in a mobile vehicle.

    [0226] Additionally, the methods may be implemented by instructions being performed by a processor, and such instructions (and/or data values produced by an implementation) may be stored on a computer readable storage medium. A computer readable storage medium can take the form of a computer readable program product embodied in one or more computer readable medium(s) and having computer readable program code embodied thereon that is executable by a computer. A computer readable storage medium as used herein is considered a non-transitory storage medium given the inherent capability to store the information therein as well as the inherent capability to provide retrieval of the information therefrom. A computer readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. It is to be appreciated that the following, while providing more specific examples of computer readable storage mediums to which the present principles can be applied, is merely an illustrative and not exhaustive listing as is readily appreciated by one of ordinary skill in the art: a portable computer diskette; a hard disk; a read-only memory (ROM); an erasable programmable read-only memory (EPROM or Flash memory); a portable compact disc read-only memory (CD-ROM); an optical storage device; a magnetic storage device; or any suitable combination of the foregoing.

    [0227] The instructions may form an application program tangibly embodied on a processor-readable medium.

    [0228] Instructions may be, for example, in hardware, firmware, software, or a combination. Instructions may be found in, for example, an operating system, a separate application, or a combination of the two. A processor may be characterized, therefore, as, for example, both a device configured to carry out a process and a device that includes a processor-readable medium (such as a storage device) having instructions for carrying out a process. Further, a processor-readable medium may store, in addition to or in lieu of instructions, data values produced by an implementation.

    [0229] As will be evident to one of skill in the art, implementations may produce a variety of signals formatted to carry information that may be, for example, stored or transmitted. The information may include, for example, instructions for performing a method, or data produced by one of the described implementations. For example, a signal may be formatted to carry as data the rules for writing or reading the syntax of a described embodiment, or to carry as data the actual syntax-values written by a described embodiment. Such a signal may be formatted, for example, as an electromagnetic wave (for example, using a radio frequency portion of spectrum) or as a baseband signal. The formatting may include, for example, encoding a data stream and modulating a carrier with the encoded data stream. The information that the signal carries may be, for example, analog or digital information. The signal may be transmitted over a variety of different wired or wireless links, as is known. The signal may be stored on a processor-readable medium.

    [0230] A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made. For example, elements of different implementations may be combined, supplemented, modified, or removed to produce other implementations. Additionally, one of ordinary skill will understand that other structures and processes may be substituted for those disclosed and the resulting implementations will perform at least substantially the same function(s), in at least substantially the same way(s), to achieve at least substantially the same result(s) as the implementations disclosed. Accordingly, these and other implementations are contemplated by this application.