O'Reilly logo

Learning Image Processing with OpenCV by Gloria Bueno García, Oscar Deniz Suarez, José Luis Espinosa Aranda, Jesus Salido Tercero, Ismael Serrano Gracia, Noelia Vállez Enano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Morphological operations

Morphological operations process images according to shapes. They apply a defined "structuring element" to an image, obtaining a new image where the pixels at positions (xi,yj) are computed by comparing the input pixel values at positions (xi,yj) and their neighborhoods. Depending on the structuring element selected, a morphological operation is more sensitive to one specific shape or the other.

The two basic morphological operations are dilation and erosion. Dilation adds pixels from the background to the boundaries of the objects in an image, while erosion removes pixels. Here is where the structuring element is taken into account to select the pixels that are to be added or deleted. In dilation, the value of the output ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required