<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIDetector",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIDetector"
  },
  "title" : "CIDetector"
}
-->

# CIDetector

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

```
class CIDetector
```

## Overview> Note:
> In macOS 10.13, iOS 11, and tvOS 11 or later, the <doc://com.apple.documentation/documentation/Vision> framework replaces these classes for identifying and analyzing image features. See <doc://com.apple.documentation/documentation/Vision/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`](/documentation/CoreImage/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:)`](/documentation/CoreImage/CIDetector/init(ofType:context:options:))

Creates and returns a configured detector.

### Using a Detector Object to Find Features

[`features(in:)`](/documentation/CoreImage/CIDetector/features(in:))

Searches for features in an image.

[`features(in:options:)`](/documentation/CoreImage/CIDetector/features(in:options:))

Searches for features in an image based on the specified image orientation.

### Constants

[Detector Types](/documentation/CoreImage/detector-types)

Strings used to declare the detector for which you are interested.

[Detector Configuration Keys](/documentation/CoreImage/detector-configuration-keys)

Keys used in the options dictionary to configure a detector.

[Detector Accuracy Options](/documentation/CoreImage/detector-accuracy-options)

Value options used to specify the desired accuracy of the detector.

[Feature Detection Keys](/documentation/CoreImage/feature-detection-keys)

Keys used in the options dictionary for [`features(in:options:)`](/documentation/CoreImage/CIDetector/features(in:options:)).



---

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)