- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Blurring an image using the OpenCV function medianBlur()
In this program, we will blur the image using the medianBlur() function in the OpenCV library. The median blurring helps to process the edges in an image while removing the noise.
Original Image
Algorithm
Step 1: Import cv2. Step 2: Read the image. Step 3: Pass image and kernel size in the cv2.medianblur() function. Step 4: Display the image.
Example Code
import cv2 image = cv2.imread("testimage.jpg") image = cv2.medianBlur(image, 7) cv2.imshow("medianblur", image)
Output
Advertisements