How can I make a Loop (!) over the image using a 5×5 pixel window
Show older comments
Loop (!) over the image using a 5×5 pixel window. For each such window, compute the average pixel value and store the result in a new image. Treat borders in some controlled way and make sure the result has the same size in pixels as the original image. You will need at least two nested for-loops, to scan rows and columns in your image.
4 Comments
Walter Roberson
on 14 Nov 2019
Overlapping windows, or non-overlapping windows?
Look at blockproc()
KALYAN ACHARJYA
on 14 Nov 2019
There is no need of loops, is it must be use?
Nadeen Bahnam
on 14 Nov 2019
Walter Roberson
on 14 Nov 2019
nlfilt(), blockproc(), conv2()
Accepted Answer
More Answers (0)
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!