Keywords: BilinearInterpolExample.png Illustration of en Bilinear interpolation on a dataset Compare with Image Nearest2DInterpolExample png and Image BicubicInterpolationExample png they share the dataset self-made in en Matlab Berland Matlab code Xcoarse Ycoarse meshgrid 0 1 2 3 0 1 2 3 ; Xfine Yfine meshgrid linspace 0 3 1500 linspace 0 3 1500 ; DataCoarse 1 2 4 1; 6 3 5 2; 4 2 1 5; 5 4 2 3; DataBilinearFine interp2 Xcoarse Ycoarse DataCoarse Xfine Yfine 'bilinear' ; figure surf Xfine Yfine DataBilinearFine ; shading flat; colormap jet ; view 0 90 hold on; plot3 Xcoarse Ycoarse 10 ones size Xcoarse 'k ' 'MarkerSize' 20 colorbar print -dpng -r300 BilinearInterpolExample png The files have been cropped in gimp to remove the empty Matlab border Numerical analysis Color interpolations Bilinear interpolation Images with Matlab source code |