Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
高级会员
注册日期: 2008-11-01
年龄: 39
帖子: 406
声望力: 26 ![]() |
![]()
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 编辑。 |
![]() |
![]() |