backgrounddrift.m
来自「ESTIMATION OF AIRCRAFT TRAJECTORY FROM I」· M 代码 · 共 14 行
M
14 行
for t = 1:num_frames
% Drift the Background at the rate driftx and difty (in pixels/second) and add in the vibration:
xshift = driftx*delt*t+levarmx*vibx(t,1);
yshift = drifty*delt*t+levarmy*viby(t,1);
% Interpolate the 2D image using the MATLAB function interp2:
[xgrid ygrid] = meshgrid(1:backsize);
[xindex yindex] = meshgrid(xshift:1:xshift+backsize,yshift:1:yshift+backsize);
outtemp = interp2(xgrid,ygrid,background,xindex,yindex);
% Truncate the drifted image down from backsize to framesize:
out(:,:,t) = outtemp(xoff:xoff+framesize-1,xoff:xoff+framesize-1);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?