<!--
{
  "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/DetectRectanglesRequest/maximumAspectRatio",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision23DetectRectanglesRequestV18maximumAspectRatioSfvp"
  },
  "title" : "maximumAspectRatio"
}
-->

# maximumAspectRatio

The largest aspect ratio the rectangle request detects.

```
var maximumAspectRatio: Float
```

## Discussion

The property’s value defaults to `1.0`, but you can set it to any value in the range `[0.0, 1.0]`.
You can use this value to choose specific rectangles in the detection like filtering out narrow
rectangles by excluding small aspect ratios, or setting a range of `0.95` to `1.0` to select mostly
squares.

---

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)