Search code examples
matlabgradientsmoothing

Smoothing of Edges of an Image


I have a code generated Image with sharp edges. The change in intensity (gradient) of the edges needs to be reduced so as to give a continuous change in color over the region.

I applied averaging and gaussian low pass filter in MATLAB but it only blurs the image. The requirement is for a sharp image with continuous color change.

Can someone suggest a suitable method for the same? Thanks in advance.

Example image:

enter image description here


Solution

  • Use non-local means (NLM) or anisotropic diffusion. NLM is the best for preserving both edges and detail in flat/textured regions.

    There are several implementations on MATLAB Central:

    There are many more.