Fundamental operations

Mathematical morphology is a set of non-linear operations and techniques related to the shape or features of an image. There are two base elements of image morphology:

  • A binary, or grayscale, image
  • The structuring element

We have already discussed the prerequisites regarding image and color scheme, but the structuring element is new to us. The structuring element is usually a 3x3 binary block that slides over the image and updates it. There are two fundamental operations achieved by sliding the structuring element:

  • Image erosion: Removes pixels from object boundaries
  • Image dilation: Adds pixels to the borders of objects in an image
At the time of writing, erode and dilate from the ImageMorphology package support  ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.