Abstract:
A method for toning mapping high dynamic range (HDR) video for display in low dynamic range display comprises accessing the HDR video; producing a luminance information for the individual frames; partitioning different consecutive groups of frames into segments responsive to the luminance information; classifying the segments into static luminance segments and transient luminance segments; producing a tone mapping parameter set for the static luminance segments; producing a tone mapping parameter set for at least one of the transient luminance segments responsive to the tone mapping parameter set of an adjacent static luminance segment; and tone mapping the static luminance segments and transient luminance segments according to the respective tone mapping parameter sets.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims benefit of the filing date under 35 U.S.C. §119(e) to Provisional Patent Application No. 61/338532, filed Feb. 19, 2010. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The invention relates to the tone reproduction of high dynamic range (HDR) content on low dynamic range (LDR) displays and particularly to tone reproduction for video having varying lighting conditions. 
       BACKGROUND OF THE INVENTION 
       [0003]    Currently, most display devices have a limited dynamic range which is lower than that in real world scenes. HDR scenes shown on low dynamic range (LDR) display devices usually turn out to be either saturated which corresponds to overexposure in photography or extremely dark which corresponds to underexposure. Either case is undesired as numerous details can be lost. 
         [0004]    The amount of visual content in HDR video format has been greatly increasing. Hence, tone mapping for HDR video has drawn much attention in academia as well as in industry. However, compared with the tone mapping of still images, relatively very little effort has been put on HDR video tone mapping. 
         [0005]    For video scenes with relatively static lighting conditions, known parameter estimation methods have performed well. In such cases, generally a set of fixed parameters are applied to all frames in the same video segment with static lighting condition. 
         [0006]    However, for varying lighting conditions within a scene of video, the application of a fixed set of parameters to frames has produced poor tone mapping results, because the tone mapping parameters can change from one frame to another. As such, a need exists for a tone mapping process that can properly and effectively perform tone mapping in scenes with varying lighting. 
       SUMMARY OF THE INVENTION 
       [0007]    A method for toning mapping high dynamic range (HDR) video for display in low dynamic range display comprises accessing the HDR video; producing a luminance information for the individual frames; partitioning different consecutive groups of frames into segments responsive to the luminance information; classifying the segments into static luminance segments and transient luminance segments; producing a tone mapping parameter set for the static luminance segments; producing a tone mapping parameter set for at least one of the transient luminance segments responsive to the tone mapping parameter set of an adjacent static luminance segment; and tone mapping the static luminance segments and transient luminance segments according to the respective tone mapping parameter sets. The method can further comprise interpolating at least one parameter type to produce the tone mapping parameter set for the at least one of the transient luminance segments from the tone mapping parameter sets of two adjacent transient luminance segments, wherein the at least one parameter type can be an anchor point, a contrast boost level, and/or an exposure value. The partitioning step can comprise applying a frame-to-frame low-pass filter to frame level average luminance of the frames to produce the luminance information or alternatively, the partitioning step can further comprise generating luminance gradients of the filtered frame level average luminance to produce the luminance information. The peaks and the associated bandwidth data obtained from any of the frame-to-frame low-pass filtering steps can be used to partition the groups. Additionally, a delay can be applied to some transient luminance segments, wherein at least one frame at the beginning of the at least one transient luminance segment is not tone mapped with the parameter sets for the transient luminance segments and the following frames in the at least one transient luminance segment are tone mapped with the parameter sets for the transient luminance segments. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0008]    The invention will now be described by way of example with reference to the accompanying figures of which: 
           [0009]      FIG. 1  is a flowchart for determining the parameter set for tone mapping according to the invention; 
           [0010]      FIG. 2  is a flowchart for video sequence partitioning according to the invention; 
           [0011]      FIG. 3  is a graph showing an example of how average luminance can change in a video sequence from frame-to-frame; 
           [0012]      FIG. 4  is a graph showing an example of how average luminance can change in a video sequence from frame-to-frame following low pass filtering; 
           [0013]      FIG. 5  is a graph showing gradients of the low pass filtered video sequence in  FIG. 4 ; and 
           [0014]      FIG. 6  is a graph showing the result of low passing filtering of the gradient in  FIG. 5 . 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0015]    The disclosure generally pertains to video that have some scenes with varying lighting conditions. The general approach can begin with first detecting the starting and ending time of the scenes in a video. Thereafter, the approach involves calculating the parameters for every frame of the scene having varying lighting conditions by interpolating the parameter values of the previous and next scenes which have static illumination. 
         [0016]    A general system diagram of the disclosed invention is illustrated as in  FIG. 1 . Overall, the scheme of parameter interpolation can be carried out by first obtaining HDR video  101  having more than one scene. A next step can involve analyzing and partitioning the video  102  into scenes or segments. The analysis here involves classifying the segments into static or transient segments. This is followed by estimating parameter sets for the static segments  103 . Parameter sets for transient segments are then interpolated  104  and evaluated  105 . The evaluation can be performed using an appropriate user interface. If the application of the parameter sets for the static and transient segments is satisfactory, then toning mapping is performed  106  according to the parameter sets. If the application of the parameter sets is not satisfactory, then the steps  103 ,  104  and  105  are rerun such that a new parameter set for static segments is estimated and found. 
         [0017]      FIG. 2  is a flowchart for video sequence partitioning in step  102  according to the invention. The video  101  is obtained and analyzed and partitioned  102  into static and transient segments. The process flow is as follows: the average luminance of each frame in calculated  202 ; frame-to-frame low-pass filtering  203  is applied to the average luminance data; gradients of the low-pass filter luminance data are calculated  204 ; frame-to-frame low-pass filtering  205  is applied to the gradient data; 
         [0018]    peaks are detected and associated bandwidths are calculated  206  from the filtered gradient data; and the positions of the transient and static segments calculated  207  from the peak and bandwidth data. 
         [0019]    With respect to the process flow in  FIG. 2 , the frame-level average luminance of the input HDR video is analyzed. It is important to keep in mind that the average luminance of each frame can change over time. This is illustrated in  FIG. 3  which shows how the average luminance in different frames in a video sequence can change. Furthermore, a video can be partitioned into several segments according to the average luminance change. Successive frames having similar average luminance are characterize here as a static segment. The frames between two static segments may have gradually changing average luminance over time, which can be characterized as a transient segment. For example in  FIG. 3 , frames 0 through around 60 and frames around frame 90 at the peak having similar average luminance could be static segments and frames therebetween could comprise a transient segment. 
         [0020]    To detect the starting and ending time points of each transient segment, a scheme based on the analysis of average luminance sequence is proposed. The scheme is as follows: 
         [0021]    a) apply a low-pass filter to the average luminance sequence  203  in  FIG. 3  to smooth luminance as illustrated in  FIG. 4 ; 
         [0022]    b) calculate the gradients  204  of the smoothed luminance sequence as shown in  FIG. 5  and optionally apply a low-pass filter  205  to the gradients in  FIG. 5  to obtain smooth gradient as shown in  FIG. 6 ; 
         [0023]    c) detect the peaks and bandwidth  206  of each peak in gradient curve in  FIG. 5  or the low pass filter gradient curve in  FIG. 6 ; and 
         [0024]    d) calculate the transient and static positions  207 . 
         [0000]    The starting time point of each transient area can be calculated or estimated by subtracting half of the bandwidth from the peak frame number. The ending time point of the transient area can be calculate by adding half of the bandwidth to the peak frame number. 
         [0025]    After the static and transient segments are located, the parameter set for a key frame of the static segments are estimated and then applied to the whole segment. The parameter set can include anchor points from which the image can be segmented into several regions, exposure value for each region, contrast boost parameters, and any other needed parameter for HDR tone mapping. Regarding the parameter set, the exposure values, anchor points and contrast boost can be obtained by any of a number of techniques; however, contrast boost and anchor points are discussed in greater detail below. 
         [0026]    In at least one implementation one can define a series of anchor points A i (i=1 . . . N) such that each A i  can be used to define a region and also generate a single exposure image. The anchor points can be chosen as: 
         [0000]        A   i   =L   avg   /E A   n+1 =4 ·A   n =( n= 2  . . . N− 1) 
         [0000]    where E in the above equation is a constant and can take the value of 8. The number of regions N in the above equation can be computed as below, which is able to cover the entire luminance range. 
         [0000]    
       
         
           
             N 
             = 
             
               
                 ⌈ 
                 
                   
                     ( 
                     
                       
                         
                           log 
                           2 
                         
                         ( 
                         
                           max 
                           ( 
                           
                             
                               
                                 
                                   L 
                                   max 
                                 
                                 · 
                                 E 
                               
                               
                                 L 
                                 avg 
                               
                             
                             , 
                             1 
                           
                           ) 
                         
                         ) 
                       
                       + 
                       1 
                     
                     ) 
                   
                   / 
                   2 
                 
                 ⌉ 
               
               + 
               1 
             
           
         
       
     
         [0000]    L is the luminance image, which can be computed from the HDR data. If the HDR data is in XYZ color space, the Y component can be used as luminance image. If the HDR data uses the same primary colors as Rec. 709, the conversion from RGB color space can be done as follows: 
         [0000]        L ( i,j )=0.2126* R ( i,j )+0.7152* G ( i,j )+0.0722* B ( i,j ) 
         [0000]    Other conversions between RGB (or other color spaces) and the luminance image can be used depending on the format of the input picture. 
         [0027]    Once the anchor point of each region is known, one can compute the weight of each pixel for each region. In general, for each region defined by the corresponding anchor point A i , the pixel with the closest value to the single exposure image is 0.5 and that pixel has a larger weight for that region than other pixels. 
         [0028]    Thus, the weight of pixel at location (i,j) for region n (defined by anchor point A n ) can be computed as below: 
         [0000]    
       
         
           
             
               
                 W 
                 n 
               
                
               
                 ( 
                 
                   i 
                   , 
                   j 
                 
                 ) 
               
             
             = 
             
               Ce 
               
                 
                   
                     ( 
                     
                       
                         S 
                          
                         
                           ( 
                           
                             
                               L 
                                
                               
                                 ( 
                                 
                                   i 
                                   , 
                                   j 
                                 
                                 ) 
                               
                             
                             
                               2 
                                
                               
                                   
                               
                                
                               
                                 A 
                                 n 
                               
                             
                           
                           ) 
                         
                       
                       - 
                       0.5 
                     
                     ) 
                   
                   2 
                 
                 
                   σ 
                   2 
                 
               
             
           
         
       
     
         [0000]    where C is a normalization factor and is defined as: 
         [0000]    
       
         
           
             C 
             = 
             
               1 
               
                 
                   ∑ 
                   n 
                 
                  
                 
                     
                 
                  
                 
                    
                   
                     
                       
                         ( 
                         
                           
                             S 
                              
                             
                               ( 
                               
                                 
                                   L 
                                    
                                   
                                     ( 
                                     
                                       i 
                                       , 
                                       j 
                                     
                                     ) 
                                   
                                 
                                 
                                   2 
                                    
                                   
                                       
                                   
                                    
                                   
                                     A 
                                     n 
                                   
                                 
                               
                               ) 
                             
                           
                           - 
                           0.5 
                         
                         ) 
                       
                       2 
                     
                     
                       σ 
                       2 
                     
                   
                 
               
             
           
         
       
     
         [0029]    The above computed weights take values in the range [0,1] and hence define a fuzzy segmentation of the luminance image into N regions. This means each region might contain all the pixels in the image, although only a portion of them might have large weights. 
         [0030]    With linear scaling, one can specify one anchor point. A pixel will be saturated and mapped to one if the luminance of that pixel exceeds the anchor point, otherwise it will be mapped to a value between 0 and 1. Therefore, the linear scaling single exposure can be defined as: 
         [0000]    
       
         
           
             
               I 
                
               
                 ( 
                 
                   i 
                   , 
                   j 
                 
                 ) 
               
             
             = 
             
               S 
                
               
                 ( 
                 
                   
                     L 
                      
                     
                       ( 
                       
                         i 
                         , 
                         j 
                       
                       ) 
                     
                   
                   A 
                 
                 ) 
               
             
           
         
       
     
         [0000]    where A is the anchor point and S(x) can be defined as: 
         [0000]    
       
         
           
             
               S 
                
               
                 ( 
                 x 
                 ) 
               
             
             = 
             
               { 
               
                 
                   
                     1 
                   
                   
                     
                       x 
                       &gt; 
                       1 
                     
                   
                 
                 
                   
                     
                       x 
                       
                         1 
                         / 
                         ρ 
                       
                     
                   
                   
                     otherwise 
                   
                 
               
             
           
         
       
     
         [0000]    The parameter p can take values in the range [2.2,2.4] and represents the gamma of the output device to which the tone mapped image will be shown. The resulting image I can be quantized and displayed on a conventional LDR display. Note that other definitions of S(x) are possible. For example, an S-shaped curve can be used instead of the power function. In general, any global mapping curve can be used for S. 
         [0031]    In another implementation, the weights are binarized, which results in either 0 or 1 and a hard segmentation: 
         [0000]    
       
         
           
             
               
                 
                   p 
                   = 
                   
                     
                       Arg 
                       n 
                     
                      
                     
                         
                     
                      
                     
                       Max 
                        
                       
                         ( 
                         
                           
                             W 
                             n 
                           
                            
                           
                             ( 
                             
                               i 
                               , 
                               j 
                             
                             ) 
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   
                     n 
                     = 
                     1 
                   
                   , 
                   2 
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   N 
                 
               
             
             
               
                 
                   
                     
                       W 
                       p 
                     
                      
                     
                       ( 
                       
                         i 
                         , 
                         j 
                       
                       ) 
                     
                   
                   = 
                   1 
                 
               
               
                 
                   
                     
                       W 
                       q 
                     
                      
                     
                       ( 
                       
                         i 
                         , 
                         j 
                       
                       ) 
                     
                   
                   = 
                   
                     0 
                      
                     
                         
                     
                      
                     
                       ( 
                       
                         q 
                         ≠ 
                         p 
                       
                       ) 
                     
                   
                 
               
             
           
         
       
     
         [0032]    It is important to note that the anchor points A n  as well as the weights W n  are fixed once the segmentation is done. 
         [0033]    The contrast boost can be obtained by using a bandpass pyramid, known as a Laplacian pyramid which is obtained by forming the difference between adjacent levels in a pyramid, wherein an interpolation is performed between representations at adjacent levels of resolution, to enable the computation of pixel to pixel differences. I k  is one level of the Laplacian pyramid of image I, where k={1, . . . , K}. k is the level and K the number of levels in the pyramid. I can represent, a color component of a digital image. I(i,j) represents the value of the pixel at coordinates (i,j). The image is then reconstructed by the pyramid I k ·B k , where B is the contrast boost which is characterized as the power function 
         [0000]    
       
         
           
             { 
             
               
                 
                   
                     
                       
                         B 
                         k 
                       
                        
                       
                         ( 
                         
                           i 
                           , 
                           j 
                         
                         ) 
                       
                     
                     = 
                     1 
                   
                 
                 
                   
                     k 
                     = 
                     K 
                   
                 
               
               
                 
                   
                     
                       
                         B 
                         k 
                       
                        
                       
                         ( 
                         
                           i 
                           , 
                           j 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         ( 
                         
                           
                              
                             
                               
                                 l 
                                 k 
                               
                                
                               
                                 ( 
                                 
                                   i 
                                   , 
                                   j 
                                 
                                 ) 
                               
                             
                              
                           
                           α 
                         
                         ) 
                       
                       
                         β 
                         - 
                         1 
                       
                     
                   
                 
                 
                   
                     k 
                     = 
                     
                       { 
                       
                         1 
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           K 
                           - 
                           1 
                         
                       
                       } 
                     
                   
                 
               
             
           
         
       
     
         [0034]    Here, shape controller α is in the range [0,1] and is typically between 0.2 and 0.4 and boost intensity β is a positive number usually in the range [0,2]. Note that β&lt;1 increases the contrast, whereas β&gt;1 reduces the contrast. With these two parameters, one can control how much enhancement to apply to the image. It should be noted that the contrast boost pyramid B k , k={1, . . . , K} can be computed using different formulations. 
         [0035]    After the parameter sets have been determined for the static segments, an implementation of the invention uses the parameters of two adjacent static segments for interpolation. As such, the next step shown in  FIG. 1  is to interpolate the parameter set for the transient segments  104 . Utilized are two interpolation schemes. One is interpolation without light adaptation. The other is interpolation with light adaptation. 
         [0036]    For the transient segments for the approach without light adaptation, one can interpolate the parameter set based on the parameters of static segments obtained from the previous step. The interpolation can be done as linear interpolation in logarithm domain, as follows. 
         [0000]    
       
         
           
             
               A 
               j 
             
             = 
             
               
                 
                   
                     
                       A 
                       m 
                     
                     - 
                     
                       A 
                       n 
                     
                   
                   
                     m 
                     - 
                     n 
                   
                 
                 × 
                 
                   ( 
                   
                     j 
                     - 
                     n 
                   
                   ) 
                 
               
               + 
               
                 A 
                 n 
               
             
           
         
       
       
         
           
             
               B 
               j 
             
             = 
             
               
                 
                   
                     
                       B 
                       m 
                     
                     - 
                     
                       B 
                       n 
                     
                   
                   
                     m 
                     - 
                     n 
                   
                 
                 × 
                 
                   ( 
                   
                     j 
                     - 
                     n 
                   
                   ) 
                 
               
               + 
               
                 B 
                 n 
               
             
           
         
       
       
         
           
             
               G 
               j 
             
             = 
             
               
                 
                   
                     
                       G 
                       m 
                     
                     - 
                     
                       G 
                       n 
                     
                   
                   
                     m 
                     - 
                     n 
                   
                 
                 × 
                 
                   ( 
                   
                     j 
                     - 
                     n 
                   
                   ) 
                 
               
               + 
               
                 G 
                 n 
               
             
           
         
       
     
         [0037]    where A, B and G denote the anchor point, contrast boost level and exposure value in logarithm domain respectively; m and n denote the starting and ending frame index of the transient segment, j is the current frame number located in the transient segment. If light adaptation is not considered, the A, B and G values are used as the parameters for transient segments. 
         [0038]    However, the human visual system performs effectively over a vast range of luminous intensities, ranging from below starlight to sunlight. The faster recovery from dark to light changes or small light decrements, which can take seconds, is known as light adaptation. 
         [0039]    In an implementation with light adaptation, the above parameter interpolation is performed to simulate how human visual system gets adapted to the light condition change. This is particularly useful when the environment becomes much brighter. 
         [0040]    Essentially the idea is to introduce a delay factor in the parameter interpolation. For the first few frames in the transition period, the parameters from a previous scene are still used. After that, a linear interpolation in logarithm domain will be used: 
         [0000]    
       
         
           
             
               A 
               j 
             
             = 
             
               { 
               
                 
                   
                     
                       
                         
                           A 
                           n 
                         
                       
                       
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             n 
                           
                           ≤ 
                           j 
                           &lt; 
                           l 
                         
                       
                     
                     
                       
                         
                           
                             
                               
                                 
                                   A 
                                   m 
                                 
                                 - 
                                 
                                   A 
                                   n 
                                 
                               
                               
                                 m 
                                 - 
                                 l 
                               
                             
                             × 
                             
                               ( 
                               
                                 j 
                                 - 
                                 l 
                               
                               ) 
                             
                           
                           + 
                           
                             A 
                             n 
                           
                         
                       
                       
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             l 
                           
                           ≤ 
                           j 
                           &lt; 
                           m 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     B 
                     j 
                   
                 
                 = 
                 
                   { 
                   
                     
                       
                         
                           
                             
                               B 
                               n 
                             
                           
                           
                             
                               
                                 if 
                                  
                                 
                                     
                                 
                                  
                                 n 
                               
                               ≤ 
                               j 
                               &lt; 
                               l 
                             
                           
                         
                         
                           
                             
                               
                                 
                                   
                                     
                                       B 
                                       m 
                                     
                                     - 
                                     
                                       B 
                                       n 
                                     
                                   
                                   
                                     m 
                                     - 
                                     l 
                                   
                                 
                                 × 
                                 
                                   ( 
                                   
                                     j 
                                     - 
                                     l 
                                   
                                   ) 
                                 
                               
                               + 
                               
                                 B 
                                 n 
                               
                             
                           
                           
                             
                               
                                 if 
                                  
                                 
                                     
                                 
                                  
                                 l 
                               
                               ≤ 
                               j 
                               &lt; 
                               m 
                             
                           
                         
                       
                        
                       
                         
 
                       
                        
                       
                         G 
                         j 
                       
                     
                     = 
                     
                       { 
                       
                         
                           
                             
                               G 
                               n 
                             
                           
                           
                             
                               
                                 if 
                                  
                                 
                                     
                                 
                                  
                                 n 
                               
                               ≤ 
                               j 
                               &lt; 
                               l 
                             
                           
                         
                         
                           
                             
                               
                                 
                                   
                                     
                                       G 
                                       m 
                                     
                                     - 
                                     
                                       G 
                                       n 
                                     
                                   
                                   
                                     m 
                                     - 
                                     l 
                                   
                                 
                                 × 
                                 
                                   ( 
                                   
                                     j 
                                     - 
                                     l 
                                   
                                   ) 
                                 
                               
                               + 
                               
                                 G 
                                 n 
                               
                             
                           
                           
                             
                               
                                 if 
                                  
                                 
                                     
                                 
                                  
                                 l 
                               
                               ≤ 
                               j 
                               &lt; 
                               m 
                             
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    where A, B and G denote the anchor point, contrast boost level and gain value in logarithm domain respectively; m and n denote the starting and ending frame index of the transient segment, and j is the current frame number located in the transient segment. l denotes the time delay of the start of lighting change, which simulates how human visual system gets adapted to abrupt lighting change. Usually, the value of l is taken as 3˜6 frames. 
         [0041]    Once the parameter sets for transient segments have been obtained that can be either directly applied to the video to tone map the video  106 , parameter sets can be evaluated  105 . As mentioned above, the evaluation can be performed using an appropriate user interface, wherein if the application of the parameter sets for the static and transient segments is satisfactory, then toning mapping is performed  106  according to the parameter sets and if the application of the parameter sets is not satisfactory, then the steps  103 ,  104  and  105  are rerun such that a new parameter set for static segments is estimated and found. Rerunning of the steps  103 ,  104  and  105  can involve applying an additional low-pass filter operation on the gradient data and/or modifying the contrast boost parameters. 
         [0042]    While certain embodiments of the present invention have been described above, these descriptions are given for purposes of illustration and explanation. Variations, changes, modifications and departures from the systems and methods disclosed above may be adopted without departure from the scope or spirit of the present invention.