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.
- Define a
- Erode the
- Show the image.
Everything was clear?
Start learning today and achieve
- Learn with Step-by-Step Lessons.
- Get Ready for Real-World Projects.
- Earn a Certificate Upon Completion.