Reputation:
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
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