Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bilinear interpolation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Application in image processing == In [[computer vision]] and [[image processing]], bilinear interpolation is used to [[resampling (bitmap)|resample]] images and textures. An algorithm is used to map a screen pixel location to a corresponding point on the [[texture mapping|texture map]]. A weighted average of the attributes (color, transparency, etc.) of the four surrounding [[Texel (graphics)|texels]] is computed and applied to the screen pixel. This process is repeated for each pixel forming the object being textured.<ref>[https://www.pcmag.com/encyclopedia_term/0,2542,t=bilinear+interpolation&i=38607,00.asp Bilinear interpolation definition (popular article on www.pcmag.com].</ref> When an image needs to be scaled up, each pixel of the original image needs to be moved in a certain direction based on the scale constant. However, when scaling up an image by a non-integral scale factor, there are pixels (i.e., ''holes'') that are not assigned appropriate pixel values. In this case, those ''holes'' should be assigned appropriate [[RGB]] or [[grayscale]] values so that the output image does not have non-valued pixels. Bilinear interpolation can be used where perfect image transformation with pixel matching is impossible, so that one can calculate and assign appropriate intensity values to pixels. Unlike other interpolation techniques such as [[nearest-neighbor interpolation]] and [[bicubic interpolation]], bilinear interpolation uses values of only the 4 nearest pixels, located in diagonal directions from a given pixel, in order to find the appropriate color intensity values of that pixel. Bilinear interpolation considers the closest 2 Γ 2 neighborhood of known pixel values surrounding the unknown pixel's computed location. It then takes a weighted average of these 4 pixels to arrive at its final, interpolated value.<ref>{{Cite journal|last=Khosravi|first=M. R.|date=2021-03-19|title=BL-ALM: A Blind Scalable Edge-Guided Reconstruction Filter for Smart Environmental Monitoring Through Green IoMT-UAV Networks|url=https://ieeexplore.ieee.org/document/9382001|journal=IEEE Transactions on Green Communications and Networking|language=en|volume=5|issue=2 |pages=727β736|doi=10.1109/TGCN.2021.3067555|s2cid=233669511 |url-access=subscription}}</ref><ref>[http://www.cambridgeincolour.com/tutorials/image-interpolation.htm "Web tutorial: Digital Image Interpolation"].</ref> [[File:Bilin3.png|thumb|right|alt=Bilinear interpolation|Example of bilinear interpolation in grayscale values]] === Example === As seen in the example on the right, the intensity value at the pixel computed to be at row 20.2, column 14.5 can be calculated by first linearly interpolating between the values at column 14 and 15 on each rows 20 and 21, giving :<math>\begin{align} I_{20, 14.5} &= \frac{15 - 14.5}{15 - 14} \cdot 91 + \frac{14.5 - 14}{15 - 14} \cdot 210 = 150.5, \\ I_{21, 14.5} &= \frac{15 - 14.5}{15 - 14} \cdot 162 + \frac{14.5 - 14}{15 - 14} \cdot 95 = 128.5, \end{align}</math> and then interpolating linearly between these values, giving :<math>I_{20.2, 14.5} = \frac{21 - 20.2}{21 - 20} \cdot 150.5 + \frac{20.2 - 20}{21 - 20} \cdot 128.5 = 146.1.</math> This algorithm reduces some of the visual distortion caused by resizing an image to a non-integral zoom factor, as opposed to nearest-neighbor interpolation, which will make some pixels appear larger than others in the resized image.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)