基于HOG算子的特征提取方法的MATLAB仿真,matlab2021a测试。
for j=1:ny%行
for i=1:nx%列
Ltop=G(((j-1)*n+1):j*n,((i-1)*n+1):i*n);%%左上cell
Lbottom=G((j*n+1):(j+1)*n,((i-1)*n+1):i*n);%%左下cell
Rtop=G(((j-1)*n+1):j*n,(i*n+1):(i+1)*n);%%右上cell
Rbottom=G((j*n+1):(j+1)*n,(i*n+1):(i+1)*n);%%右下cell,四个cell组成一个block
pltop=anna_phog(Ltop,9,180);
plbottom=anna_phog(Lbottom,9,180);
prtop=anna_phog(Rtop,9,180);
prbottom=anna_phog(Rbottom,9,180);