Abstract:
An image processing system and method corrects the perceptual quality of an image by adjusting the image colors. “Color” in this sense is to be understood as encompassing three-dimensional parameterizations of color, incorporating both intensity and hue. These measurements are made using creative computations developed and adapted from the RETINEX™ theory (Land, 1977), where the RETINEX implementation adjusts any pixel in any direction in color space and further to automatically determine the best direction for it to be adjusted to increase the perceptual visibility of the algorithm with a minimal amount of change to the original image values.

Description:
RELATED APPLICATIONS 
       [0001]    The instant U.S. Patent Application is related to and claims the benefit of priority of U.S. Provisional Application for Patent No. 61/521,875 SYSTEM AND METHOD OF IMAGE PROCESSING PERCEPTUAL VISIBILITY OF IMAGERY, filed on Aug. 10, 2011, and having the same joint inventors, and said U.S. Provisional Application for Patent is incorporated by reference herein in its entirety. Furthermore, the instant U.S. Patent Application is related to U.S. patent application Ser. No. 12/416,716 METHODS AND SYSTEMS OF COMPARING FACE MODELS FOR RECOGNITION, filed on Apr. 1, 2009, and is incorporated by reference herein in its entirety. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention is generally related to image processing. In particular the present invention is directed to correcting the perceptual quality of an image by adjusting the image colors. (“Color” in this sense is to be understood as encompassing three-dimensional parameterizations of color, incorporating both intensity and hue.) 
       BACKGROUND OF THE INVENTION 
       [0003]    Existing image processing systems and methods directed toward correcting the perceptual quality of an image do not to have the flexibility to adjust pixels in multiple (independent) directions in color space. Neither preprocessed nor post processed images have an algorithm with the flexibility to correct both images that are too light and images that are too dark, even more so, images that have both problems. Many algorithms can correct one of these problems, although most existing implementations (and descriptions) only account for increasing the brightness of selected pixels in dark regions. 
         [0004]    RETINEX™ Theory: 
         [0005]    RETINEX Theory was proposed by Edwin Land in 1959 as a model for how the retina and cortex (thus RETINEX) logarithmically regulate the incoming flux into the eye to provide visual color constancy. Land and others have developed algorithms which implement aspects of RETINEX Theory. 
         [0006]    Land&#39;s original algorithm was extended and implemented as a general image processing algorithm called the Multi-Scale RETINEX Algorithm by Rahman et al. which also computes the logarithmic ratio of a pixel&#39;s value and its surround. 
         [0007]    Due to limitations in the above mentioned conventional image processing algorithms, the need exists for image processing systems and methods, directed toward correcting the perceptual quality of images, which have the flexibility to adjust pixels in multiple (independent) directions in color space. 
         [0008]    Also, the need exists for image processing systems and methods directed toward correcting the perceptual quality of an image to incorporate either preprocessing and/or post processing algorithms having the flexibility to adjust pixels in multiple (independent) directions in color space. 
         [0009]    Finally, the need exists for image processing systems and methods directed toward correcting the perceptual quality of an image which have the flexibility to correct images which are too light and images which are too dark, and to simultaneously correct images which exhibit both light and dark problems. 
       SUMMARY OF THE INVENTION 
       [0010]    An image processing system and method corrects the perceptual quality of an image by adjusting the image colors. (“Color” in this sense is to be understood as encompassing three-dimensional parameterizations of color, incorporating both intensity and hue.) These measurements are made using novel and creative computer processing computations developed and adapted from RETINEX™ (Land, 1977), which is a theory of human color vision (i.e., intensity+hue), where the RETINEX theory is implemented to adjust any pixel in any direction in color space and further to automatically determine the best direction for it to be adjusted to increase the perceptual visibility of the image with a minimal amount of change to the original image values. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]      FIG. 1  illustrates a curve representing a situation in which an image is too dark and thus obscures the features in the image, such situations for which RETINEX was originally designed. 
           [0012]      FIG. 2  illustrates a curve in the reverse situation of the illustration in  FIG. 1 , i.e., an image is too bright and thus obscures the features. Here the opposite correction is needed. However, the shape of the curve is the same; only the single “centering” point has been moved and the direction adjusted appropriately. 
           [0013]      FIG. 3  illustrates a novel approach to making the correction, which is enabled by computing multiple “centering” points. Here, the curves are scaled and repeated multiple times and in both directions, as compared to the curves illustrated in  FIG. 1  and  FIG. 2 . 
           [0014]      FIG. 4  illustrates the three parts of the novel adaptation of Adapted RETINEX Processing algorithm system: (1) Pre-processing; (2) Adapted RETINEX Processing algorithm; and (3) Post-processing. 
           [0015]      FIG. 5  illustrates an overview of the Adapted RETINEX Processing algorithm written in C++ using the Fastest Fourier Transform in the West and Lib TIFF libraries. 
           [0016]      FIG. 6  illustrates an original exemplary unprocessed image. 
           [0017]      FIG. 7  illustrates an image with histogram equalization processing. 
           [0018]      FIG. 8  illustrates Multi-scale RETINEX processing. 
           [0019]      FIG. 9  illustrates Adapted RETINEX Processing. 
           [0020]      FIG. 10  illustrates an exemplary computer readable and computer executable medium containing a program product including the Adapted RETINEX Processing algorithm in the form of program logic described as a method  406 . 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0021]    Preferred exemplary embodiments of the present invention are now described with reference to the figures, in which like reference numerals are generally used to indicate identical or functionally similar elements. While specific details of the preferred exemplary embodiments are discussed, it should be understood that this is done for illustrative purposes only. A person skilled in the relevant art will recognize that other configurations and arrangements can be used without departing from the spirit and scope of the preferred exemplary embodiments. It will also be apparent to a person skilled in the relevant art that this invention can also be employed in other applications. Further, the terms “a”, “an”, “first”, “second” and “third” etc. used herein do not denote limitations of quantity, but rather denote the presence of one or more of the referenced items(s). 
         [0022]    According to exemplary embodiments, and referring to  FIG. 1 , when an image which is too dark and thus obscures the features in the image, is represented by a curve illustrated in  FIG. 1 , where this curve has the general shape of the dominant function, i.e., the natural logarithm, which emulates the processing of relative intensity (within color channels) of the human visual system. This is the correction function that RETINEX implementations apply, which will work well when the image is mostly dark. 
         [0023]    Further according to exemplary embodiments, and referring to  FIG. 2 , the curve illustrated in  FIG. 2  represents the reverse situation of the illustration in  FIG. 1 ; thus, in  FIG. 2 , an image is too bright and therefore obscures the features. Here the opposite correction is needed. However, the shape of the curve is the same; only the “centering” point has been moved and the direction adjusted appropriately. 
         [0024]    The following formula (1) represents an example of a traditional implementation of the RETINEX algorithm (Land, 1986): 
         [0000]    
       
                 
         
             
             
         
       
     
         [0025]    Formula (2) represents the Multi-scale RETINEX formulation (Rahman et al., 2004): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           R 
                           i 
                         
                          
                         
                           ( 
                           
                             x 
                             , 
                             y 
                           
                           ) 
                         
                       
                       = 
                       
                         
                           
                             a 
                             
                               x 
                               , 
                               y 
                             
                           
                            
                           
                             
                               ∑ 
                               
                                 k 
                                 = 
                                 1 
                               
                               K 
                             
                              
                             
                               
                                 W 
                                 k 
                               
                                
                               
                                 ln 
                                  
                                 
                                   ( 
                                   
                                     
                                       
                                         I 
                                         i 
                                       
                                        
                                       
                                         ( 
                                         
                                           x 
                                           , 
                                           y 
                                         
                                         ) 
                                       
                                     
                                     
                                       
                                         
                                           F 
                                           k 
                                         
                                          
                                         
                                           ( 
                                           
                                             x 
                                             , 
                                             y 
                                           
                                           ) 
                                         
                                       
                                       * 
                                       
                                         
                                           I 
                                           i 
                                         
                                          
                                         
                                           ( 
                                           
                                             x 
                                             , 
                                             y 
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                   ) 
                                 
                               
                                
                               
                                   
                               
                                
                               i 
                             
                           
                         
                         = 
                         
                           [ 
                           
                             R 
                             , 
                             G 
                             , 
                             B 
                           
                           ] 
                         
                       
                     
                     , 
                     
                       N 
                       = 
                       
                         
                           3 
                            
                           
                               
                           
                            
                           k 
                         
                         = 
                         
                           ⌊ 
                           
                             5 
                             , 
                             20 
                             , 
                             100 
                           
                           ⌋ 
                         
                       
                     
                     , 
                     
                       W 
                       = 
                       
                         ⌊ 
                         
                           
                             1 
                             3 
                           
                           , 
                           
                             1 
                             3 
                           
                           , 
                           
                             1 
                             3 
                           
                         
                         ⌋ 
                       
                     
                     , 
                     
                       K 
                       = 
                       3 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         F 
                         k 
                       
                        
                       
                         ( 
                         
                           x 
                           , 
                           y 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           1 
                           
                             
                               ∑ 
                               x 
                               
                                   
                               
                             
                              
                             
                               
                                 ∑ 
                                 y 
                                 
                                     
                                 
                               
                                
                               
                                 F 
                                  
                                 
                                   ( 
                                   
                                     x 
                                     , 
                                     y 
                                   
                                   ) 
                                 
                               
                             
                           
                         
                          
                         
                           exp 
                            
                           
                             ( 
                             
                               
                                 - 
                                 
                                   ( 
                                   
                                     
                                       x 
                                       2 
                                     
                                     + 
                                     
                                       y 
                                       2 
                                     
                                   
                                   ) 
                                 
                               
                               
                                 σ 
                                 2 
                               
                             
                             ) 
                           
                         
                          
                         
                             
                         
                          
                         
                           
                             a 
                             i 
                           
                            
                           
                             ( 
                             
                               x 
                               , 
                               y 
                             
                             ) 
                           
                         
                       
                       = 
                       
                         ln 
                         ( 
                         
                           1 
                           + 
                           
                             C 
                              
                             
                               
                                 
                                   I 
                                   i 
                                 
                                  
                                 
                                   ( 
                                   
                                     x 
                                     , 
                                     y 
                                   
                                   ) 
                                 
                               
                               
                                 
                                   ∑ 
                                   
                                     n 
                                     = 
                                     1 
                                   
                                   N 
                                 
                                  
                                 
                                   
                                     I 
                                     n 
                                   
                                    
                                   
                                     ( 
                                     
                                       x 
                                       , 
                                       y 
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0026]    An overview of exemplary embodiments of the system follows (see  FIG. 4 ): 
         [0027]    The project can be written in C++ using the Fastest Fourier Transform in the West and Lib Tiff libraries. Also, any other Fourier Transform can be implemented or computing convolution directly can be implemented. 
         [0028]    Referring to  FIG. 4 , the system has three parts: 
         [0029]    [1] Pre-processing  404 , which includes an input, determining centers and padding images; 
         [0030]    [2] Adapted RETINEX Processing algorithm  406 , which can include Fourier Transform, Convolution, and Adapted RETINEX Processing algorithm implementation; and 
         [0031]    [3] Post-processing  408 , which includes scale output, smooth image, color restoration and output. 
         [0032]    The initial processing, i.e., pre-processing, includes: 
         [0033]    reading inputs as series of images i.e., video and/or static images, where the format can be MPEG, AVI, WMV, TIFFs, JPGs PNGs or any other image format, then 
         [0034]    the method determines areas on the image with low contrast; and 
         [0035]    saves and/or indexes the areas on the image as centers for later processing; 
         [0036]    uses a Fast Fourier Transform to speed up convolution operator: 
         [0037]    FFT: O(w*h*log(w*h)) 
         [0038]    Convolution: O(w*h*Kw*Kh). 
         [0039]    The Adapted RETINEX Processing algorithm overview disclosed above, uses the same principles which provide color constancy in dark lightings and applied them to filter hazing. Selection of natural logarithm functions highlight pixel values closer to zero. And, the Adapted RETINEX Processing algorithm centers function(s) around multiple vertical asymptotes (centers) to highlight specific values. See  FIG. 1  and  FIG. 2  for graphs of the regular RETINEX algorithm in forward and reverse directions (i.e., correcting color values of pixels when the image is too light and when the image is too dark), and see  FIG. 3  for a graphical illustration of the result of the Adapted RETINEX Processing algorithm. The Adapted RETINEX Processing algorithm is significantly different in processing than the traditional RETINEX algorithm. The traditional RETINEX algorithm highlights values closer to zero (0). In the Adapted RETINEX Processing algorithm, the process of centering in the algorithm calls for novel mathematical re-building of the algorithm and uses properties of logarithms, and thus the Adapted RETINEX Processing algorithm equation is presented in a new form, as shown in formula (3) below: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       AR 
                       i 
                     
                      
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         k 
                         = 
                         1 
                       
                       K 
                     
                      
                     
                       
                         ∑ 
                         
                           n 
                           = 
                           1 
                         
                         N 
                       
                        
                       
                         
                           W 
                           k 
                         
                          
                         
                           R 
                           n 
                         
                          
                         
                           sgn 
                            
                           
                             ( 
                             
                               
                                 
                                   I 
                                   i 
                                 
                                  
                                 
                                   ( 
                                   
                                     x 
                                     , 
                                     y 
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 
                                   
                                     F 
                                     k 
                                   
                                    
                                   
                                     ( 
                                     
                                       x 
                                       , 
                                       y 
                                     
                                     ) 
                                   
                                 
                                 * 
                                 
                                   
                                     I 
                                     i 
                                   
                                    
                                   
                                     ( 
                                     
                                       x 
                                       , 
                                       y 
                                     
                                     ) 
                                   
                                 
                               
                             
                             ) 
                           
                         
                          
                         
                           ln 
                            
                           
                             ( 
                             
                               1 
                               + 
                               
                                 
                                    
                                   
                                     
                                       
                                         
                                           F 
                                           k 
                                         
                                          
                                         
                                           ( 
                                           
                                             x 
                                             , 
                                             y 
                                           
                                           ) 
                                         
                                       
                                       * 
                                       
                                         
                                           I 
                                           i 
                                         
                                          
                                         
                                           ( 
                                           
                                             x 
                                             , 
                                             y 
                                           
                                           ) 
                                         
                                       
                                     
                                     - 
                                     
                                       
                                         I 
                                         i 
                                       
                                        
                                       
                                         ( 
                                         
                                           x 
                                           , 
                                           y 
                                         
                                         ) 
                                       
                                     
                                   
                                    
                                 
                                 
                                   
                                     D 
                                     + 
                                     
                                        
                                       
                                         
                                           
                                             I 
                                             i 
                                           
                                            
                                           
                                             ( 
                                             
                                               x 
                                               , 
                                               y 
                                             
                                             ) 
                                           
                                         
                                         - 
                                         
                                           C 
                                           n 
                                         
                                       
                                        
                                     
                                   
                                   b 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0040]    The final processing: 
         [0041]    ranges the output(s) of RETINEX, 
         [0042]    conducts weighted averages with previous frame(s) for video processing, 
         [0043]    smooths noisy images of the original noise reduction algorithm, which maintains edges while reducing noise highlighted by RETINEX processing; and, in the case of color imagery, restores some original color to the image, using a new color restoration coefficient formula: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       a 
                       i 
                     
                      
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       1 
                       2 
                     
                      
                     
                       
                         ( 
                         
                           1 
                           + 
                           
                             N 
                              
                             
                               
                                 
                                   I 
                                   i 
                                 
                                  
                                 
                                   ( 
                                   
                                     x 
                                     , 
                                     y 
                                   
                                   ) 
                                 
                               
                               
                                 
                                   ∑ 
                                   
                                     n 
                                     = 
                                     1 
                                   
                                   N 
                                 
                                  
                                 
                                   
                                     I 
                                     n 
                                   
                                    
                                   
                                     ( 
                                     
                                       x 
                                       , 
                                       y 
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                         ) 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0044]    (referring to formula (4)), where N is the number of channels describing the color, and where N is typically represented by the value “three” in most image storage formats. 
         [0045]    Analysis: 
         [0046]    A new local contrast metric involving the difference between a pixel and its background is applied to images. The mean contrast is recorded for each image before and after processing. 
         [0047]    Essentially, the algorithm described in the exemplary embodiments uses statistical measures of the image to estimate the proper location of this centering point and/or multiple centers, then runs the Adapted RETINEX Processing algorithm implementations in both directions for the set of pixels which are deemed to require adjustment in order to be properly perceived by the human who will view these images. In other words, determining forward and reverse directions refers to correcting color values of pixels (where color is considered in terms of hue and/or intensity) by determining a logarithmic ratio for the amount of correction desired. Associated with determining forward and reverse direction is determining a weighted scaling and a direction for scaling and conducting smoothing operations, converting an output color or space, restoring color and outputting a corrected image. So, when an image is dark a logarithmic ratio is determined to correct the color values of pixels; and when an image is light, another logarithmic ratio is determined which is a reverse of the logarithmic ratio determined for the dark image. 
         [0048]    Further, computer processing related programmatic implementations of the Adapted RETINEX Processing algorithm described in the exemplary embodiments have greater flexibility and the ability to find the appropriate centering points (“center” is best conceived as a peak point or a valley point (however, “center” is preferably described as a mathematical-critical point, having min, max, deflection and including end points) in a color/intensity distribution, which may occur anywhere in the domain) and/or multiple centers running in both directions. 
         [0049]    Additionally, the Adapted RETINEX Processing algorithm described in the exemplary embodiments runs with non-conventional, as well as traditional color spaces. The traditional RGB color space used by most computer monitors and graphics processors is not the optimal space in which to perform the computations of the exemplary embodiments (even though the algorithm may be run in that space). The television standard YIQ color space (which approximates an intensity channel and two color channels, most like human visual systems and several other color spaces) is a more suitable space in which to perform the computations of the exemplary embodiments. RETINEX implementations run in any color space equally well. 
         [0050]    More choices of color space selection exist, as described in the exemplary embodiments, such as CIE-Luv or CIE-Lab, both of which also approximate one intensity and two color channels). 
         [0051]    To model the effectiveness of the new Adapted RETINEX Processing algorithm, a new local contrast metric involving the difference between a pixel and its background is applied to two categories of images: Category 1: Increase in average contrast and standard deviation; and Category 2: Decrease in average contrast and standard deviation. 
         [0052]    Exemplary embodiments also describe an edge-based image smoothing (i.e., noise removal) algorithm to assist with the image processing. The RETINEX implementation (like nearly all image processing algorithms) performs better when the amount of noise in the input image is low. The programmatic implementations described in the exemplary embodiments are based on the standard flood-fill algorithm guided by the Canny edge detection algorithm. Other edge detection algorithms, for example, based on the Sobel operator or Marr-Hildreth method would be equivalents. 
         [0053]    This image processing image correction system disclosed herein is easily used in transportation situations to greatly improve visibility and reduce accidents due to problematic weather. The system can easily be implemented into airplane cockpits, helmet cameras, or automobile dashboards. 
         [0054]    The Adapted RETINEX Processing algorithm is effective at improving contrast in low-visibility imagery. This new system is very effective at enhancing a wide range of video, as well as static images. Thus, the system has implications in improving visibility in a variety of dark or foggy situations and therefore improving safety. 
         [0055]    The imagery to which the RETINEX theory is applicable is not limited to synthetic imagery, i.e., rendered images. The images can be photographic images, as well as other types of images, including digital images. 
         [0000]                                                                        TABLE 1                   Mean Local Band-limited Contrast of Target                Image   Original   HE   MSR   ARP                            Landscape   4.71   33.75   8.89   45.02           Skyline   1.23   7.94   5.63   28.43           Snowy Road   5.88   25.42   12.26   34.20           Sandstorm   13.69   23.47   8.34   47.96           Underwater   13.11   33.27   8.47   49.72           Night Vision   32.68   44.46   17.46   58.34           Playground   35.94   38.28   23.18   63.48                        
Table 1 discloses a numerical comparison of the new Adapted RETINEX Processing algorithm to other image processing approaches, where the numbers in the ARP column have values many times greater than numerical values in other characterizations; thus the contrast values obtainable by the ARP implementation far exceed any contrast values obtained in the other characterizations. In Table 1, “Original” characterizes a metric computed on an original image; “HE” is a metric computed on an image processed by histogram equalization; “MSR” is a metric computed on an image processed by the Multi-scale RETINEX algorithm of Rahman et al., and “ARP” is a metric on an image processed by the new Adapted RETINEX Processing algorithm.  FIG. 6  illustrates an original unprocessed or minimally processed image.  FIG. 7  illustrates an image with histogram equalization processing.  FIG. 8  illustrates Multi-scale RETINEX processing; and  FIG. 9  illustrates the Adapted RETINEX Processing algorithm. Referring to  FIG. 4  and  FIG. 5 , at an operation Start  402 , an image processing method is implemented in a computer readable and executable program on a computer processor, correcting perceptual quality of an image by adjusting parameterizations of color intensity and hue of the image, using an Adapted RETINEX Processing (ARP) algorithm. The method comprises correcting, by the computer processor, perceptual quality of the image by adjusting pixels in multiple independent directions in color space by performing various computer implemented operations (see  FIG. 4  and  FIG. 5 ) to correct perceptual quality of the image by correcting images which are too light and correcting images which are too dark, simultaneously; by further performing pre-processing  404  operations and performing post-processing  408  operations by the computer processor to correct perceptual quality of the image, where further operations performed by the computer processor include operations of: using statistical algorithms (see  FIG. 4 , element  406 ) to estimate proper location of a centering point of the image, where the centering point is a “mathematically-critical” point (i.e., having a min, max, deflection and/or ends) in a color-intensity distribution in multiple independent directions in color space. The operations also include estimating proper location of a set of multiple centers, and executing by the computer processor the ARP algorithm in both directions for a set of pixels needing adjustment to be perceived. Essentially, the system runs the Adapted RETINEX Processing algorithm in both directions for the set of pixels which are deemed to require adjustment in order to be properly perceived by the human who will view these images. Thus, determining forward and reverse directions refers to correcting color values of pixels (where color is considered in terms of hue and/or intensity) by determining a logarithmic ratio for the amount of correction desired. Associated with determining forward and reverse directions is determining a weighted scaling and a direction for scaling and conducting smoothing operations, converting an output color or space, restoring color and outputting a corrected image. So, when an image is dark a logarithmic ratio is determined to correct the color values of pixels; and when an image is light, another logarithmic ratio is determined which is reverse of the logarithmic ratio determined for the dark image.
 
         [0056]    The method further includes executing the ARP algorithm using an internal color space approximating human perceptual experience of color. 
         [0057]    The pre-processing  404  operations include inputting image data, determining a set of one or more centers, and padding images, where the set of one or more centers is placed to increase contrast and maintain esthetic quality in images. 
         [0058]    Again referring to  FIG. 4 , the Adapted RETINEX Processing algorithm  406  further includes performing operations from a group of operations consisting of executing either Fourier Transforms, or directly executing convolution operations, or executing wavelet transforms, or executing integration operations, or executing averaging operations, performed at each pixel to measure a context of each pixel. 
         [0059]    The method includes performing post-processing  408  operations which scale outputs, smooth images, provide color restoration and outputting images, where smoothing removes noise, based on a standard flood-fill algorithm and an edge detection algorithm. Any edge detection algorithm can be used., such as CANNY, SOBEL, MARR-HILDRETH, and any other edge detection algorithm. 
         [0060]    Referring to  FIG. 4 ,  FIG. 5 , and  FIG. 10 , an image processing method and system, are disclosed which include a computer readable and executable program on a computer processor, determining correcting perceptual quality of an image by adjusting parameterizations of color intensity and hue of the image, using an Adapted RETINEX Processing (ARP) algorithm. 
         [0061]    The system includes at least, a computer processor having a display, an input device and an output device, a network interface communicatively coupling the computer processor to a network; and a memory having a dynamic repository, an algorithm unit and a program unit containing a computer readable and computer executable program code  406 . 
         [0062]    In addition, the system includes a memory controller communicatively coupling the computer processor with contents of the dynamic repository, the algorithm unit and the computer readable and computer executable program  406  residing in the program unit and/or memory, and when executed by the computer processor, the computer readable and computer executable program  406  causes the computer processor to perform the operations of: 
         [0063]    referring to  FIG. 4 , element  404  and  FIG. 5 , element  504 , inputting image data, where image data includes any image format, including YIQ, RGB, HSV and standard color data; 
         [0064]    again referring to  FIG. 4 , element  404 ,  406  and  FIG. 5 , element  504 , computing Fourier Transform of an image and computing convolution of the image in order to compute a blur of the image, where computing the blur of the image, using the ARP algorithm includes performing operations from a group of operations consisting of either executing Fourier Transforms, and/or executing convolution operations, and/or executing wavelet transforms, and/or executing integration operations, and/or executing averaging operations, performed at each pixel to measure a context of each pixel; 
         [0065]    referring to  FIG. 5 , element  406 , where element  406  is the Adapted RETINEX Processing algorithm and/or program element containing at least the algorithmic expression for indexing the areas on the image as centers, as characterized by formula (3) as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         AR 
                         i 
                       
                        
                       
                         ( 
                         
                           x 
                           , 
                           y 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         ∑ 
                         
                           k 
                           = 
                           1 
                         
                         K 
                       
                        
                       
                         
                           ∑ 
                           
                             n 
                             = 
                             1 
                           
                           N 
                         
                          
                         
                           
                             W 
                             k 
                           
                            
                           
                             R 
                             n 
                           
                            
                           
                             sgn 
                              
                             
                               ( 
                               
                                 
                                   
                                     I 
                                     i 
                                   
                                    
                                   
                                     ( 
                                     
                                       x 
                                       , 
                                       y 
                                     
                                     ) 
                                   
                                 
                                 - 
                                 
                                   
                                     
                                       F 
                                       k 
                                     
                                      
                                     
                                       ( 
                                       
                                         x 
                                         , 
                                         y 
                                       
                                       ) 
                                     
                                   
                                   * 
                                   
                                     
                                       I 
                                       i 
                                     
                                      
                                     
                                       ( 
                                       
                                         x 
                                         , 
                                         y 
                                       
                                       ) 
                                     
                                   
                                 
                               
                               ) 
                             
                           
                            
                           
                             ln 
                              
                             
                               ( 
                               
                                 1 
                                 + 
                                 
                                   
                                      
                                     
                                       
                                         
                                           
                                             F 
                                             k 
                                           
                                            
                                           
                                             ( 
                                             
                                               x 
                                               , 
                                               y 
                                             
                                             ) 
                                           
                                         
                                         * 
                                         
                                           
                                             I 
                                             i 
                                           
                                            
                                           
                                             ( 
                                             
                                               x 
                                               , 
                                               y 
                                             
                                             ) 
                                           
                                         
                                       
                                       - 
                                       
                                         
                                           I 
                                           i 
                                         
                                          
                                         
                                           ( 
                                           
                                             x 
                                             , 
                                             y 
                                           
                                           ) 
                                         
                                       
                                     
                                      
                                   
                                   
                                     
                                       D 
                                       + 
                                       
                                          
                                         
                                           
                                             
                                               I 
                                               i 
                                             
                                              
                                             
                                               ( 
                                               
                                                 x 
                                                 , 
                                                 y 
                                               
                                               ) 
                                             
                                           
                                           - 
                                           
                                             C 
                                             n 
                                           
                                         
                                          
                                       
                                     
                                     b 
                                   
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where C n  represents a set of one or more centers. 
         [0066]    determining simultaneously, by the computer processor, when the image is light, and when the image is dark; and 
         [0067]    simultaneously correcting, by the computer processor, when the image is light and when the image is dark, where correcting includes sub-operations of: 
         [0068]    referring to  FIG. 5 , when the image is light, determining a reverse logarithmic ratio  508 , determining a reverse weighted scaling  510 , conducting smoothing  516  operations, converting an output color or space  520 , restoring color  522  and outputting  526  a corrected image  524 , and 
         [0069]    again referring to  FIG. 5 , when the image is dark, determining a logarithmic ratio  512 , determining a weighted scaling  514 , conducting smoothing operations  516 , determining if color restoration is applicable  518 , and 
         [0070]    when color restoration is applicable, determining color parameters  520 , and determining noise reduction, histogram scaling, image smoothing  524 , and 
         [0071]    outputting  526  the corrected image. 
         [0072]      FIG. 10  illustrates an exemplary computer readable and computer executable medium (computer usable medium  1302 ) containing a computer program product  1300  including the Adapted RETINEX Processing algorithm and/or program logic of a method  406  executed on an image processing system determining and correcting perceptual quality of an image by adjusting parameterizations of color intensity and hue of an image. 
         [0073]    In conclusion, reverse RETINEX as disclosed herein, is more effective at enhancing lighter images than standard RETINEX. Further, the Adapted RETINEX Processing algorithm, as disclosed herein, is more effective at enhancing images with multiple areas too dark and/or multiple areas too light, as compared to standard RETINEX or Multi-scale RETINEX (see  FIG. 3  for an exemplary illustration of the results of determining multiple centering points and completing both light and dark corrections at once). The ARP algorithm can e effectively be used in night vision applications, as well as commercial and/or transportations applications. 
         [0074]    While the exemplary embodiments have been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that the preferred embodiments including any first, second and/or third exemplary embodiments have been presented by way of example only, and not limitation; furthermore, various changes in form and details can be made therein without departing from the spirit and scope of the disclosed invention. Thus, the breadth and scope of the present exemplary embodiments should not be limited by any one or more of the above described preferred exemplary embodiment(s), but should be defined only in accordance with the following claims and their equivalents. All references cited herein, including issued U.S. patent, or any other references are each entirely incorporated by reference herein, including all data, tables, figures, and text presented in the cited references. Also, it is to be understood that the phraseology or terminology herein is for the purpose of description and not of limitation, such that the terminology or phraseology of the present specification is to be interpreted by the skilled artisan in light of the teachings and guidance presented herein, in combination with the knowledge of one of ordinary skill in the art. 
         [0075]    The foregoing description of the specific embodiments will so fully reveal the general nature of the invention that others can, by applying knowledge within the art, readily modify and/or adapt for various applications such specific embodiments, without undue experimentation, without departing from the general concept of the present invention. Therefore, such adaptations and modifications are intended to be within the meaning and range of equivalents of the disclosed embodiments claimed herein and below, based on the teaching and guidance presented herein and the claims which follow: