| 
				 回复: 十字形窗口中值滤波怎么写程序 
 
			
			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 编辑。
 |