---
title: "init(detections:smooth:)"
framework: cinematic
role: symbol
role_heading: Initializer
path: "cinematic/cncustomdetectiontrack-9a2zo/init(detections:smooth:)"
---

# init(detections:smooth:)

Initializes a custom detection track object with an array of detections and optionally applying smoothing.

## Declaration

```swift
init(detections: [CNDetection], smooth applySmoothing: Bool)
```

## Parameters

- `detections`: An array of detections.
- `applySmoothing`: A flag that instructs the framework to apply a smoothing algorithm. The smoothing algorithm used, is the same that’s used for built-in detections during recording. It compensates for some amount of jitter in the disparity measure by smoothing out variability.
