One Logo Pool Ball
Vision · IOS API REFERENCE

DetectTrajectoriesRequest

class · iOS 18.0+ · SDK 27.1

final class DetectTrajectoriesRequest

An image analysis request that determines the horizon angle in an image.

Members (17)

get · iOS 18.0+

descriptor

TypeScript
get descriptor(): RequestDescriptor
Swift declaration
final var descriptor: RequestDescriptor { get }

An enum that identifies the request and request revision.

get · iOS 18.0+

targetFrameTime

TypeScript
get targetFrameTime(): _CoreMedia_CMTime
Swift declaration
final var targetFrameTime: CMTime { get set }

The requested target frame time for processing trajectory detection. Use this property value for real-time processing of frames, which requires execution within a specific amount of time. The request evaluates from frame-to-frame. If processing takes longer than the targeted time for the current frame, it attempts to decrease the overall time by reducing the accuracy (down to a set minimum) for the next frame. If a frame takes less time than the targeted time, the request increases the accuracy (up to a set maximum) of the next frame. The default value is indefinite, which indicates that accuracy stays at the predefined maximum.

set · iOS 18.0+

targetFrameTime

TypeScript
set targetFrameTime(value: _CoreMedia_CMTime)
Swift declaration
final var targetFrameTime: CMTime { get set }

The requested target frame time for processing trajectory detection. Use this property value for real-time processing of frames, which requires execution within a specific amount of time. The request evaluates from frame-to-frame. If processing takes longer than the targeted time for the current frame, it attempts to decrease the overall time by reducing the accuracy (down to a set minimum) for the next frame. If a frame takes less time than the targeted time, the request increases the accuracy (up to a set maximum) of the next frame. The default value is indefinite, which indicates that accuracy stays at the predefined maximum.

get · iOS 18.0+

regionOfInterest

TypeScript
get regionOfInterest(): NormalizedRect
Swift declaration
final var regionOfInterest: NormalizedRect { get set }

The region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.

set · iOS 18.0+

regionOfInterest

TypeScript
set regionOfInterest(value: NormalizedRect)
Swift declaration
final var regionOfInterest: NormalizedRect { get set }

The region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.

method · iOS 18.0+

setComputeDevice

TypeScript
setComputeDevice(computeDevice: (_CoreML_MLComputeDevice) | null, computeStage: ComputeStage): void
Swift declaration
final func setComputeDevice(_ computeDevice: MLComputeDevice?, for computeStage: ComputeStage)

Assigns a compute device for a compute stage. If the parameter `computeDevice` is `nil`, the framework removes any explicit compute device assignment and allows the framework to select the device. Configure any compute device for a given compute stage. When performing a request, the system makes a validity check. Use `supportedComputeStageDevices` to get valid compute devices for a request’s compute stages. - Parameters: - `computeDevice: `The compute device to assign to the compute stage. - `computeStage: `The compute stage.

get · iOS 18.0+

trajectoryLength

TypeScript
get trajectoryLength(): number
Swift declaration
final let trajectoryLength: Int

The number of points to detect before calculating a trajectory.

init · iOS 18.0+

init

TypeScript
static init(trajectoryLength: number, revision?: (DetectTrajectoriesRequest_Revision) | null, frameAnalysisSpacing?: (_CoreMedia_CMTime) | null): DetectTrajectoriesRequest
Swift declaration
init(trajectoryLength: Int, _ revision: DetectTrajectoriesRequest.Revision? = nil, frameAnalysisSpacing: CMTime? = nil)

- Parameters: - trajectoryLength: The number of points required to analyze to determine that a shape follows a parabolic path. This argument value must be at least 5. - revision: The specific algorithm or implementation revision that's used to perform the request. - frameAnalysisSpacing: The duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. By default all frames will be analyzed.

get · iOS 18.0+

supportedRevisions

TypeScript
static get supportedRevisions(): Array<DetectTrajectoriesRequest_Revision>
Swift declaration
static let supportedRevisions: [DetectTrajectoriesRequest.Revision]

The collection of currently-supported revisions for `DetectTrajectoriesRequest `.

get · iOS 18.0+

frameAnalysisSpacing

TypeScript
get frameAnalysisSpacing(): _CoreMedia_CMTime
Swift declaration
final let frameAnalysisSpacing: CMTime

The reciprocal of maximum rate at which buffers will be processed. The request will not process buffers that fall within the `frameAnalysisSpacing` since the previously performed analysis. The analysis is not done by wall time but by analysis of of the time stamps of the samplebuffers being processed.

get · iOS 18.0+

minimumLatencyFrameCount

TypeScript
get minimumLatencyFrameCount(): number
Swift declaration
final var minimumLatencyFrameCount: Int { get }

The minimum number of frames that the request has to process on before reporting back any observation. This information is provided by the request once initialized with its required paramters. Video-based requests often need a minimum number of frames before they can report back any observation. An example would be that a movement detection requires at least 5 frames to be detected. The `minimumLatencyFrameCount` for that request would report 5 and only after 5 frames have been processed an observation would be returned in the results. This latency is indicative of how responsive a request is in respect to the incoming data.

get · iOS 18.0+

supportedComputeStageDevices

TypeScript
get supportedComputeStageDevices(): NativeMap<ComputeStage, Array<_CoreML_MLComputeDevice>>
Swift declaration
final var supportedComputeStageDevices: [ComputeStage : [MLComputeDevice]] { get }
get · iOS 18.0+

objectMaximumNormalizedRadius

TypeScript
get objectMaximumNormalizedRadius(): number
Swift declaration
final var objectMaximumNormalizedRadius: Float { get set }

The maximum radius of the bounding circle of the object to track.

set · iOS 18.0+

objectMaximumNormalizedRadius

TypeScript
set objectMaximumNormalizedRadius(value: number)
Swift declaration
final var objectMaximumNormalizedRadius: Float { get set }

The maximum radius of the bounding circle of the object to track.

get · iOS 18.0+

objectMinimumNormalizedRadius

TypeScript
get objectMinimumNormalizedRadius(): number
Swift declaration
final var objectMinimumNormalizedRadius: Float { get set }

The minimum radius of the bounding circle of the object to track.

set · iOS 18.0+

objectMinimumNormalizedRadius

TypeScript
set objectMinimumNormalizedRadius(value: number)
Swift declaration
final var objectMinimumNormalizedRadius: Float { get set }

The minimum radius of the bounding circle of the object to track.

get · iOS 18.0+

revision

TypeScript
get revision(): DetectTrajectoriesRequest_Revision
Swift declaration
final let revision: DetectTrajectoriesRequest.Revision

Skipped declarations

No declarations were skipped in this snapshot.

All Vision types →