资源简介
fft-piv矢量估计matlab代码,非常好用,希望能对大家的学习起到帮助作用
代码片段和文件信息
%计算出YX,v,u。计算结果可以画出图形
function [YXvu]=fft_piv(imr1imr2nx_windowny_windowoverlap_xoverlap_y)
%check image size
%nx图片的长度
%subwindow_x小框的起始x坐标
%X_xsize网格的X坐标
%x_center小框的一半
%x_end矢量的终点
now=cputime;
nx=size(imr11);
ny=size(imr12);
nx2=size(imr21);
ny2=size(imr22);
if(nx~=nx2)|(ny~=ny2)
error(‘Error:image sizes are different!!‘);
end
if overlap_x>0.9|overlap_y>0.9
error(‘Error:the overlap ration is too large!!‘);
end
if(nx_window<8)|(ny_window<8)
error(‘Error:subwindow is too small!!‘);
end
if(nx_window>250)|(ny_window>250)
error(‘Error:subwindow is too large!!‘);
end
x_center=floor(nx_window/2);
y_center=floor(ny_window/2);
overlapx=floor(nx_window*overlap_x);
overlapy=floor(ny_window*overlap_y);
subwindow_x=1;
subwindow_y=1;
X_xsize=0;
X_ysize=0;
for subwindow_x=1:overlapx:(nx-nx_window)
X_xsize=X_xsize+1;
end
for subwindow_y=1:overlapy:(ny-ny_window)
X_ysize=X_ysize+1;
end
X=ones(X_xsizeX_ysize);
Y=on
- 上一篇:利用Matlab进行车辆检测与车型识别
- 下一篇:HHT MATLAB工具箱
评论
共有 条评论