How to impose a window centered on the current pixel of an image?

3 views (last 30 days)
I have a noisy image of size 256x256. I need to impose a 11x11 window centered on the current pixel and find the maximum value within the window. This step should be repeated for all pixels in the image. Can anyone help me how to do that in MATLAB?

Accepted Answer

Guillaume
Guillaume on 5 Feb 2016
nlfilter(img, [11 11], @(block) max(block(:)))

More Answers (0)

Categories

Find more on Image Processing Toolbox 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!