<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImage/MorphologyOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate6vImageO19MorphologyOperationO"
  },
  "title" : "vImage.MorphologyOperation"
}
-->

# vImage.MorphologyOperation

Describes which morphology operation to perform.

```
enum MorphologyOperation<ComponentType>
```

## Topics

### Enumeration Cases

[`case dilate(structuringElement: vImage.ConvolutionKernel2D<ComponentType>)`](/documentation/Accelerate/vImage/MorphologyOperation/dilate(structuringElement:))

Applies dilation using a structuring element.

[`case erode(structuringElement: vImage.ConvolutionKernel2D<ComponentType>)`](/documentation/Accelerate/vImage/MorphologyOperation/erode(structuringElement:))

Applies erosion using a structuring element.

[`case maximize(kernelSize: vImage.Size)`](/documentation/Accelerate/vImage/MorphologyOperation/maximize(kernelSize:))

Maximizes using an implicit kernel of a specified size.

[`case minimize(kernelSize: vImage.Size)`](/documentation/Accelerate/vImage/MorphologyOperation/minimize(kernelSize:))

Minimizes using an implicit kernel of a specified size.

### Instance Properties

[`var structuringElement: vImage.ConvolutionKernel2D<ComponentType>?`](/documentation/Accelerate/vImage/MorphologyOperation/structuringElement)

The dilation or erosion structuring element.

[`var height: vImagePixelCount`](/documentation/Accelerate/vImage/MorphologyOperation/height)

The height of the morphology kernel.

[`var width: vImagePixelCount`](/documentation/Accelerate/vImage/MorphologyOperation/width)

The width of the morphology kernel.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)