---
title: CNDetection
framework: cinematic
role: symbol
role_heading: Structure
path: cinematic/cndetection-swift.struct
---

# CNDetection

A structure that represents a detected subject, face, torso or pet at a particular time.

## Declaration

```swift
struct CNDetection
```

## Overview

Overview Specifies the type, distance bounds, and time of the detection. Detections obtained from the Cinematic script include a unique number that can tracks the detection over time. Some types of detections also include a unique group number that associates related detections (for example, the face and torso of the same person).

## Topics

### Initializers

- [init(time:detectionType:normalizedRect:focusDisparity:)](cinematic/cndetection-swift.struct/init(time:detectiontype:normalizedrect:focusdisparity:).md)

### Instance Properties

- [detectionGroupID](cinematic/cndetection-swift.struct/detectiongroupid.md)
- [detectionID](cinematic/cndetection-swift.struct/detectionid.md)
- [detectionType](cinematic/cndetection-swift.struct/detectiontype.md)
- [focusDisparity](cinematic/cndetection-swift.struct/focusdisparity.md)
- [normalizedRect](cinematic/cndetection-swift.struct/normalizedrect.md)
- [time](cinematic/cndetection-swift.struct/time.md)

### Type Methods

- [accessibilityLabel(for:)](cinematic/cndetection-swift.struct/accessibilitylabel(for:).md)
- [disparity(in:sourceDisparity:detectionType:priorDisparity:)](cinematic/cndetection-swift.struct/disparity(in:sourcedisparity:detectiontype:priordisparity:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Editing

- [Editing Spatial Audio with an audio mix](cinematic/editing-spatial-audio-with-an-audio-mix.md)
- [CNDecision](cinematic/cndecision-swift.struct.md)
- [CNDetectionTrack](cinematic/cndetectiontrack-2bxtd.md)
- [CNFixedDetectionTrack](cinematic/cnfixeddetectiontrack-93rrw.md)
- [CNCustomDetectionTrack](cinematic/cncustomdetectiontrack-9a2zo.md)
- [CNDetectionType](cinematic/cndetectiontype.md)
