The Retinex Image Enhancement Algorithm (RetIEnA) is a method of improving the dynamic range compression, color constancy and color rendition for a digital image.
When compared to the direct observation of scenes, color images in general have two major limitations due to scene lighting conditions.
First, the images captured and displayed by photographic and electronic cameras suffer from a comparative loss of detail and color in shadowed zones. This is known as the dynamic range problem.
Second, the images are subject to color distortions when the spectral distribution of the illuminant changes. This is known as the color constancy problem. A commonly encountered instance of the color constancy problem is the spectral difference between daylight and artificial (e.g., tungsten) light which is sufficiently strong to require photographers to shift to some combination of film, filters and processing to compensate for the spectral shift in illumination. Though film photographers can attempt to approximately match film type to spectral changes in lighting conditions, digital cameras must rely strictly on filters. However, these methods of compensation do not provide any dynamic range compression thereby causing detail and color in shadows to be lost or severely attenuated compared to what a human observer would actually see.