<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Cinematic",
  "identifier" : "/documentation/Cinematic/CNCustomDetectionTrack-9a2zo/init(detections:smooth:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Cinematic"
    ],
    "preciseIdentifier" : "s:9Cinematic22CNCustomDetectionTrackC10detections6smoothACSayAA11CNDetectionVG_Sbtcfc"
  },
  "title" : "init(detections:smooth:)"
}
-->

# init(detections:smooth:)

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

```
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.

---

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)