Summary of some special effects in image processing

Source: Internet
Author: User

 

Image special effect processing plays a very important role in the image field. These methods can make the image accurately recognized and become a special image.

In the book of Gonzalez, image special effect processing has been extensively discussed, and different images and methods have been used to display various types of image processing, but they are very professional, it also requires some mathematical skills to be able to understand, and is not suitable for general understanding.

In the book "GDI + programming", we have made a lot of descriptions on the special effect processing of images. It also makes image processing easy to understand.

1,The Fade-in and fade-out effect is to change the RGB color component saturation of an image from 0 to 1, and output the image at the same time. When the saturation component is 0, the image is black, when the component saturation increases, the image brightness also increases. This is a slow method, but it is easy to understand.

2,Grayscale: only one type of image, that is, the value after processing the pixel when 0.3, 0.59, and 0.11 are the weights of three RGB pixels. Just forget the definition of grayscale: three values of RGB are equal, which is a grayscale image. Therefore, you can also set the vertex to max (R, G, B) or min (R, G, B ), or set it to (R + G + B)/3. Obviously, there are a variety of methods.

3,Gray scale can also be converted into color. This color is called pseudo color. This is a special pseudo color formed by ing between different pixels and colors by the pixel weight.

 

 

 

 

4,When the negative filter is created, it turns black into white and white into black. The negative filter subtract the original RGB value from 255.

5,The embossed operation calculates the difference between the RGB value of the current pixel and the pixel in the upper-left corner, and sets it to the difference value to avoid using the preset pixel, image processing starts from processing pixels in the lower right corner. The creation of the carving is to add a constant (such as 128) to the difference between the current pixel and the lower right pixel to obtain the carving image, which is similar to the above, the engraving starts from the upper left corner.

6,The oil painting filter replaces the color of the current vertex with any color within a certain range.

7,The wooden filter analyzes the pixel values that are not in the color image. If the color is bright, the color is changed to black, and the color is changed to white. The standard of brightness and non-brightness is whether the average RGB value reaches 255/2 ., Set only the value of the component and set it as the point value as a whole.

8. The glare filter determines the image processing by the center point of the light source and the radius of the light source. For example, the coordinate of pixel A is (x, y), and the intensity center is C (m, n ), the radius of the irradiation surface is R:

Distance (a, c)> r: pixel A is outside the irradiation surface and can be a primary color.

Distance (a, c) = R: pixel A on the edge of the irradiation Surface

Distance (a, c) <R: pixel A in the irradiation Surface

The HALO distribution is the brightest from the center of the light source, and the light intensity degrades as the distance from the center increases. It is OK to add different values to the R, G, and B components based on the distance from the pixel to the center of the light source. ExampleProgramUse R + 220 * (1-distance (a, c)/R) to calculate the red component value. 220 can be regarded as the center brightness of the light source.

Flexible processing: Generally, 3*3 pixel blocks are selected, and the intermediate pixel value is changed to the average pixel value of the nine pixels to achieve softening. Sharpening is the difference between the pixel to be processed and the pixel on the left diagonal line multiplied by a sharpening coefficient. Then, the original pixel value can be added to the sharpen effect, the larger the sharpening coefficient, the more obvious the sharpening effect. The sharpening must start from the pixels in the lower right corner.

 

Http://www.cnblogs.com/ubunoon/

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.