<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIDetectorAspectRatio",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:@CIDetectorAspectRatio"
  },
  "title" : "CIDetectorAspectRatio"
}
-->

# CIDetectorAspectRatio

An option specifying the aspect ratio (width divided by height) of rectangles to search for.

```
let CIDetectorAspectRatio: String
```

## Discussion

The value of this key is an <doc://com.apple.documentation/documentation/Foundation/NSNumber> object whose value is a positive floating-point number. Use this option with the [`CIDetectorTypeRectangle`](/documentation/CoreImage/CIDetectorTypeRectangle) detector type to fine-tune the accuracy of the detector. For example, to more accurately find a business card (3.5 x 2 inches) in an image, specify an aspect ratio of `1.75` (3.5 / 2).

---

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)