Apply a mean filter on a matrix

12 ビュー (過去 30 日間)
Hassan Bosha
Hassan Bosha 2020 年 7 月 9 日
コメント済み: Image Analyst 2020 年 7 月 9 日
How can i apply a mean or laplacian or average or any kind of filters 3x3
on any matrix i give it to it and get the new matrix ?
What is the code for it
  1 件のコメント
Rik
Rik 2020 年 7 月 9 日
A simple Google search should get you most of the way there. What did you try?

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

採用された回答

Image Analyst
Image Analyst 2020 年 7 月 9 日
How about imfilter()
filterWindow = ones(3) / 9;
filteredImage = imfilter(m, filterWindow);
Or for the Laplacian, how about conv2():
filterWindow = -1 * ones(3);
filterWindow = 8;
filteredImage = conv2(m, filterWindow, 'same');
  2 件のコメント
Hassan Bosha
Hassan Bosha 2020 年 7 月 9 日
is there a one for median filter ?
Image Analyst
Image Analyst 2020 年 7 月 9 日
You can use medfilt2().

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by