回复: 求助——如何改变程序中中值滤波的窗口大小
lz 圆形窗口 即以你的所在像像素点为圆心 寻找indice在某一半径内的值
由于是数字图像 不可能做到完全的圆处理 近似搜索
希望可以对你有些帮助
pseudo:
... % initial process, imread,
for i,j %denote p(i,j) as the current
for beta %beta as the index searching angle
loc = find(p(i+floor[k*cos(beta)+0.5],i+floor[k*sin(beta)+0.5]))
mean(loc) % fitering: two ways available: p(i,j) anticipation or p(i,j) un-anticipation
p(i,j) = mean (loc) % current pixel updated
end for
end for
...
PS: No cosideration of boundary and probable value overflowing.
Thx for reading.
PS:若还算满意,直接点击“Thanks”,再次登陆时亦便于查看回答是否真的帮到你了。
个人观点 仅供参考 多多交流 相互学习
|