这是一个影像滤波的循环
Img is input image. (h, v) is image isze.
F is filter matrix. (F_h, F_v) is filter size.
fI is filtering image.
for i=1:h
for j=1:v
R = Img( i:i+F_h, j:j+F_v );
fI(i,j) = sum(sum(R .* F));
end
end
刚开始学习用Matlab,只会使用for循环解决问题;
想学习如何改写成矩阵运算,感谢大大们解惑!