Image Amplification Algorithm

Source: Internet
Author: User


First, image amplification algorithm

There are many algorithms for image amplification, and the key is to use what interpolation method is used for unknown pixels. The following we will be specific analysis of several common algorithms, and then from the enlarged image whether there is color distortion, the details of the image is better preserved, the amplification process requires a reasonable allocation of time to compare their merits and demerits.

When a small image magnification, such as magnification 400%, we can first based on the original adjacent 4 pixels of the color value, according to magnification to find the location of the new ABCD pixels and corresponding fill, but there are a large number of pixels between them, such as the P-point color value is not known, Estimates are required.

1, the nearest point interpolation algorithm (Nearest Neighbor)

The closest point interpolation algorithm is the simplest and fastest algorithm, the method is to enlarge the unknown pixel point P, the position is converted to the original image, compared with the original neighboring 4-week pixel a,b,c,d, so that the pixel value of P point is equal to the nearest neighboring pixel value. As in the P-point, because the closest to the D point, so directly take P=d.

This method can lead to significant distortion. A leap in the pixel value at the midpoint of A, B, is the cause of obvious aliasing such as mosaics and jagged edges. The only advantage of the nearest interpolation method is that it is fast.

2. bilinear interpolation algorithm (Bilinear interpolation)

The practice is to enlarge the unknown pixel point p, the location of the conversion to the original image, the calculation of the four pixel point a,b,c,d on the P-point effect (the closer the P-point value, the greater the impact is indicated), as follows.

Its specific algorithm is divided into three steps:

The first step interpolation calculates the effect of the AB two point on P point to get the value of the E point.

The understanding of linear interpolation is that, for the color value of the other pixels between the AB two pixel points, which is determined to be a straight line change, the value at the e point is required, only the point of the corresponding position can be found in the line. In other words, the value of any point between A and B is only related to a, B.

In the second step, the interpolation calculates the effect of the CD two point on the P point to get the value of the F point.

In the third step, the interpolation calculates the effect of the EF two point on the P-point value.

bilinear interpolation algorithm Because the result of interpolation is continuous, so the visual will be better than the nearest point interpolation algorithm, but the operation speed is slightly slower, if the speed, is a good compromise.

3, bicubic interpolation algorithm (bicubic interpolation)

The bicubic interpolation algorithm is similar to the bilinear interpolation algorithm, for the unknown pixel p after amplification, it will extend the influence to the neighboring 16 pixels, according to the influence of P point near and far, interpolation calculation, because the pixel value of P point information from 16 adjacent points, so the more detailed image can be obtained, but the speed is relatively slow.

However, the essential difference between bicubic interpolation algorithm and bilinear interpolation algorithm is not only to enlarge the range of influence points, but also to use advanced interpolation algorithm.

The value of the e-point between A and B two points is required, and the value of the e point is calculated by using the pixel value of the A-1,a,b,b 14 points around A, B and a nonlinear calculation to obtain a smooth curve.

The meaning of the so-called "double" or "two-time" is to extend the above-mentioned operation to two-dimensional space and then calculate the influence of the vertical interpolation on the basis of calculating the influence of transverse interpolation.

The double cubic interpolation algorithm can get relatively clear picture quality, but the computational amount also becomes larger. The algorithm is most commonly used in many image processing softwares, such as Photoshop,after effects,avid,final Cut Pro.

To get better image quality, on the basis of the above, many new algorithms are emerging, and they use a more complex and improved interpolation method. such as the B-spline (B-spline), Mitchell (Mitchell) interpolation algorithm, their purpose is to make the interpolation curve appears smoother, the image edge of the performance more perfect.

4. Adaptive spline interpolation with extremely enhanced technology (S-spline & S-spline XL)

The most significant difference from the classical interpolation method is that S-spline employs an adaptive technique that traditionally relies on the surrounding pixels to find the color value of an unknown point, meaning that the color value to be solved depends only on the location of the pixel in the image, not the actual pixel information of the image. The adaptive spline algorithm also takes into account the actual image pixel information. The experiment shows that the image effect obtained by s-spline algorithm is better than the bicubic interpolation algorithm.

Now S-spline algorithm has appeared enhanced version S-spline XL, the new version of the S-spline XL algorithm more than S-spline, the sharpness of the screen is further enhanced, the contour of the object is more clear, the edge of the sawtooth phenomenon greatly weakened, the image feel more natural.

Second, the image amplification algorithm actual test

Now let's actually test the above interpolation algorithms to see their effects. First open the original image bird.jpg. This is an image with a resolution of 360x270.

We use the Benvista company's famous photozoom Pro 2 software, on the PC computer test, the computer CPU configuration of Inter Core 2 T5500 1.66GHz, respectively, using the above 5 interpolation methods to enlarge the original image 8 times times to get 5 2880x 2160 of images

In order to get the best image amplification quality, we should use adaptive spline interpolation enhancement (s-s Pline_ XL) technology to enlarge the image under optional conditions.

Comparing the above figures and combining with the experimental data, I list the effect parameters as follows.

Interpolation type Subjective feeling Image Contour Overall evaluation Processing time
Nearest point interpolation n earrst_ N eighbour Mosaic phenomenon is serious Not clear Worst 5 Seconds
bilinear interpolation b ilinear Blurred image, not sharp Unclear edges, jagged appearance Poor 6 seconds
Bicubic interpolation b icubic Blurred image, sharper The sawtooth phenomenon has improved Compromise 8 seconds
Adaptive spline interpolation s-s pline The image is relatively clear and sharp Edges become clear, jagged phenomena disappear Good 18 seconds
Adaptive spline Enhancement s-s Pline_ XL Clear, sharp images Sharp edges, clear Best 20 seconds

Image Amplification Algorithm

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: 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.