中文说明: 1.首先确定最大的滤波半径,然后用一个合适的半径r对图像进行滤波。计算当前滤波半径像素灰度的Imin,Imax,Imed,然后判断Imed是否在[Imin,Imax]中间,如果在则向下进行,否则扩大当前半径r继续滤波直到r等于最大滤波半径。 2.如果当前处理的像素img(i,j)在[Imin,Imax]之间,则输出当前像素,否则输出当前滤波半径中值像素Imed。
English Description:
Firstly, the maximum filtering radius is determined, and then an appropriate radius R is used to filter the image. Calculate Imin, IMAX, IMED of the pixel gray level of the current filtering radius, and then judge whether IMED is in the middle of [Imin, IMAX]. If it is, proceed downward; otherwise, expand the current radius R and continue filtering until R is equal to the maximum filtering radius.