Jump to content

Python: Difference between revisions

49 bytes added ,  7 January 2021
Line 513: Line 513:
===Bilinear Interpolation===
===Bilinear Interpolation===
Coped from [https://stackoverflow.com/questions/12729228/simple-efficient-bilinear-interpolation-of-images-in-numpy-and-python https://stackoverflow.com/questions/12729228/simple-efficient-bilinear-interpolation-of-images-in-numpy-and-python]
Coped from [https://stackoverflow.com/questions/12729228/simple-efficient-bilinear-interpolation-of-images-in-numpy-and-python https://stackoverflow.com/questions/12729228/simple-efficient-bilinear-interpolation-of-images-in-numpy-and-python]
{{ hidden | Bilinear Interpolation function |
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
def bilinear_interpolate(im, x, y):
def bilinear_interpolate(im, x, y):
Line 553: Line 554:
     return wa * Ia + wb * Ib + wc * Ic + wd * Id
     return wa * Ia + wb * Ib + wc * Ic + wd * Id
</syntaxhighlight>
</syntaxhighlight>
}}


==Libraries==
==Libraries==