What Is Color Constancy?
Color constancy refers to the consciousness characteristic that people's perception of the color of the surface of the object remains unchanged when the color light illuminating the surface of the object changes.
- Color constancy is a kind of perceptual constancy. When the color of an object changes due to changes in lighting conditions, the individual's color perception of familiar objects still tends to be consistent in perceptual characteristics.
- Color constancy is also called "hue constancy". A type of constancy of perception. When individuals perceive familiar objects, the actual color changes due to changes in lighting and other conditions, color perception tends to maintain relatively stable characteristics. For example, black charcoal is always perceived as black in the dark or in the sun. The red flag, whether under yellow light or blue light, is always perceived as red.
- For example, when we illuminate the blue color wheel with less saturated yellow light, we are not seeing gray, but a less saturated blue. Similarly, when we illuminate a white object surface with red, what we see is not red, but white under red light. Just as the color of the interior furniture remains relatively unchanged under different lights, this is the constancy of color. [1]
- Human beings have a psychological tendency that does not change the color judgment of a particular object due to light sources or external environmental factors. This tendency is the color constancy. Due to changes in the environment (especially the lighting environment) of a particular object, the reflection spectrum of the surface of the object will be different. The human visual recognition system can recognize this change, and can determine that the change is caused by the change of the lighting environment. When the light change changes within a certain range, the human recognition mechanism will think that the change should be within this change range. The color of the object surface is constant.
- The constancy of color perception is closely related to people's life experience. A person who has never seen a red flag due to an eye disease, sees the red flag for the first time in the light after healing, and may determine that it is red. But if he first saw the red flag in the dark, he might not be able to perceive it as red. Therefore, color constancy refers to people's perception of the color of an object, which is related to human knowledge and experience, psychological tendencies, and does not refer to the constant color of the object itself.
Color constancy background
- Computers often help humans perceive the world, as they do in the branch of color constancy. Vision, pattern recognition, image processing and other disciplines are often involved in the calculation of color constancy.
Color constancy principle
- Based on the Beer-Lambert law, an image formed by two different kinds of light can be transformed by a diagonal matrix (VonKries model is also a diagonal model). Therefore, we only need to find the light in the original image to convert the original image into a picture under standard white light (R = G = B = 1) via a diagonal matrix. The conversion formula is as follows: where is the result image, is the input image, and is the 3x3 diagonal matrix required for the conversion of the input image to the result image. The ratio of image lighting.
- Through the above formula, the problem of exploring the color constancy of the image is transformed into the problem of finding the illumination value of the input image. However, this is a problem that cannot be solved properly, because only with an input image without any source, the lighting information cannot be accurately calibrated, and the lighting value can only be estimated by the assumption of the external environment.
Color constancy method
- Max-RGB algorithm: Based on the assumption that the maximum response of the RGB channels in the image is caused by a white patch. In actual calculation, the three RGB channels are calculated separately, and the maximum corresponding values of each channel (the maximum pixel value is obtained) are obtained as the incident illumination. But this algorithm only takes one isolated point value, so the estimation of illumination is too limited. [2]
- Greyworld algorithm: Based on the assumption that the average reflection of all physical surfaces in the scene is colorless. In the actual calculation, the three-channel value of the light takes the average value in the image. Compared with the MAX algorithm, the Greyworld algorithm has stronger adaptability, but its adaptability is obviously insufficient when the color of objects in the scene is too single.
- GreyEdge algorithm: With the in-depth study of color constancy, some researchers have found that the derivative of the color shows an elliptical shape in the three-dimensional space distribution, and the direction of light is consistent with the direction of the ellipse. Based on this finding, the hypothesis established in the color derivative space is proposed: the difference of the average reflection of all physical surfaces in the scene is color-free. The light color of the image is obtained by calculating the average color derivative of the input image.
Color constancy image processing results
- Before processing: