One Logo Pool Ball
Vision · IOS API REFERENCE

TrajectoryObservation

struct · iOS 18.0+ · SDK 27.1

struct TrajectoryObservation

An observation that describes a detected trajectory.

Members (10)

get · iOS 18.0+

confidence

TypeScript
get confidence(): number
Swift declaration
let confidence: Float

The level of confidence normalized to `[0, 1]` where `1` is most confident. The only exception is results coming from `CoreMLRequest`, where confidence values are forwarded as is from relevant CoreML models

get · iOS 18.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 18.0+

detectedPoints

TypeScript
get detectedPoints(): Array<NormalizedPoint>
Swift declaration
let detectedPoints: [NormalizedPoint]

The centroid points of the detected contour along the trajectory. The detected points may differ slightly from the ideal trajectory because they fall within the allowed tolerance. The system limits the maximum number of points based on the maximum trajectory length set in the request.

get · iOS 18.0+

projectedPoints

TypeScript
get projectedPoints(): Array<NormalizedPoint>
Swift declaration
let projectedPoints: [NormalizedPoint]

The centroids of the calculated trajectory from the detected points. The projected points define the ideal trajectory described by the parabolic equation. The equation’s coefficients and the projected points of the detected trajectory get refined over time. The system limits the maximum number of cached points to the maximum points needed to describe the trajectory together with the parabolic equation.

get · iOS 18.0+

movingAverageRadius

TypeScript
get movingAverageRadius(): number
Swift declaration
let movingAverageRadius: CGFloat

The moving average radius of the object the request is tracking.

get · iOS 18.0+

equationCoefficients

TypeScript
get equationCoefficients(): SDKHandle
Swift declaration
let equationCoefficients: simd_float3

The coefficients of the parabolic equation. This equation describes the parabola on which the detected contour is traveling. The equation and the projected points get refined over time.

get · iOS 18.0+

originatingRequestDescriptor

TypeScript
get originatingRequestDescriptor(): (RequestDescriptor) | null
Swift declaration
let originatingRequestDescriptor: RequestDescriptor?

The descriptor of the request that produced the observation.

get · iOS 18.0+

uuid

TypeScript
get uuid(): string
Swift declaration
let uuid: UUID

The unique identifier for the observation.

get · iOS 18.0+

timeRange

TypeScript
get timeRange(): (_CoreMedia_CMTimeRange) | null
Swift declaration
let timeRange: CMTimeRange?

The time range of the reported observation. When evaluating a sequence of image buffers, use this property to determine each observation’s start time and duration.

init · iOS 18.0+

init

TypeScript
static init(observation: VNTrajectoryObservation): TrajectoryObservation
Swift declaration
init(_ observation: VNTrajectoryObservation)

Skipped declarations

No declarations were skipped in this snapshot.

All Vision types →