[Solved] How can I apply a ring-shaped median filter to an image in matlab? [closed]
you can use ordfilt2 . For example, if your “ring” is just defined by: ring= fspecial(‘gaussian’,21,1) ring = ring>eps & ring<1e-9 then: order=sum(ring(:))/2; B = ordfilt2(A,order,ring); replaces each element in A by the order-th element in the sorted set of neighbors specified by the nonzero elements in the ring domain. Here I chose ‘order’ to … Read more