Abstract:
An embodiment relates to a method for color processing of an input image, the method including the steps of low-pass filtering of the input image to obtain a low-pass component, high-pass filtering of the input image to obtain a high-pass component, processing the input image for edge detection to obtain edginess parameters, and performing a color-space transformation of the input image based on the low-pass component, the high-pass component, and the edginess parameters.

Description:
PRIORITY CLAIM 
     The instant application claims priority to Italian Patent Application No. VI2012A000291, filed Oct. 29, 2012, which application is incorporated herein by reference in its entirety. 
     TECHNICAL FIELD 
     An embodiment relates to the field of image processing, in particular, to color processing of digital images and, particularly, to a color-processing system employing color-space matrix transforms. 
     SUMMARY 
     Digital imaging devices for capturing images, for example, mobile and digital still cameras or video cameras or LCD imaging signal processors, operate by means of image sensors. The spectral sensitivities of the sensor color channels usually do not match those of a desired output color space. Therefore, some color processing (matrixing) is typically needed to achieve colors of the desired color space. 
     A typical image-reconstruction (color-correction) pipeline implemented in an imaging device, for example, a digital camera reads (for a gamma correction of 1) 
     
       
         
           
             
               
                 [ 
                 
                   
                     
                       
                         R 
                         o 
                       
                     
                   
                   
                     
                       
                         G 
                         o 
                       
                     
                   
                   
                     
                       
                         B 
                         o 
                       
                     
                   
                 
                 ] 
               
               = 
               
                 
                   
                     [ 
                     
                       
                         
                           
                             a 
                             11 
                           
                         
                         
                           
                             a 
                             12 
                           
                         
                         
                           
                             a 
                             13 
                           
                         
                       
                       
                         
                           
                             a 
                             21 
                           
                         
                         
                           
                             a 
                             22 
                           
                         
                         
                           
                             a 
                             23 
                           
                         
                       
                       
                         
                           
                             a 
                             31 
                           
                         
                         
                           
                             a 
                             32 
                           
                         
                         
                           
                             a 
                             33 
                           
                         
                       
                     
                     ] 
                   
                   ⁡ 
                   
                     [ 
                     
                       
                         
                           
                             r 
                             gw 
                           
                         
                         
                           0 
                         
                         
                           0 
                         
                       
                       
                         
                           0 
                         
                         
                           
                             g 
                             gw 
                           
                         
                         
                           0 
                         
                       
                       
                         
                           0 
                         
                         
                           0 
                         
                         
                           
                             b 
                             gw 
                           
                         
                       
                     
                     ] 
                   
                 
                 ⁡ 
                 
                   [ 
                   
                     
                       
                         
                           R 
                           i 
                         
                       
                     
                     
                       
                         
                           G 
                           i 
                         
                       
                     
                     
                       
                         
                           B 
                           i 
                         
                       
                     
                   
                   ] 
                 
               
             
             , 
           
         
       
     
     where R i , G i , B i , are the device raw RGB values and R o , G o , B o  are the desired output RGB values. The RGB space is used for exemplary purposes. The diagonal matrix diag (r gw , g gw , b gw ) performs white balancing, i.e., it is provided for luminance compensation. The 3×3 matrix with matrix elements a 11 , . . . , a 33  is a color matrix for color-space transform (matrixing) from the device RGB space to a standard color space (e.g., sRGB, AdobeRGB, etc). 
     However, the color-space transform can produce artifacts resulting in a degradation of the image quality in the desired, e.g., sRGB space. In particular, in the case of small-gamut sensors, the noise in the output color space typically exceeds the original noise in the device color space, i.e., for example, for the red channel, under the assumption that the noise in the device color space is the same for all RGB channels: 
     
       
         
           
             
               
                 
                   σ 
                   
                     R 
                     o 
                   
                 
                 
                   σ 
                   
                     R 
                     i 
                   
                 
               
               = 
               
                 
                   
                     
                       a 
                       11 
                       2 
                     
                     + 
                     
                       a 
                       12 
                       2 
                     
                     + 
                     
                       a 
                       13 
                       2 
                     
                   
                 
                 &gt; 
                 1 
               
             
             , 
           
         
       
     
     where σ R     o    and σ R     i    represent the noise in the red channel after the transformation and before the transformation, respectively. 
     Thus, typically, color processing leads to noise amplification. 
     Therefore, an embodiment is a method for color processing that alleviates noise amplification significantly as compared to conventional schemes. 
     An embodiment addresses the above-mentioned problem and provides a method for color processing of a (digital) input image, the method including the steps of: 
     Low-pass filtering of the (e.g., color channels of the) input image to obtain a low-pass component (e.g., for each color channel); 
     High-pass filtering of the (e.g., color channels of the) input image to obtain a high-pass component (e.g., for each color channel); 
     processing the input image for edge detection to obtain edginess parameters (e.g., one edginess parameter for each pixel of the input image); and 
     performing a color-space transformation of the input image based on the low-pass component, the high-pass component, and the edginess parameters. The input image is, for example, an RGB image. 
     By low-pass filtering, slowly varying background patterns that can be interpreted as wave patterns with long wavelengths (low frequencies) are stressed, whereas by high-pass filtering, highly varying details with short wavelengths (high frequencies) are stressed. Both low- and high-pass filtering can, in principle, be performed in the spatial or frequency domain in a conventional manner. 
     The low-pass filtering can, for example, be performed by means of a low-pass filter with a bandwidth selected based on the resolution (number of pixels) of the input image. 
     If m and n are respectively the number of rows and columns of the input image, then the size of the low-pass filter convolution kernel can be calculated, for example, in the following way: LPk=(m*n)/S, where S is a suitable scaling factor. 
     Whereas gamut mapping based on color matrix operations of conventional digital cameras leads to a set of correction coefficients that causes significant reduction of the signal-to-noise ratio (SNR), according to an embodiment little or no significant noise is produced. This is achieved by adapting matrixing (color matrix application) based on the total information given by the low- and high-pass components and the edginess information. The edge detection is performed in order to discriminate between pixels belonging to flat or edge regions of the input image. In particular, the edge detection may include corner detection. 
     The edginess parameter represents the edginess of a pixel. For each pixel of the input image, a respective edginess parameter can be determined. For example, a normalized edginess parameter of the interval [0, 1], wherein 0 and 1 represent a likelihood of 0% and 100% probability, respectively, that a pixel belongs to an edge of the input image (or a corner of the input image), can be determined (see also detailed description below). The edginess parameters can, particularly, be determined based on a set of mask patterns used to identify vertical, horizontal and diagonal edges and corners. Moreover, the edginess parameters can be determined in the spatial RGB domain and based on the entire information of one or more RGB color channels. 
     According to an example where the color space has three dimensions or channels (e.g., RGB), the color-space transformation of the input image is performed for each pixel of the input image according to:
 
 C   i ′=( C   1     LP     +αC   1     HP   ) m   i0 +( C   2     LP     +αC   2     HP   ) m   i1 +( C   3     LP     +αC   3     HP   ) m   i2 +(1−α) C   i     HP      i= 1,2,3
 
     where C i     LP    denotes the low-pass component of the pixel for the i-th channel (i-th channel of the low-pass component), C i     HP    denotes the high-pass component of the pixel for the i-th channel (i-th channel of the high-pass component), α denotes the edginess parameter of the pixel, and m ij  denotes the i,j coefficient of a color matrix. 
     The color-matrix coefficients depend mainly on the response of the camera color filters and the target standard color space. They also could be dynamically calculated for the white-balancing estimation results. An example reads 
     
       
         
           
             M 
             = 
             
               
                 [ 
                 
                   
                     
                       1.9 
                     
                     
                       
                         - 
                         0.6 
                       
                     
                     
                       
                         - 
                         0.3 
                       
                     
                   
                   
                     
                       
                         - 
                         0.3 
                       
                     
                     
                       1.6 
                     
                     
                       
                         - 
                         0.3 
                       
                     
                   
                   
                     
                       
                         - 
                         0.5 
                       
                     
                     
                       
                         - 
                         0.7 
                       
                     
                     
                       2.2 
                     
                   
                 
                 ] 
               
               . 
             
           
         
       
     
     The above-described examples of an embodiment can also be implemented in the context of image processing for tone mapping (dynamic range compression). In general, an application of digital gain greater than 1.0 produces a signal degradation in terms of SNR. 
     Both the application of digital gains to input RGBi signals for white-balancing compensation and the gamma encoding applied to linear output RGBo signals can benefit from an embodiment. 
     Another embodiment is a computer-program product including one or more computer-readable media having computer-executable instructions for performing the steps of a method according to an embodiment such as according to one of the above-described examples. 
     The above-mentioned problem can also be solved by an image-processing device, including a processor (for example, an imaging signal processor or an LCD imaging signal processor) configured for: 
     Low-pass filtering of the input image to obtain a low-pass component; 
     high-pass filtering of the input image to obtain a high-pass component; 
     processing the input image for edge detection to obtain edginess parameters; and 
     performing a color-space transformation of the input image based on the low-pass component, the high-pass component, and the edginess parameters. 
     In particular, the processor may be configured to perform the color-space transformation of the input image for each pixel of the input image according to:
 
 C   i ′=( C   1     LP     +αC   1     HP   ) m   i0 +( C   2     LP     +αC   2     HP   ) m   i1 +( C   3     LP     +αC   3     HP   ) m   i2 +(1−α) C   i     HP      i= 1,2,3
 
     where C i     LP    denotes the low-pass component of the pixel for the i-th channel (i-th channel of the low-pass component), C i     HP    denotes the high-pass component of the pixel for the i-th channel (i-th channel of the high-pass component), α denotes the edginess parameter of the pixel, and m ij  denotes the i,j coefficient of a color matrix. 
     The image-processing device can, for example, include or consist of a digital (still) camera. It can also be some LCD display device including a display-driver circuit wherein an embodiment of the above-described method is implemented. 
     Another embodiment is an image-processing device including a low-pass filter for low-pass filtering of the input image to obtain a low-pass component, a high-pass filter for high-pass filtering of the input image to obtain a high-pass component, an edge-detection means for processing the input image for edge detection to obtain edginess parameters, and a color-matrix-application means for performing a color-space transformation of the input image based on the low-pass component, the high-pass component, and the edginess parameters. 
     According to a particular example, the high-pass component is obtained based on the difference of the input image and the low-pass component. For example, the pixel values of the low-pass component are subtracted from the pixel values of the input image. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       One or more features and advantages will be described with reference to the drawings. In the description, reference is made to the accompanying figures, which are meant to illustrate one or more embodiments, although it is understood that such embodiments may not represent the full scope of the teachings of the disclosure. 
         FIG. 1  illustrates an example of color processing based on color matrixing, according to an embodiment. 
         FIG. 2  shows exemplary mask patterns that can be used for edge or corner detection, according to an embodiment. 
     
    
    
     DETAILED DESCRIPTION 
     An example for adaptive color-matrix application for color-space transform of an image is illustrated in  FIG. 1 , according to an embodiment. An RGB input image is processed by a low-pass filter  1  to obtain a low-pass component A LP , and by a high-pass filter  2  to obtain a high-pass component A HP . According to an example, the high-pass component is obtained by determining the difference of the pixel values of the input image and the pixel values of the low-pass component. In addition, the digital input image is processed for edge detection by an edge-detection means  3 , which provides edginess parameters α for each pixel of the input image. The edge-detection means  3  estimates the likelihood [0, 1] that a pixel is part of an edge or a corner pixel. The low-pass component A LP  and high-pass component A HP , and the edginess parameters α are input to a color-matrix application means  4 , which performs matrixing of the input image based on the input information provided by the low-pass filter  1 , the high-pass filter  2 , and the edge-detection means  3 . 
     In detail, according to an example, the edge-detection means  3  adopts six mask patterns as illustrated in  FIG. 2  in order to detect both edges and corners. The edge-detection means  3  may operate in the spatial RGB domain. It may make use of information of all channels. Moreover, across different patterns, different functions to accumulate the edginess parameters, and different weighting masks to obtain a better edge-detection precision, can be used. 
     The number of potential masks to be used for edge detection can be extended, thus leading to the possibility of detecting edges of any orientation with a greater accuracy. The herein disclosed embodiment for edge detection has been initially based on a the following paper, Yeong-Hwa Kim, and Jaeheon Lee, “Image Feature and Noise Detection Based on Statistical Hypothesis, Tests and Their Applications in Noise Reduction”, IEEE Transactions on Consumer Electronics, vol. 51, n. 4, November 2005, which is incorporated by reference. However, an embodiment of the disclosed accumulation function has been modified, and, to an embodiment, pattern masks for corner detection, and the possibility of using weighting masks, has been added. 
     Consider n color channels and m pattern masks of size s each. An edginess level of a pixel of the input image for the i-th channel related to the k-th edge pattern can be determined by: 
     
       
         
           
             
               
                 
                   E 
                   ki 
                 
                 = 
                 
                   
                     ∑ 
                     
                       j 
                       = 
                       1 
                     
                     s 
                   
                   ⁢ 
                   
                     
                        
                       
                         
                           C 
                           
                             i 
                             , 
                             
                               
                                 ( 
                                 
                                   j 
                                   + 
                                   1 
                                 
                                 ) 
                               
                               k 
                             
                           
                         
                         - 
                         
                           C 
                           
                             ij 
                             k 
                           
                         
                       
                        
                     
                     ⁢ 
                     
                       w 
                       
                         j 
                         k 
                       
                     
                   
                 
               
               ; 
               
                 i 
                 = 
                 1 
               
             
             , 
             2 
             , 
             … 
             ⁢ 
             
                 
             
             , 
             
               n 
               ; 
               
                 k 
                 = 
                 1 
               
             
             , 
             2 
             , 
             … 
             ⁢ 
             
                 
             
             , 
             m 
             , 
           
         
       
     
     where C ij     k    denotes the pixel value of the i-th channel at the j-th position of the k-th pattern and w j     k    denotes the weight selected from the interval [0, 1] at the j-th position of the k-th pattern. For the i-th color channel one obtains: 
     
       
         
           
             
               
                 
                   E 
                   i 
                 
                 = 
                 
                   
                     ∑ 
                     
                       k 
                       = 
                       1 
                     
                     m 
                   
                   ⁢ 
                   
                     E 
                     ki 
                   
                 
               
               ; 
               
                 i 
                 = 
                 1 
               
             
             , 
             2 
             , 
             … 
             ⁢ 
             
                 
             
             , 
             n 
           
         
       
     
     Normalization to the interval [0, 1] is obtained by: 
     
       
         
           
             
               
                 
                   E 
                   _ 
                 
                 i 
               
               = 
               
                 
                   E 
                   i 
                 
                 
                   
                     ( 
                     
                       s 
                       - 
                       1 
                     
                     ) 
                   
                   ⁢ 
                   
                     ( 
                     
                       
                         2 
                         b 
                       
                       - 
                       1 
                     
                     ) 
                   
                 
               
             
             , 
           
         
       
     
     where b is the bit depth of the i-th color channel quantifying how many unique colors are available in an image&#39;s color palette. Consequently, the overall normalized edginess parameter for the pixel is given by: 
     
       
         
           
             α 
             = 
             
               
                 max 
                 i 
               
               ⁢ 
               
                 
                   { 
                   
                     
                       E 
                       _ 
                     
                     i 
                   
                   } 
                 
                 . 
               
             
           
         
       
     
     As already mentioned, the low-pass and high-pass components, as well as the edginess parameters α, for each pixel are input into the color-matrix application means  4 . For a 3-channel color image, for example, an RGB image, the color-matrix application means  4  calculates, for each pixel, the i-th output channel of the matrix-transformed input image (i.e., of the desired color-transformed output image) as follows:
 
 C   i ′=( C   1     LP     +αC   1     HP   ) m   i0 +( C   2     LP     +αC   2     HP   ) m   i1 +( C   3     LP     +αC   3     HP   ) m   i2 +(1−α) C   i     HP      i= 1,2,3
 
     where C i     LP    denotes the low-pass component of the pixel for the i-th channel (i-th channel of the low-pass component) and C i     HP    denotes the high-pass component of the pixel for the i-th channel (i-th channel of the high-pass component) and m ij  denotes the i,j coefficient of the color matrix applied by the color-matrix application means  4 . The coefficients m ij  can be the coefficients of a conventional color matrix. 
     An example color matrix is: 
     
       
         
           
             M 
             = 
             
               
                 [ 
                 
                   
                     
                       1.9 
                     
                     
                       
                         - 
                         0.6 
                       
                     
                     
                       
                         - 
                         0.3 
                       
                     
                   
                   
                     
                       
                         - 
                         0.3 
                       
                     
                     
                       1.6 
                     
                     
                       
                         - 
                         0.3 
                       
                     
                   
                   
                     
                       
                         - 
                         0.5 
                       
                     
                     
                       
                         - 
                         0.7 
                       
                     
                     
                       2.2 
                     
                   
                 
                 ] 
               
               . 
             
           
         
       
     
     All previously described embodiments are not intended as limitations, but serve as examples illustrating features and advantages of the disclosed concepts. It is also understood that some or all of the above-described features can be combined in ways different from the ways described. 
     For example, an apparatus that performs the above-described calculations may be a computing machine such as a microprocessor, microcontroller, or non-instruction-executing circuit. And such a computing machine may be on a same die as, or on a different die than, the image-capture device that captures an image and that generates one or more color components for each pixel of the image. 
     From the foregoing it will be appreciated that, although specific embodiments have been described herein for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the disclosure. Furthermore, where an alternative is disclosed for a particular embodiment, this alternative may also apply to other embodiments even if not specifically stated.