图象处理(matlab)

来源:百度知道 编辑:UC知道 时间:2024/07/02 09:44:05
设计一个程序实现n*n的中值滤波器,当模板中心移过图象中每个位置时,设计一种简单的中值更新方法。
急,恳请帮忙
能否再具体一点,本人对matlab没多少了解!

matlab有现成的median filter函数:
B = medfilt2(A, [m n])

This function performs median filtering of the matrix A in two dimensions. Each output pixel contains the median value in the m-by-n neighborhood around the corresponding pixel in the input image. medfilt2 pads the image with 0s on the edges, so the median values for the points within [m n]/2 of the edges might appear distorted.