---
title: "detection(for:)"
framework: cinematic
role: symbol
role_heading: Instance Method
path: "cinematic/cnscript-1ispe/frame/detection(for:)"
---

# detection(for:)

The detection in the frame with the given detection ID, if any.

## Declaration

```swift
func detection(for detectionID: CNDetectionID) -> CNDetection?
```

## Parameters

- `detectionID`: The detection ID for the detection.

## Return Value

Return Value A detection for the frame with the given detection ID.
