Home > 16-Surface-Reconstruction > Surface-Reconstruction > Functions > interpolate_bilinear.m

interpolate_bilinear

PURPOSE ^

% interpolate_bilinear

SYNOPSIS ^

function z=interpolate_bilinear(S,x,y,dx,BB,sigma_h);

DESCRIPTION ^

% interpolate_bilinear

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% interpolate_bilinear
0002 
0003 
0004 function z=interpolate_bilinear(S,x,y,dx,BB,sigma_h);
0005 
0006 x=(x-BB(1))/dx+1;
0007 y=(y-BB(2))/dx+1;
0008 
0009 xr=floor(x);
0010 yr=floor(y);
0011 s=x-xr;
0012 t=y-yr;
0013 z=(1-s)*(1-t)*S(xr,yr)...
0014   +s*(1-t)*S(xr+1,yr)...
0015   +(1-s)*t*S(xr,yr+1)...
0016   +s*t*S(xr+1,yr+1); 
0017 z=z*sigma_h;
0018 
0019 [x-1,y-1,z,xr,yr,s,t,sqrt(S(xr,yr))*sigma_h];
0020 return

Generated on Sat 21-Jul-2018 20:56:10 by m2html © 2005