<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/DetectContoursRequest/maximumImageDimension",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision21DetectContoursRequestV21maximumImageDimensionSivp"
  },
  "title" : "maximumImageDimension"
}
-->

# maximumImageDimension

The maximum image dimension to use for contour detection.

```
var maximumImageDimension: Int
```

## Discussion

Contour detection is computationally intensive. To improve performance, the framework scales the input image down, while maintaining its aspect ratio, such that its maximum dimension is the value of this property. The framework never scales the image up, so specifying the maximum value ensures that the image processes in its original size and not as a downscaled version.

This minimum value supported is `64`. The default value is `512`.

---

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)