Camera Image Processing Principle Analysis part 3

Source: Internet
Author: User

Color-related special effects

1.1
Grayscale)
A grayscale image converts a color image to a black-and-white image. 1.2
Theory
Theoretically, In the YUV space, the UV component is discarded, and only the Y component is retained, so that black and white images can be obtained. This is also the principle that the color electro-mechanical signal can be compatible with the black and white TV sets. In theory, the color is the same as the Y value (the effect of converting ACDSee to a grayscale image on the right side). In grayscale mode, the color is the same.
In theory, we should change the UV value to a gray value. However, the specific code varies depending on the software algorithm and hardware structure. 1.3
Take a platform as an Example
The core two lines of code are as follows: set_hue_u_gain (0); set_hue_v_gain (0); Set UV gain to 0 here. If UV offset is set to 128, the final UV result will be 128, this is in line with the theory. 1.4
Sepia/sepiagreen/sepiablue
The so-called retro (green, blue) is based on the gray scale, an additional offset is made for the UV value, the grayscale map is converted into a gradient map of a certain color. Theoretically, in order to obtain the blue effect, the blue difference signal should be added to reduce the red difference signal. That is, increase u and decrease v. Take the effect of sepiablue as an example. Here, the byte MSB indicates the symbol bit, so 88 is 88,158-30. Set_hue_u_gain (0); set_hue_v_gain (0); set_hue_u_offset (88); set_hue_v_offset (158 );

 
1.5
Negative
The so-called negative effect is to reverse the color of the image, it looks like the effect of the film. In theory, this is easy to understand and process, that is, in the RGB space, take its complementary color. The specific operation is to subtract RGB from 255 to obtain a new RGB value. This function is usually implemented in the ISP.
2
Summary
After understanding the principle, it is easy to make the effect of the others color transformation. Basically, in terms of color correction and processing, the relevant parameters to be considered include: the upper and lower limits of automatic WB, the target range of Automatic white balance, RGB gain, UV gain, UV offset, color correction. some also have settings related to saturation and hue. In terms of the sensor or ISP hardware processing process, the usual direction is to first perform RGB gain, then color correction, and finally perform YUV space processing. To reduce the interaction between parameters, you can adjust the parameters in this order.

Reprinted link address: http://blog.csdn.net/colorant/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.