Abstract:
A method of enhancing an image, comprising providing an image having luminescence and at least one boundary, determining locations each of the at least one boundary in the image, computing an image enhancement technique having a gain for application to the image, and adjusting the gain of the image enhancement based on the luminescence values of the image near the boundary locations.

Description:
BACKGROUND 
       [0001]    1. Field 
         [0002]    The invention relates to image processing and, particularly to the removal of undesirable image effects. 
         [0003]    2. Discussion of Related Technology 
         [0004]    When processing of images involves applying one of several convolution-based image processing routines affecting the brightness or contrast of an image, there may be present a halo effect at the boundaries of objects in the resulting images. As is well-known in the art, a halo effect at an object boundary is the result of irregularly heightened brightness or large luminescence change in a region on either side of the boundary. Some well-known implementations of image enhancement, such as retinex processing, create this condition. Although the halo effect can be desirable in some images, generally the image quality can be considered degraded by this distortion, resulting in a less appealing image where visual accuracy is desired. 
         [0005]    Accordingly, there is a need in the art for a method of image processing that reduces or eliminates the halo effect caused by other image-enhancing techniques. 
       SUMMARY 
       [0006]    One aspect of the invention is a method of enhancing an image, comprising providing an image having luminescence and at least one boundary; determining locations of the at least one boundary in the image; providing an image enhancement technique having a adjustable gain for application to the image; and adjusting the gain of the image enhancement based on the luminescence values of the image near the boundary locations. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0007]      FIG. 1  is a block diagram illustrating an embodiment of a system for implementing improved image enhancement. 
           [0008]      FIGS. 2A and 2B  schematically illustrate a region of an image affected by convolution-based image enhancement. 
           [0009]      FIG. 3A  schematically illustrates an image boundary exhibiting a halo effect. 
           [0010]      FIG. 3B  schematically illustrates a representation of the image characteristics of the boundary of  FIG. 3A . 
           [0011]      FIG. 3C  schematically illustrates the representation of  FIG. 2B  after improvement. 
       
    
    
     DETAILED DESCRIPTION OF EMBODIMENTS 
       [0012]      FIG. 1  is a block diagram illustrating an embodiment of an image enhancement system  10 . The image enhancement system  10  can have an image input component  12 . An enhancement component  16  can perform several types of enhancement, preferably including convolution-type enhancement. Other types of enhancement can be performed by the enhancement component  16  including, without limitation, image sharpening and noise-reduction. The system can further comprise a variance calculator  14 , described in greater detail below. A mixer component  18  can receive the original image from the image input  12  as well as input from the enhancement component  16  and the variance calculator  14 . The mixer component  18  combines the input from disparate sources to create an output image  20 . Other components can be added to the system, including those that prepare the image to be input at the image input  12 , or are its source. The mixer component  18  can also receive input from other sources as well. 
         [0013]    With reference to  FIG. 2A , a sample of convolution-type image processing is displayed. An interaction region  50 A being altered by a method of image processing is displayed. A pixel block  52 A can be the focus of processing. The pixel block  52 A can be a single pixel, or any group or collection of pixels into which an image is discretely divided for processing. Some image-processing methods apply a routine or algorithm iteratively over the entire image or a subsection thereof to achieve the desired effect. Thus, certain regions of an image can be selected for processing. As shown, the illustrated region  50 A has a pixel block  52 A currently undergoing processing. Some processing algorithms that employ convolution can evaluate an evaluation region  54 A containing surrounding pixel blocks  58 ,  60  within a perimeter  56 A while processing. In the illustrated embodiment, while processing a pixel block  52 A, eight neighboring pixel blocks  58 ,  60  are evaluated, though fewer or more can be evaluated. In some embodiments, the algorithm can evaluate pixel blocks in an irregular geometric shape, instead of the square perimeter  56 A illustrated. 
         [0014]    While processing an image, an enhancing method can focus on a pixel block  52 A near a boundary B. As a perimeter  56 A can include pixel blocks  58 ,  60  on all sides of the pixel block  52 A being processed, some blocks  60  can have image information representative of a first portion a of the image, while other blocks  58  on the other side of the boundary B can have image information consistent with the second portion b of the image across the boundary B. Thus, the image information from the blocks in the first portion a and the second portion b can be widely disparate if the boundary B is between extremely different image regions. Accordingly, when the pixel block  52 A is located such that the evaluation region  54 A encompasses portions of both a and b, some undesirable skewing can be imparted to the pixel block  52 A by the disparate image information. Where the first portion a has a light color and the second portion b has a dark color, the application of a convolution-based enhancing method, including, without limitation, retinex image processing, high-pass filters, and low-pass filters, can result in an undesirable increased luminescence in the pixel block  52 A, in excess of that present in either the first or second portions a, b. 
         [0015]    With reference to  FIG. 2B , similar features are designated with the same component numbers as in  FIG. 2A , except that a “B” has been substituted. Similar to  FIG. 2A , where the pixel block  52 B is located in the second portion b, but sufficiently near the boundary B, the perimeter  56 B can contain an evaluation region  54 B including image information from both the first and second portions a, b. When such a region  50 B is processed by some image-enhancing methods with lighter and darker portions a, b as described with reference to  FIG. 2A , the luminescence value of the pixel block  52 B can be abnormally low, lower than that of any portion of the region  50 B. Accordingly, the increased luminescence resulting from pixel blocks across the boundary B, such as  52 A, prominently appears, resulting in a bright region having approximately the shape of the boundary B. This is one embodiment of the halo effect. 
         [0016]    With reference to  FIGS. 3A-3C , a boundary portion  130 A after processing is illustrated. As shown in  FIG. 3A , in some embodiments, the boundary  132 A can divide an image into a first and second portions a, b, where a is a lighter portion of the image, and b is a darker portion of the image. After processing, such as that described above, a halo effect can appear as a brightened region  138 A extending out to a brightened edge  134 A. Similarly, a halo effect can appear as a darkened region  140 A extending into the darker portion b to a darkened edge  136 A can result. 
         [0017]      FIG. 3B  schematically illustrates a representation of the boundary portion  130 B of  FIG. 3A , except that luminescence values near the boundary  132 B are illustrated. As can be seen, lighter portion a can have a higher luminescence value than the darker portion b. The drop in luminescence associated with the boundary  132 B is also represented. The dashed line shows a post-processing graphical representation of value of luminescence  142 B, beginning high in the first portion a and increasing at the brightened edge  134 B to produce the brightened region  138 B. The value of luminescence  142 B then drops at the boundary  132 B and continue to descend to create the darkened region  140 A, extending to the darkened edge  136 B before more closely conforming to the value in the second portion b. 
         [0018]    To correct the halo effect, a variance calculator  14  can be utilized in the system  10 . A large variance in luminescence value can correspond to the boundary B. As is well-known in the art, the variance is the square of the standard deviation, measuring the deviation in luminescence for a pixel block from the local average. Thus, as variance is evaluated, a large change can indicate the presence of a boundary, a typical location for halo effects, as described above. Thus, the variance can be compared to a threshold value, or more than one threshold values. Where boundaries are detected, the gain of the image enhancement process being performed can be adjusted to reduce or eliminate halo effects. Preferably, the gain is adjusted by incremented amounts to reduce the likelihood of sharp differences in image processing. 
         [0019]    In one embodiment, the gain of the image-processing algorithm can be moderated by the formula. 
         [0000]        Y ( x,y )=[1−ƒ(var( x,y )]* X ( x,y )+ƒ(var( x,y ))* X   enh ( x,y ) 
         [0000]    where (x,y) are coordinates indicating a pixel location, Y is the function for determining the gain value for the image-processing algorithm, X is the value of luminescence of the pixel at the coordinates before processing, X enh  is the value of luminescence of the pixel at the coordinates after processing, var(x,y) is the variance of luminescence at the pixel at the coordinates, and ƒ(var(x,y)) is a weighting function with the variance as the input. To determine ƒ(var(x,y)), the variance, σ, is compared against threshold values. There are preferably two threshold values, though more can be used with finer-resolution functions. In one embodiment, threshold values of τ 1  and τ 2  are used. A value for the lower value, τ 1  can be a variance value of 20, though lower values can be used, preferably above 10. A variance value of 40 can be used for τ 2 , though higher values can be used, increasing without limit, though practically preferably lower than 100. When a variance less than τ 1  is detected near the boundary, ƒ(var(x,y)) can be set equal to 1, resulting in normal application of the image-processing method. When the variance is greater than τ 2 , ƒ(var(x,y)) can be set equal to 0, resulting in a luminescence value equal to that of the pixel in the unprocessed image. For values of variance falling between τ 1  and τ 2 , a scaling function can be used. One such function can be: 
         [0000]      ƒ(σ)=(τ 2 −σ)/(τ 2 −τ 1 ) 
         [0000]    which results in a reduced value of ƒ(σ) as the value of σ increases. 
         [0020]    When applied to the boundary  132 A,  132 B shown in  FIGS. 3A and 3B , an improved image can be produced. As shown in  FIG. 3C , the post-processing value of luminescence  142 C can closely follow the values in the first and second portions a, b and track the change associated with the boundary  132 C. The brightened and darkened regions  138 A,  138 B,  140 A,  140 B are reduced or eliminated, resulting in an image with reduced or no halo effects. 
         [0021]    With reference back to  FIG. 1 , the mixer component  18  can receive the input image  12 , the results of image enhancement  14 , and the values determined by the variance calculator  14  to synthesize an output image  20 , wherein the results of the image enhancement component are adjusted by the values from the variance calculator  14 . In some embodiments, other components can contribute information to the mixer to affect the output image  20 . In some embodiments, one threshold value can be used, and the level of the gain can be proportional to the difference between the variance and the threshold value. In such embodiments, the gain can be set to 1 when the variance is below the threshold value, and reduced after exceeding the threshold value by a formula such as: 
         [0000]      ƒ(σ)=1−(σ−τ 1 )/σ k ) 
         [0022]    where k can be any constant used to scale the value of ƒ. 
         [0023]    Similarly, in some embodiments, many threshold values can be used to adjust the gain over a correspondingly fine range. 
         [0024]    In some embodiments, a computer can be employed to perform the calculations necessary to implement the image enhancement and adjustment thereof. In some embodiments, the processing can be performed by components of an integrated circuit. 
         [0025]    The foregoing description sets forth various preferred embodiments and other exemplary but non-limiting embodiments of the inventions disclosed herein. The description gives some details regarding combinations and modes of the disclosed inventions. Other variations, combinations, modifications, modes, and/or applications of the disclosed features and aspects of the embodiments are also within the scope of this disclosure, including those that become apparent to those of skill in the art upon reading this specification. Thus, the scope of the inventions claimed herein should be determined only by a fair reading of the claims that follow.