BACKGROUND 
     This application relates to image processing in digital camera, video, and other electronic digital image acquisition and/or display devices, and particularly to techniques of increasing the contrast of local image highlight details for such images. 
     Details in bright areas of a digital image, although they are often present in the acquired digital image data, may be hard to perceive, due to sensor non-linearities and limited system dynamic range. Consequently, such images could benefit from techniques of increasing the contrast of local image highlight details, while preserving the appearance of the overall image. This process is called Highlight Recovery (HR). 
     Optical sensors used in digital photography, video, and other imaging systems typically suffer from non-linear responses when rendering image regions under very bright, or very dim, lighting conditions. A unit increase of light intensity does not typically yield a unit increase in signal output from the sensor, particularly at the extreme ends of the sensor&#39;s operating range. In digital cameras, this problem is usually remedied at the dark end of the sensor&#39;s range by use of “digital lighting” algorithms, typified by Retinex-type approaches, that can enhance contrast in shadowy regions of the image. Although the problem of highlight information loss in bright areas can be addressed by the tailoring of such prior art techniques for this purpose, a search of prior art techniques indicates that a simple and straight forward approach to the recovery of highlight information in digital images, has yet to be specifically disclosed. 
     Prior art typically assumes that special methods and apparatuses need to be contained within any dynamic range compensation technique that aims to support both lighting and HR. HR is usually not seen in today&#39;s digital image enhancement applications, or consumer cameras, that provide a digital lighting feature. Therefore, there is substantial room for improvements in digital imaging systems by the inclusion of, or improvements in, highlight recovery. 
     SUMMARY 
     The described methods and corresponding apparatus are for use in highlight recovery in a set of image data. The image data is inverted, treated by a digital lighting process, and then subsequently inverted once again. This allows the set of image data to be treated for dynamic range compression of detail in both the dark regions and the light regions by the same algorithm. In other words, the process applied to the dark regions can be performed by a correction algorithm and the process applied to the light regions can be performed by the same algorithm, but with the image data negated before and after the correction algorithm is applied. 
     Various aspects, advantages, features and embodiments of the present invention are included in the following description of exemplary examples thereof, which description should be taken in conjunction with the accompanying drawings. All patents, patent applications, articles, other publications, documents and things referenced herein are hereby incorporated herein by this reference in their entirety for all purposes. To the extent of any inconsistency or conflict in the definition or use of terms between any of the incorporated publications, documents or things and the present application, those of the present application shall prevail. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  a block diagram of a basic structure of highlight recovery based on digital lighting module. 
     
    
    
     DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS 
     Digital lighting techniques, which use a local method (e.g., Retinex) to lighten digital images, aim to increase the local contrast in shadow regions of an image. In order to achieve the desired results, preferred embodiments described here use a technique that inverts the image, so it is now a negative, and applies it as an input of the existing digital lighting module. This causes the module to additionally be able to increase local contrast in highlight regions of the image. Inverting the output of the digital lighting module results in an image with the contrast of image highlights increased. 
     Optical sensors used in digital photography, video, and other imaging systems typically suffer from non-linear responses when rendering image regions under very bright, or very dim, lighting conditions. As the behavior of image sensors at the black end differs from the behavior at the white end, the details of the dynamic range compression of the image that results in very bright areas is different than in the very dim areas. Consequently, based on the difference in sensor behaviors in the two regions, as well as due to perceptual and physical differences, the prior art has considered that any imaging system that tries to correct at both ends of the intensity scale would require one correction algorithm for the highlight tone scale and another for the shadow tone scale. Nonetheless, the inventor has found that algorithms developed for one end of the intensity scale, such as those employed in a digital lighting module, can be successfully applied to compensate for image dynamic range compression at the other end, such as for highlight recovery, by applying image inversion before and after applying the algorithm developed for the first end of the intensity scale. Consequently, the same algorithm can correct both the shadow tone scale and the highlight tone scale just by using it between a pair of image negations for one of them. 
     As it has generally been found that loss of detail is more noticeable in the dark regions, imaging systems often will correct for dynamic range compression just in the dark regions. According the techniques presented here, a digital lighting module (an existing algorithm intended to improve contrast in shadow regions) can also be used as a highlight recovery module (an algorithm intended to enhance detail in bright regions), by using image inversion to enable highlight recovery with any of the low-level contrast enhancement algorithms. 
     The methods given here allow suppliers of cameras or other imaging systems, that have already incorporated digital lighting techniques into their systems, and are desirous of adding a new highlight recovery feature, to easily do so. This will be the case for current products, as well as future generations of current products when their suppliers prefer to continue to use their lighting technique over, or in addition to, alternate approaches. An example of an alternate approach, which may be used in a complementary manner, is disclosed in the U.S. patent application entitled “Dynamic Range Compensation by Filter Cascade” by Itsik Dvir filed concurrently with the present application. The methods presented here may further be applied to off-line image processing applications, such as Nikon&#39;s “Capture Editor”, Google&#39;s “Picasa”, and similar products as well. Also, it should be noted that in addition to the use of a digital lighting technique for highlight recovery, in a sort of converse technique, systems which include a highlight recovery process (such as that of the U.S. patent application entitled “Dynamic Range Compensation by Filter Cascade” cited above) could apply this to digital lighting techniques through a similar before and after image negation. 
     A block diagram for the generation of a HR image, by the use of technology presented here and a digital lighting technique, is shown in  FIG. 1 . An input color image (e.g. RGB, YUV) is first inverted to create a negative image at block  121 . Then, the negative image is applied to a digital lighting module  123 , which performs tone mapping. Finally, the image after tone-mapping is inverted at  125  to produce the HR image. In general, any type of digital lighting module may be used at block  123 , as long as it aims to increase the local contrast in shadow regions. 
     Note that applying the same input data directly to the digital lighting module  123  without the inverters would be a standard method for improving the darker portions of the image. (Alternately, where element  123  a highlight recovery module, it would instead be the dark regions that would go though  121  and  125 .) When both highlight recovery and digital lighting are being performed on a set of image data, they may be done serially, in either order, or concurrently. The results of the two processes or channels could then be blended together, such as by adding with weighting factors, to provide the new image. For example, the image processing system could determine which portions of the image require correction for dynamic range compression of the image data and send them off to lighting or highlight recovery as appropriate, perform both processes concurrently, and add the corrected portions back to the image. It will be understood that the various modules shown in Figure can implemented in software, hardware, firmware, or a combination of these. 
     Various digital lighting techniques have been suggested in the literature since the first Retinex method was presented by Land 40 years ago. The U.S. patent application entitled “Dynamic Range Compensation by Filter Cascade” referred to above can also be referred to for additional discussion of these. Among the digital lighting techniques to which the presented methods here are appliacble are PC-based applications as well as embedded applications, examples of which include Nikon D-Lighting, DxO-lighting, Adobe Photoshop, HP advanced lighting technique (ALT), Picasa, and Zoran EzL. The techniques are usable both in real-time and in post-processing applications. 
     The methods and apparatus described here may be applied to any of the various image representations. For example, the data input at the inverter block  121  can be the RGB, YUV, YCbRr, or other image formats, as well as hue, saturation and value (HSV) and “Lab” (i.e., CIELAB, strictly CIE 1976 L*a*b*, or Hunter Lab, strictly, Hunter L, a, b), with pertinent definition for inverse color operation. Raw data, such as from a Bayer grid, can also be used. 
     In the case of an RGB image with components (R,G,B), inversion can be defined as:
 
