Course Content
Image Processing Project
Erode Images
The OpenCV
is a set of Python bindings created to assist with solving computer vision problems. One of the methods it provides is cv2.erode()
, which is used to perform erosion on an image. The concept behind erosion is similar to that of soil erosion in that it erodes away the boundaries of a foreground object. This method is typically used on binary images and takes two inputs: the original image and a structuring element or kernel that determines the nature of the operation. A pixel in the original image will only be considered a 1 if all the pixels under the kernel are also 1; otherwise, it is eroded or set to 0.
TaskCompleted
- Define a
kernel
of15x15
; - Erode the
"image1.jpg"
variable; - Show the image.
Everything was clear?
Section 1. Chapter 6