Edge Adaptive interpolation algorithm for image processing

Source: Internet
Author: User

Introduction of 1 Edge adaptive interpolation algorithm

In the Bayer CFA, because the number of green pixels is twice times the number of red and blue pixels, it contains more edge information for the original image. As a result, Adams and Hamilton proposed an adaptive edge interpolation algorithm in the 1997 based on this idea.

Edge Adaptive interpolation algorithm: firstly, the green component is reconstructed from horizontal and vertical two directions, the edge detection operator is designed by the gradient of luminance signal and the second order differential of Chroma signal, and the interpolation of green component is indicated along the correct direction by the edge detection operator. The reconstruction of the red and blue components uses the green components that have been reconstructed, using the linear interpolation of the red-green difference space or the blue color difference space. The common Bayer domain r/g/b distribution model is as follows, and subsequent interpolation algorithms are used:

2 Edge Adaptive interpolation algorithm steps

The specific implementation steps of the Edge adaptive interpolation algorithm are as follows:

(1) Green- color component reconstruction

First, the green component at the red and blue sampling points is restored, i.e. the green component at the center of the sample in figure A and B, and the green component reconstruction process is similar to figure A, so take figure A as an example. the horizontal and vertical direction detection operators at center Red Sampling Point R (i,j) are calculated as follows:

When the horizontal operator is smaller than the vertical operator, the probability of the horizontal edge of the center point R (I,J) is greater, and the Central green component is calculated in the horizontal direction, the formula is as follows:

when the horizontal operator is greater than the vertical operator, the probability of the vertical edge of the center point R (I,J) is greater, and the Central green component is calculated in the vertical direction, the formula is as follows:

If the horizontal and vertical operators are equal, the green component at the center point is calculated as a horizontal and vertical square mean, with the following formula:

(2) reconstruction of red and blue components at Green sampling point

The process of rebuilding the blue and red components of Figure D is similar to Figure C, so take figure C as an example. The reconstruction of the blue component at the center point uses the linear interpolation of the left and right two points of the b-g space, and the reconstruction of the red component uses the linear interpolation of the r-g space up and down two points, as follows:

(3) reconstruction of the Blue (red) component at the Red (blue) sampling point
Finally, a center point of the restoration of the blue and the center of the figure B, the restoration of red, because the reconstruction of Figure B is similar to figure A, so take figure A as an example. observe the nearest blue pixel around R, at the top left of the R Pixel Point, lower left, upper right, and bottom right four positions. In order to better choose the interpolation direction, save the edge information, similar to the restoration of green components, we need to calculate the gradient of the pixel in the direction of two oblique 45 degrees, and then interpolate in the direction of the smaller gradient.

The gradient at lower left and upper right is calculated as follows:

According to the results of the gradient comparison, the appropriate interpolation line of defense is selected and calculated as follows:

3 Edge Adaptive interpolation algorithm source code

Slightly

The advantages and disadvantages of 4 edge adaptive interpolation algorithm

Adams and Hamilton proposed the edge of adaptive algorithm compared to the previous method has a great improvement, mainly reflected in the following aspects:

(1) The interpolation of green components introduces edge detection, better preserving edge information, using the second-order differential of luminance gradient and chroma, good detection of edges, improved the accuracy of green components;
(2) using the correlation between the color space, first to restore the green channel, to obtain a complete green image, red and blue channel restoration is based on red and green color difference space, blue and green color difference space directional interpolation is completed;
Compared with the previous interpolation algorithm, there is a certain defect type:
(1) The edge detection operator in the edge close or fine texture of the region detection accuracy is poor, resulting in the wrong green interpolation, and then spread to the red and blue interpolation, and in the final output image of the wrong color;

5 Common interpolation problems

The interpolation reconstruction process of the mosaic algorithm inevitably introduces a variety of artificial interpolation and interpolation errors, resulting in inconsistent with the original image of the distortion phenomenon, resulting in the restoration of the image of the subjective visual quality of the decline, the mosaic interpolation will appear mainly problems including sawtooth effect, pseudo-color and moire of the question questions.

Sawtooth Effect is also known as the Zipper Effect: refers to the edge of the image or the color mutation area, the interpolation of the mosaic is not in the direction of the edge, and along the direction of the cross-border interpolation caused by the pixel blur and color overflow phenomenon, for bilinear interpolation this phenomenon is particularly obvious;

pseudo-color is also known as false color, refers to the original image does not appear in the wrong color or color stripe phenomenon. The reason is that the image coincident dislocation or inappropriate neighborhood interpolation is caused by the average, often appear at the outer edge of the color.

Mole pattern refers to the high-frequency region of the image, by observing the Bayer CFA, in each row, each column, adjacent green, adjacent red, adjacent blue pixel spacing is 2 pixel width, if the dimension of the object to be reconstructed is only 1 pixel width, Due to the sub-sampling characteristics of the Bayer CFA, the de-mosaic algorithm can easily recover the wrong color, resulting in fine moire. to reduce the occurrence of moiré, most digital cameras will add a low-pass filter before the color filter array , filtering out some of the high-frequency signals and reducing the probability of moire by reducing the sharpness of the image .

Edge Adaptive interpolation algorithm for image processing

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.