( R′, G′, B′ )=((2 n − R ), (2 n − G ), (2 n − B )),
 
where n is the number of bits of quantization. For a YUV image with components (Y,U,V) the negative image is defined as,
 
( Y′, U′, V′ )=((2 n − Y ), (− U ), (− V )),
 
The inverse operation in digital camera may be done either by an aritmetic (negate) operation or by use of an n-bit look-up table (LUT). In the later case, the LUT is loaded with a negative slope line. For example, for 8 bits of quantization, the look-up table would map R, G, B, or Y component inputs from zero to 255, to R′, G′, B′, or Y′ component outputs from 255 to zero, thus mapping the bright areas of the image to the low level region of the color space.
 
     Thus, although it has been previously assumed that methods and apparatus for highlight recovery need to be specially developed and be embedded within any dynamic range compensation technique that aims to support both lighting and HR, the present concept is a simple and effective method for HR for those imaging systems which already have digital lighting method and apparatus. The present techniques are applicable to digital camera and video, for both capture and playback, as well as for other imaging systems and printers. As digital lighting technology advances, so will the quality of the results obtained from the application of the present approach. 
     Although the various aspects of the present invention have been described with respect to exemplary embodiments thereof, it will be understood that the present invention is entitled to protection within the full scope of the appended claims.
The described methods and corresponding apparatus are for use in highlight recovery in a set of image data. The image data is inverted, treated by a digital lighting process, the subsequently inverted again. This allows the set of data image to be treated for dynamic range compression of detail in both the dark regions and the light regions by the same algorithm. In other words, the process applied to the dark regions can be performed by a correction algorithm and the process applied to the light regions performed by the same algorithm, but with the image data negated before and after the correction algorithm is applied.