How do I get a median filtered image?

2 ビュー (過去 30 日間)
kiruthika r
kiruthika r 2015 年 8 月 25 日
編集済み: Guillaume 2015 年 8 月 26 日
How do I get a median filtered image? I want to convert the first image like the second image using median filter.

回答 (1 件)

David Young
David Young 2015 年 8 月 25 日
If you have the Image Processing Toolbox, you can use medfilt2.
  4 件のコメント
kiruthika r
kiruthika r 2015 年 8 月 26 日
When I use medfilt2 code, I am getting the image exactly like my first image.
Guillaume
Guillaume 2015 年 8 月 26 日
編集済み: Guillaume 2015 年 8 月 26 日
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)

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by