查看单个帖子
旧 2009-05-14, 13:36   #4
silas_xue
高级会员
 
注册日期: 2008-11-01
年龄: 39
帖子: 406
声望力: 26
silas_xue 是一个将要出名的人
默认 回复: 求助——如何改变程序中中值滤波的窗口大小

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”,再次登陆时亦便于查看回答是否真的帮到你了。
个人观点 仅供参考 多多交流 相互学习
silas_xue 当前离线   回复时引用此帖