How do I get a median filtered image?

1 Ansicht (letzte 30 Tage)
kiruthika r
kiruthika r am 25 Aug. 2015
Bearbeitet: Guillaume am 26 Aug. 2015
How do I get a median filtered image? I want to convert the first image like the second image using median filter.

Antworten (1)

David Young
David Young am 25 Aug. 2015
If you have the Image Processing Toolbox, you can use medfilt2.
  4 Kommentare
kiruthika r
kiruthika r am 26 Aug. 2015
When I use medfilt2 code, I am getting the image exactly like my first image.
Guillaume
Guillaume am 26 Aug. 2015
Bearbeitet: Guillaume am 26 Aug. 2015
Have you tried increasing the size of the kernel. The default is 3x3. Your desired output image is extremely blurred indicative of a large kernel.
Try
medfilt2(img, [10 10]); %kernel size of 10
Note that even with the default, the output of medfilt2 is never exactly the same as the input (unless your image is just uniform)

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by