user14135319
user14135319

Reputation:

How can we use mean filter as adaptive one?

When we have noise in background area then we can use mean filter to remove noise since there is no sharp features for our processing. when we do the noise removal for the image region which contains edges (finer details).This region completely blur and we miss the finer details.

Can we apply a filter such that which will do heavy blurring on the flat area(background of image) and apply very little blur in feature regions? One more,

Do we have an implementation of this filter in opencv?

Upvotes: 1

Views: 615

Answers (2)

Cris Luengo
Cris Luengo

Reputation: 60554

A very good adaptive filter is the bilateral filter. It applies a Gaussian filter for smoothing, but additionally weighs each sample by how similar it is to the central value under the mask. Thus, it effectively only averages over pixels that have a similar value. In a flat region, all pixels have a similar value, hence it averages over the full kernel. Near an edge, only pixels up to the edge have a similar value, hence it averages only over the pixels up to the edge.

In OpenCV this is implemented in cv::bilateralFilter.

Upvotes: 3

fmigneault
fmigneault

Reputation: 351

Look for Median filter. Example:

enter image description here

Available in OpenCV doc here

Upvotes: 1

Related Questions