---
title: CIDetector
framework: coreimage
role: symbol
role_heading: Class
path: coreimage/cidetector
---

# CIDetector

An image processor that identifies notable features, such as faces and barcodes, in a still image or video.

## Declaration

```swift
class CIDetector
```

## 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 VNRequest. A CIDetector object uses image processing to search for and identify notable features (faces, rectangles, and barcodes) in a still image or video. Detected features are represented by CIFeature objects that provide more information about each feature. This class can maintain many state variables that can impact performance. So for best performance, reuse CIDetector instances instead of creating new ones.

## Topics

### Creating a Detector Object

- [init(ofType:context:options:)](coreimage/cidetector/init(oftype:context:options:).md)

### Using a Detector Object to Find Features

- [features(in:)](coreimage/cidetector/features(in:).md)
- [features(in:options:)](coreimage/cidetector/features(in:options:).md)

### Constants

- [Detector Types](coreimage/detector-types.md)
- [Detector Configuration Keys](coreimage/detector-configuration-keys.md)
- [Detector Accuracy Options](coreimage/detector-accuracy-options.md)
- [Feature Detection Keys](coreimage/feature-detection-keys.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.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

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