---
title: VNDetectRectanglesRequest
framework: vision
role: symbol
role_heading: Class
path: vision/vndetectrectanglesrequest
---

# VNDetectRectanglesRequest

An image-analysis request that finds projected rectangular regions in an image.

## Declaration

```swift
class VNDetectRectanglesRequest
```

## Overview

Overview A rectangle detection request locates regions of an image with rectangular shape, like credit cards, business cards, documents, and signs. The request returns its observations in the form of VNRectangleObservation objects, which contain normalized coordinates of bounding boxes containing the rectangle. Use this type of request to find the bounding boxes of rectangles in an image. Vision returns observations for rectangles found in all orientations and sizes, along with a confidence level to indicate how likely it’s that the observation contains an actual rectangle. To further configure or restrict the types of rectangles found, set properties on the request specifying a range of aspect ratios, sizes, and quadrature tolerance.

## Topics

### Configuring Detection

- [minimumAspectRatio](vision/vndetectrectanglesrequest/minimumaspectratio.md)
- [maximumAspectRatio](vision/vndetectrectanglesrequest/maximumaspectratio.md)
- [VNAspectRatio](vision/vnaspectratio.md)
- [quadratureTolerance](vision/vndetectrectanglesrequest/quadraturetolerance.md)
- [VNDegrees](vision/vndegrees.md)
- [minimumSize](vision/vndetectrectanglesrequest/minimumsize.md)
- [minimumConfidence](vision/vndetectrectanglesrequest/minimumconfidence.md)
- [VNConfidence](vision/vnconfidence.md)
- [maximumObservations](vision/vndetectrectanglesrequest/maximumobservations.md)

### Accessing the Results

- [results](vision/vndetectrectanglesrequest/results.md)
- [VNRectangleObservation](vision/vnrectangleobservation.md)

### Identifying Request Revisions

- [VNDetectRectanglesRequestRevision1](vision/vndetectrectanglesrequestrevision1.md)

## Relationships

### Inherits From

- [VNImageBasedRequest](vision/vnimagebasedrequest.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
