To obtain a practical yet versatile and accurate apparatus for luminance re-grading (300) of an input
high dynamic range image (IM_HDR) of first luminance
dynamic range into a second image (IM_DR2) of second luminance
dynamic range, the inventors propose the apparatus for luminance re-grading (300) of an input
high dynamic range image (IM_HDR) of first luminance
dynamic range into a second image (IM_DR2) of second luminance dynamic range, wherein a maximum luminance of the second image may be higher or lower than a maximum luminance of the input
high dynamic range image, the apparatus comprising:—a first neural
network processing circuit (301), having as input a set of pixel luminances of the input high dynamic range image (IM_HDR), wherein the first neural
network processing circuit has at least two sets of outputs (S1, S2), wherein the sets of outputs have output nodes for supplying parameter values of a parametric re-grading equation, wherein the parametric re-grading equation is composed of at least two partial functions an amount of which in the re-grading equation being controlled by at least two corresponding output parameter values (P11, P21); wherein a first output set (S1) comprises at least
two parameter values (P11, P21) which determine a first shape of the re-grading function, and a second output set (S2) comprises at least two corresponding parameter values (P12, P22) which determine an alternative second shape of the re-grading function, which being determined by the same parametric definition but using different values for its parameters gets a different shape;—a second neural
network processing circuit (302), which has as input at least one measurement value (La) from at least one sensor (311), and as output nodes supplying a set of weights corresponding in amount to at least the number of sets of outputs of the first neural network
processing circuit;—a combiner (303), arranged to add a first parameter value (P11) of the first output set of the first neural network
processing circuit multiplied by a corresponding first weight (w11) from the second neural network
processing circuit, to a corresponding parameter value (P12) for the same re-grading function defining parameter of the second output set of the first neural network processing circuit multiplied by a corresponding second weight (w12) from the second neural network processing circuit, yielding a final parameter value (P1_f); and—a luma mapping circuit (320) arranged to map input lumas of the input high dynamic range image (IM_HDR) with a luma mapping function (F_L) which is defined by at least two parameters comprising the final parameter value (P1_f) to obtain output lumas of the second image (IM_DR2).