Python OpenCV
About Lesson

In this Python OpenCV we are going to learn Python OpenCV Image Blurring or we can say average blurring in OpenCV, image blurring or image smoothing is used for removing image noise and it is used for removing high frequency contents like noise and edges. according to documentation there are four types of blurring techniques in OpenCV.



Average Blurring

In average blurring we takes the average of all pixels under the kernel area and replace them with central element with this average. and this is done in opencv by using cv2.blur() function.



This is the complete code for this lesson.




In here we have used cv2.blur() for the blurring, we need to give the image and kernel size as parameter, you can change the kernel size as you want.




Also in here we are going to convert our color space from BGR to RGB, because we want to show our image in Matplotlib and Matplotlib uses RGB system and OpenCV uses BGR color system, by this reason we need to covnert the color space.




Run the complete code and this is the result.

Python OpenCV Image Blurring
Python OpenCV Image Blurring