Difference algorithm in Images

Source: Internet
Author: User

Interpolation, also known as "resetting samples", is a method to increase the pixel size of an image without generating pixels, calculate the color of the lost Pixel based on the mathematical formula of the surrounding pixel color. Simple location, interpolation is a method to simulate peripheral pixel values based on the color parameters of the central pixel. It is a unique software means for digital cameras to enlarge digital photos.

I. Recognition of interpolation algorithms

"Interpolation" was originally a computer term and was later referenced in digital images. When the image is enlarged, pixels also increase accordingly. But where do these added pixels come from? Interpolation comes in handy: interpolation is a method to increase the pixel size of an image without generating pixels, calculate the color of the lost Pixel based on the mathematical formula of the surrounding pixel color (some cameras also use interpolation to artificially increase the resolution of the image ). Therefore, when enlarging an image, the image looks smooth and clean. However, interpolation does not add image information. As shown in figure 1 (see figure 1), the following are images processed by different interpolation algorithms.



1. Nearest pixel interpolation algorithm

Nearest neighbour interpolation is the simplest interpolation algorithm. When an image is enlarged, the missing pixels are generated by directly using the colors of the closest original pixels, that is to say, the pixel next to the image is copied, and the result of this operation is obviously visible (see figure 2 ).

2. bilinear interpolation algorithm

Each pixel of the image output by bilinear interpolation is the result of the four pixels (2 × 2) operation in the source image, this algorithm greatly eliminates the Sawtooth phenomenon (see figure 3 ).

3. Double three interpolation algorithms

Bicubic interpolation is an improved algorithm of the previous algorithm. Each pixel of the output image is the result of 16 pixels (16 × 16) of the original image (see figure 4 ). This algorithm is a common algorithm that is widely used in image editing software, printer drivers, and digital cameras.

4. Fractal algorithms

Fractal interpolation is an algorithm proposed by Altamira group. The image obtained by this algorithm is clearer and clearer than other algorithms (see figure 5 ).

Nowadays, many digital camera manufacturers use interpolation algorithms on digital cameras and publicize the resolution values obtained through the algorithms. Although their algorithms are much more advanced than double three interpolation algorithms, however, the fact is that the image details cannot be created out of thin air. Because the interpolation resolution is used by a digital camera to increase the pixel of the image through its own built-in software, so as to increase the resolution.

Ii. Effects of Interpolation

The photos taken with digital zoom are unclear, which is the most common cause of digital zoom. In fact, this is only a one-sided statement.

The effect of digital zoom on the image definition depends on whether the CCD performs interpolation when the digital camera is Zoom. When high pixels are used, if digital zoom is used for shooting, CCD does not have any interpolation operation at this time, the effect of digital zoom on the final clarity of digital photos will become extremely limited. For example, if a digital camera with a CCD pixel of 5.2 million and a maximum resolution of 2560x1920 is used for 2 x digital zoom, in this case, only half of CCD is working during imaging. In other words, digital cameras do not use interpolation algorithms similar to "adding eight pixels around a pixel", but rather reduce resolution, that is, the resolution indicator 1280 × 960 is used for imaging. For general digital photos, the 1280x960 resolution indicator is good enough. The difference between it and the 2560x1920 resolution will become acceptable because there is no interpolation operation involved. However, this phenomenon is only limited to some advanced digital cameras. For fixed-focus digital cameras with less than a thousand yuan, digital zoom means an inevitable interpolation operation, the consequence of sacrificing resolution allows the photographer to have only two options: either get a blurred "full-size" photo, or get a quality guarantee, but the resolution is only a "mini" image similar to 320x240.

Introduction to interpolation algorithms

Inverse Distance to a power (Inverse Distance Weighted Interpolation)

Kerkin Interpolation Method)

Minimum curvature (minimum curvature)

Modified Xie ARD's method (improved Xie bind's method)

Natural Neighbor (natural neighbor interpolation method)

Nearest Neighbor (nearest neighbor interpolation method)

Polynomial Regression (multivariate regression)

Radial Basis Function (Radial Basis Function)

Triangulation with linear interpolation (linear interpolation triangle method)

Moving Average (moving average method)

Local polynomial (local polynomial method)

The following describes the features of different algorithms.

1. distance reciprocal multiplication method

The distance reciprocal square gridded method is a weighted average interpolation method that can be used for exact or smooth interpolation. The square parameter controls how the weight coefficient decreases as the distance from a grid node increases. For a large cube, a relatively high weight share is given for a closer data point. For a smaller cube, the weights are evenly distributed to data points. When a grid node is computed, the weight of a specific data point is proportional to the reciprocal of the distance from the specified node to the observation point. When a grid endpoint is calculated, the assigned weight is a score, and the total weight is 1.0. When an observation point and a grid node are duplicated, the observation point is given a weight of 1.0 actually, and all other observation points are given
0.0 weight. In other words, the node is assigned a value consistent with the observation point. This is an accurate interpolation. One of the features of the distance reciprocal method is to generate a "bull eye" around the observation point position in the grid area ". You can specify a smooth parameter when using the reciprocal distance grid. Smooth parameter guarantee with a value greater than zero. For a specific node, no observation point is assigned all the weights, even if the observation point overlaps with the node. Smooth parameters reduce the effect of the "Ox eye" by smoothing the grid that has been interpolated.

