主题: [MATLAB图像处理] 十字形窗口中值滤波怎么写程序
查看单个帖子
旧 2009-05-19, 02:45   #4
silas_xue
高级会员
 
注册日期: 2008-11-01
年龄: 39
帖子: 406
声望力: 26
silas_xue 是一个将要出名的人
默认 回复: 十字形窗口中值滤波怎么写程序

lz 不知道我理解你的意图是否正确?

pseudo:
Suppose p(i,j) is the current pixel, p_n(i,j) is the result updated
for i,j across the image
p_n(i,j) = 1/4(p(i-1,j)+p(i+1,j)+p(i,j-1)+p(i,j+1)) %% for average calculation
%% Or p_n(i,j) = 1/5(p(i-1,j)+p(i+1,j)+p(i,j-1)+p(i,j+1))+p(i,j)) for average calculation with the p(i,j) itself in calculation
%% Or temp_set = (p(i-1,j),p(i+1,j),p(i,j-1),p(i,j+1)) p_n(i,j) = median(temp_set) for Median calculation
%% Or temp_set = (p(i-1,j),p(i+1,j),p(i,j-1),p(i,j+1),p(i,j)) p_n(i,j) = median(temp_set) for Median calculation with the p(i,j) itself in calculation
end

此帖于 2009-05-19 02:57 被 silas_xue 编辑。
silas_xue 当前离线   回复时引用此帖