I need a code that produce a moving average matrix with a 5*5 window
Show older comments
Hello everyone,
I have an image of 2781 * 1680, and I want to calculate the average of each pixel with a 5 * 5 sliding window that will move throughout the matrix. Knowing that I use matlab 2010 and that I do not have the function movmean.
Accepted Answer
More Answers (1)
John D'Errico
on 26 Sep 2017
Edited: John D'Errico
on 26 Sep 2017
I'll bet that you do have a simple function that will solve the problem.
Hint:
help conv2
If that is insufficient, then what does
ones(5,5)/25
do for you?
1 Comment
safa bousbih
on 26 Sep 2017
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!