Bilinear interpolation of an image or matrix
This function uses biLinear interpolation and looks at 4 pixels around the target location with ceil convention.
--RGB = 1 for gray scale images.
--img can be a single layer matrix or a RGB layer colored image
--yx =[y_value, x_value]; It can be either horizontal or vertical vector
--zpad is a boolean variable. if true, zeros are used for pixel values outside of the given img. If false, the nearest edge value is repeated.
Example:
[m,n]=meshgrid(1:3);img=[m+n]
--> 2 3 4
3 4 5
4 5 6
interpImg(img,[2.4,2.2])
--> 4.6
Disi A
adis@mit.edu
Cita come
Disi A (2025). Bilinear interpolation of an image or matrix (https://it.mathworks.com/matlabcentral/fileexchange/43533-bilinear-interpolation-of-an-image-or-matrix), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
