Apply a mean filter on a matrix
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hassan Bosha
am 9 Jul. 2020
Kommentiert: Image Analyst
am 9 Jul. 2020
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 Kommentar
Akzeptierte Antwort
Image Analyst
am 9 Jul. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!