Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Erode Images | Image Processing
Fundamentals of Image Manipulation with Python
course content

Cursusinhoud

Fundamentals of Image Manipulation with Python

book
Erode Images

Another important function the OpenCV library provides is cv2.erode(), used to erode away the boundaries of foreground objects in images, similar to how soil erosion removes soil. This method is especially useful for binary images.

It requires two inputs: the original image and a structuring element or kernel, which determines the nature of the operation. A pixel in the original image will only remain a foreground pixel (set to 1) if all the pixels under the kernel are also 1; otherwise, it is set to 0, effectively eroding the boundary.

Taak

Swipe to start coding

  1. Define a 15x15 kernel.
  2. Erode the image stored in the image1 variable.

Oplossing

Mark tasks as Completed
Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 6
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?
some-alt