---
title: CIRectangleFeature
framework: coreimage
role: symbol
role_heading: Class
path: coreimage/cirectanglefeature
---

# CIRectangleFeature

Information about a rectangular region detected in a still or video image.

## Declaration

```swift
class CIRectangleFeature
```

## Overview

Overview note: In macOS 10.13, iOS 11, and tvOS 11 or later, the Vision framework replaces these classes for identifying and analyzing image features. See VNDetectFaceRectanglesRequest) A detected rectangle feature is not necessarily rectangular in the plane of the image; rather, the feature identifies a shape that may be rectangular in space (for example a book on a desk) but which appears as a four-sided polygon in the image. The properties of a CIRectangleFeature object identify its four corners in image coordinates. You can use rectangle feature detection together with the CIPerspectiveCorrection filter to transform the feature to a normal orientation. To detect rectangles in an image or video, choose CIDetectorTypeRectangle when initializing a CIDetector object, and use the CIDetectorAspectRatio and CIDetectorFocalLength options to specify the approximate shape of rectangular features to search for. The detector returns at most one rectangle feature, the most prominent found in the image.

## Topics

### Locating a Detected Feature

- [bounds](coreimage/cirectanglefeature/bounds-swift.property.md)

### Identifying the Corners of a Detected Rectangle

- [bottomLeft](coreimage/cirectanglefeature/bottomleft-swift.property.md)
- [bottomRight](coreimage/cirectanglefeature/bottomright-swift.property.md)
- [topLeft](coreimage/cirectanglefeature/topleft-swift.property.md)
- [topRight](coreimage/cirectanglefeature/topright-swift.property.md)

## Relationships

### Inherits From

- [CIFeature](coreimage/cifeature.md)

### Conforms To

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

## See Also

### Image Feature Detection

- [CIDetector](coreimage/cidetector.md)
- [CIFeature](coreimage/cifeature.md)
- [CIFaceFeature](coreimage/cifacefeature.md)
- [CITextFeature](coreimage/citextfeature.md)
- [CIQRCodeFeature](coreimage/ciqrcodefeature.md)
