---
title: rectOfInterest
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturemetadataoutput/rectofinterest
---

# rectOfInterest

A rectangle of interest for limiting the search area for visual metadata.

## Declaration

```swift
var rectOfInterest: CGRect { get set }
```

## Discussion

Discussion The value of this property is a CGRect value that determines the object’s rectangle of interest for each frame of video. The rectangle’s origin is top left and is relative to the coordinate space of the device providing the metadata. Specifying a rectangle of interest may improve detection performance for certain types of metadata.  Metadata objects whose bounds do not intersect with the rectOfInterest will not be returned. The default value of this property is a rectangle of (0.0, 0.0, 1.0, 1.0).

## See Also

### Configuring metadata capture

- [availableMetadataObjectTypes](avfoundation/avcapturemetadataoutput/availablemetadataobjecttypes.md)
- [metadataObjectTypes](avfoundation/avcapturemetadataoutput/metadataobjecttypes.md)
- [requiredMetadataObjectTypesForCinematicVideoCapture](avfoundation/avcapturemetadataoutput/requiredmetadataobjecttypesforcinematicvideocapture.md)
