Update
This commit is contained in:
parent
cf7680ee94
commit
6f8eee7efa
18 changed files with 2005 additions and 1977 deletions
|
@ -1,6 +1,6 @@
|
|||
# Bilinear Interpolation
|
||||
|
||||
Bilinear interpolation (also bilinear filtering) is a simple way of creating a smooth transition ([interpolation](interpolation.md)) between [discrete](discrete.md) samples (values) in 2D, it is a [generalization](generalization.md) of [linear interpolation](lerp.md) to 2 dimensions. It is used in many places, popularly e.g. in 3D [computer graphics](graphics.md) for **[texture](texture.md) filtering**; bilinear interpolation allows to upscale textures to higher resolutions (i.e. compute new pixels between existing pixels) while keeping their look smooth and "non-blocky" (even though blurry). On the scale of quality vs simplicity it is kind of a middle way between a simpler [nearest neighbour](nearest_neighbour.md) interpolation (which creates the "blocky" look) and more complex [bicubic interpolation](bicubic.md) (which uses yet smoother curves but also requires more samples). Bilinear interpolation can further be generalized to [trilinear interpolation](trilinear.md) (in computer graphics trilinear interpolation is used to also additionally interpolate between different levels of a texture's [mipamap](mipamp.md)) and perhaps even bilinear [extrapolation](extrapolation.md). Many frameworks/libraries/engines have bilinear filtering built-in (e.g. `GL_LINEAR` in [OpenGL](ogl.md)). Of course this method may be used to smooth not just textures but anything, for example terrain [heightmaps](heightmap.md) or just any discrete mathematical function that we simply want to have defined everywhere, it's not just graphics thing, but here we will focus on its application in [graphics](graphics.md).
|
||||
Bilinear interpolation (also bilinear filtering) is a simple way of creating a smooth transition ([interpolation](interpolation.md)) between [discrete](discrete.md) samples (values) in 2D, it is a [generalization](generalization.md) of [linear interpolation](lerp.md) to 2 dimensions. It is used in many places and popularly encountered e.g. in 3D [computer graphics](graphics.md) as a method of **[texture](texture.md) filtering**; bilinear interpolation allows for upscaling textures to higher resolutions (i.e. insert new pixels in between existing pixels) whilst keeping their look smooth and "non-blocky" (even though blurry). On the scale of quality vs simplicity it is kind of a middle way between a simpler [nearest neighbour](nearest_neighbour.md) interpolation (which creates the "blocky" look) and more complex [bicubic interpolation](bicubic.md) (which uses yet smoother curves but also requires more samples). Bilinear interpolation can further be generalized to [trilinear interpolation](trilinear.md) (in computer graphics trilinear interpolation is used to also additionally interpolate between different levels of a texture's [mipamap](mipamp.md)) and perhaps even bilinear [extrapolation](extrapolation.md). Many frameworks/libraries/engines come with bilinear filtering built-in as a standard feature (e.g. `GL_LINEAR` in [OpenGL](ogl.md)). Of course this method is not limited to upscaling textures and can be applied to any set of discrete samples such as terrain [heightmaps](heightmap.md) or any kind of discrete mathematical function which we want to automatically generalize to all [real numbers](real_number.md), it's not something encountered only in [computer graphics](graphics.md), even though this article will still mostly view it from the graphics perspective.
|
||||
|
||||
Why is it named *bilinear*? Probably because it's doing linear interpolation twice: once in *X* direction, then in *Y* direction.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue