首页 | 主题 | 图库 | 问答 | 文摘 | 原创 | 百科

历史 | 地理 | 人物 | 艺术 | 体育 | 科学 | 音乐 | 电影 | 信息技术 | 世界遗产

 开放、中立,源自维基百科

Personal tools

Nearest neighbor interpolation

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Image:Piecewise constant.svg
Nearest neighbor interpolation in one dimension on a dataset (red points).
Example of nearest neighbor interpolation of a random set of points (black dots) in 2D. Each coloured cell indicates the area in which all the points have the black point in the cell as their nearest black point.
Example of nearest neighbor interpolation of a random set of points (black dots) in 2D. Each coloured cell indicates the area in which all the points have the black point in the cell as their nearest black point.
Image:Nearest2DInterpolExample.png
Nearest neighbor interpolation on a uniform grid (black points).

Nearest neighbor interpolation (also known as point sampling in some contexts) is a simple method of multivariate interpolation in 1 or more dimensions. Interpolation is the problem of approximating the value for a non-given point in some space, when given some values of points around that point. The nearest neighbor algorithm simply selects the value of the nearest point, and does not consider the values of other neighboring points at all, yielding a piecewise-constant interpolant. The algorithm is very simple to implement, and is commonly used (usually along with mipmapping) in real-time 3D rendering to select color values for a textured surface.

Connection to Voronoi diagram

For a given set of points in space, a Voronoi diagram is a decomposition of space into cells, one for each given point, so that anywhere in space, the closest given point is inside the cell. This is equivalent to nearest neighbour interpolation, by assigning the function value at the given point to all the points inside the cell. The figures on the right side show by colour the shape of the cells.

See also

External links

Image:Arithmetic symbols.svg This applied mathematics-related article is a stub. You can help Wikipedia by expanding it.
AD Links