close

Smoothing Techniques in OpenCV

home

Smoothing Techniques in OpenCV

opencvpython.blogspot.com

Smoothing Techniques in OpenCV

Hi,

This post is an additional note to official OpenCV tutorial : Smoothing Images

( Its corresponding Python code can be found here : smoothing.py )

Below I would like to show you the results I got when I applied four smoothing techniques in OpenCV, ie cv2.blur, cv2.GaussianBlur, cv2.medianBlur and cv2.bilateralFilter. Kernel size, I used in all cases were 9. See the result below :

Original Image:

Smoothing Techniques in OpenCV
Original Image
After Homogeneous Blur, cv2.blur() :

Smoothing Techniques in OpenCV
Result of blurring
After Gaussian Blur , cv2.GaussianBlur():

Smoothing Techniques in OpenCV
Result of Gaussian Filter
It is much more clear than previous.

After median blur, cv2.medianBlur() :

Smoothing Techniques in OpenCV
After median blur
 It has become somewhat like a painting. See eye, it has become completely black.

Finally, after bilateral filter :

Smoothing Techniques in OpenCV

This result has high similarity with original image. It is because, it doesn't smooth the edge, instead smooth small noises leaving edges same way. So to see difference, zoom image to left face and check carefully. Then you will understand, face part will have become much more smoother, in short, much more glamorous. There is a nice explanation of bilateral filter at this link : Bilateral Filtering.

But the main problem is that, it takes more time than other filters. 


Regards,
ARK

Smoothing Techniques in OpenCV

Report "Smoothing Techniques in OpenCV"

Are you sure you want to report this post for ?

Cancel
×