2. Kerry kingfa

The kerkin method is a grid method of geological statistics that is useful in many fields. Kerry kingfa tries to show the trend that is hidden in your data. For example, a high point is connected along a ridge, rather than isolated by a ox-Eye contour. The Kerry kingfa includes several factors: the change graph model, the drift type and the block effect.

3. Least Curvature Method

The least curvature method is widely used in Earth science. The interpolation surface generated by the least curvature method is similar to a long thin elastic slice with the minimum bending volume through each data value. The least curvature method tries to generate as smooth a surface as possible while respecting data as strictly as possible. When using the least curvature method, two parameters are involved: the maximum residual parameter and the maximum number of cycles parameter to control the convergence standard of the minimum curvature.

4. Multiple Regression

Multiple regression is used to determine the large-scale trend and pattern of your data. You can use several options to determine the type of the trend surface you need. In fact, multivariate regression is not an interpolation tool because it does not attempt to predict unknown Z values. It is actually a trend surface analysis and plotting program. When using multivariate regression, you must define the surface and specify the highest level of xy. The surface definition is the Polynomial Type of the selected data, these types are simple plane, bilinear saddle, quadratic surface, cubic surface, and user-defined polynomials. The parameter setting is the highest level of the X and Y elements in the polynomial equation.

5. Radial Basic Function Method

The radial basic function method is a combination of multiple data interpolation methods. According to the ability to adapt to your data and generate a smooth surface, the complex quadratic function is considered by many people as the best method. All basic radial function methods are accurate interpolation tools, and they all need to work to respect your data. To try to generate a smoother surface, you can introduce a smoother coefficient to all of these methods. The function you can specify is similar to the Change chart in Kerry. When interpolation is performed on a grid node, these functions specify a set of Optimal Weights for data points.

6. Xie binfa

Xie bind's method uses the least squares weighted by reciprocal distance. Therefore, it is similar to the reciprocal square interpolation, but it uses the local Least Square to remove or reduce the appearance of the generated contour. Xie beide can be an accurate or smooth interpolation tool. When using the Xie bind method as the grid method, the smooth parameter settings must be involved. Smooth parameters enable Xie bind to work like a smooth interpolation device. When you increase the value of a smooth parameter, the better the smooth effect is.

7. Tin/linear interpolation

The Triangle network interpolation tool is a strict interpolation tool, and its working route is similar to that drawn by hand. This method works by establishing several triangles by connecting data points. The connection method of the original data points is as follows: the edges of all triangles cannot interwork with other triangles. The result is a mesh that covers the grid and is spliced by triangles. Each triangle defines an area that covers the grid nodes in the triangle. The Skew and elevation of a triangle are determined by the three original data points that define the triangle. All nodes in a given triangle are restricted by the surface of the triangle. Because the original data points are used to define various triangles, your data is very respected.

8. natural neighbor interpolation

The natural neighboring point interpolation method (naturalneighbor) is a new method of mesh developed by surfer7.0. The natural neighbor interpolation method is widely used in some research fields. The basic principle is that for a group of Tyson (Thiessen) polygon, when a new data point (target) is added to the data set, these Tucson polygon will be modified, the weighted average value of neighboring points determines the weight of the point to be inserted. The weight of the point to be inserted is proportional to the weight of the target Taizhou polygon [9]. In fact, in these polygon, some polygon will be reduced, and no polygon will increase in size. At the same time, the natural neighbor interpolation method does not push out the contour lines (such as the contour lines of the taisen polygon) when the data point is raised ).

9. Nearest Neighbor Interpolation

Nearestneighbor (nearestneighbor) is also known as the Tucson Polygon method. The thiesen (also called Dirichlet or KNN polygon) method is an analytical method proposed by Dutch Meteorological scientist A. H. Thiessen. It was originally used to calculate the average rainfall from the rainfall data of the discrete distribution weather station. in GIS and geographic analysis, the tysen polygon is often used for quick assignment [2]. In fact, an implicit assumption of nearest neighbor interpolation is that the attribute values of P (x, y) of any mesh point use the attribute values of the point closest to it, use the neighborhood value of each grid node as the node value to be [3]. When data is already evenly distributed at intervals, You need to first convert the data to a surfer GRID file, you can apply the nearest neighbor interpolation method; or in a file, the data is closely complete, only a few vertices have no value. You can use the nearest neighbor interpolation method to fill in data points without value. Sometimes it is necessary to exclude the areas with no value data in the grid file, set a value in the search elliptic (searchellipse), and assign the blank value to the area without data in the grid file. The size of the search radius is smaller than the distance between the data values of the grid file. All nodes without a data grid are assigned a blank value. When using the nearest neighbor interpolation gridded method to convert XYZ data at a regular interval to a grid file, you can set equal spacing between the grid interval and the data points of XYZ data. The nearest neighbor interpolation gridded method has no options. It is homogeneous and non-changing, and is useful for interpolation of data with even intervals. At the same time, it is very effective for filling areas with no value data.

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.