1
PrefaceAs one of the core modules of the camera mobile phone, the adjustment of the camera sensor effect involves many parameters, if you have a deep understanding of the basic Optical Principle and sensor software/hardware on the image processing principle, we will get twice the result with half the effort. Otherwise, the lack of theoretical guidance can only be met by feeling and experience, often unable to accurately grasp the key to the problem, cannot master the core technology of sensor debugging, and cannot fundamentally solve the problem. Therefore, I try to analyze some factors related to Sensor Image Processing Based on some image processing principles I learned out of my passion for photography, I would like to share with you some of my understandings, discuss them together, and learn and make progress together.
2
Color Sensing and correction 2.1
PrincipleThe human eye's color recognition is based on the human eye's three different sensing units for light. Different sensing units have different response curves for different bands of light, color perception is achieved through the synthesis of the brain. In general, we can use the RGB three-color concept to understand the color decomposition and synthesis. Theoretically, if the response of human eyes and sensor to the color light of the spectrum is as follows, the response to the three colors of light will not affect each other, there is no so-called crossover effect. However, the actual situation is not so ideal, indicating the spectral response of the three-color sensor system of the human eye. It can be seen that the responses of RGB are not completely independent. It indicates the spectral response of a Kodak camera. It can be seen that the response curve is quite different from that of the human eye.
2.2
Color Sensing correction for SensorNow that we have seen the sensor's response to the spectrum, there is usually a deviation between the RGB component and the human eye's response to the spectrum. Of course, we need to correct it. In addition to the cross effect, the response strength of each color component also needs to be corrected. Generally, a color correction matrix is used to correct the color.
1
The color correction operation is usually completed by the sensor module integration or the backend isp. The software gets the correct correction result by modifying the relevant registers. It is worth noting that the conversion of RGB> YUV is also achieved through a 3*3 transformation matrix, so sometimes these two matrices are merged during ISP processing, and the color correction and color space conversion are completed through a matrix operation.
3
Color Space 3.1
CategoryIn fact, the color description is very complex. For example, the RGB three-base color and optical system cannot cover all possible colors. for a variety of color expressions, as well as the needs of color conversion and software and hardware applications, there are various color models and expressions of color spaces. These color models can be divided into different categories based on different criteria. For sensor, we often see the concept of color space, mainly RGB and YUV (in fact, these two systems contain many different color Expressions and models, such as sRGB, Adobe RGB, yuv422, yuv420 ...), RGB, as previously described, describes the color based on the principle of the three-color plus optical system, while YUV describes the color based on the brightness and chromatic aberration principle.
3.1.1
Conversion of RGB <-> YUVThere is a standard conversion formula for color space conversion, because YUV is largely related to hardware, so the conversion formulas of RGB and YUV usually have multiple versions, slightly different. The common formula is as follows: Y = 0.30r + 0.59G + 0.11b
U = 0.493 (B-Y) =
-0.15r-0.29g + 0.44b
V = 0.877 (R-Y) = 0.62r-0.52g-0.10b but the obtained YUV value has negative values and the upper and lower limit of the value range is not 255, which is not conducive to computer processing, therefore, different types of deformation formulas are usually used in software processing based on different understandings and requirements. We can also find that some sensor can set the output value range of YUV. This is the reason.
From the formula, we need to understand that UV signals are actually blue and red signals, in fact, it indirectly represents the intensity of blue and red to some extent. Understanding this will be of great help to us in understanding the color transformation process.
Reprinted connection address: http://blog.csdn.net/colorant/