<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/TrackObjectRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision18TrackObjectRequestC"
  },
  "title" : "TrackObjectRequest"
}
-->

# TrackObjectRequest

An image analysis request that tracks the movement of a previously identified object across multiple images or video frames.

```
final class TrackObjectRequest
```

## Overview

Use this type of request to track the bounding boxes around objects previously identified in an image. Vision attempts to locate the same object from the input observation throughout the sequence. Each time the request runs, it produces a [`DetectedObjectObservation`](/documentation/Vision/DetectedObjectObservation) that holds the tracked object’s updated bounding box.

## Topics

### Creating a request

[`init(detectedObject: any BoundingBoxProviding & VisionObservation, TrackObjectRequest.Revision?, frameAnalysisSpacing: CMTime?)`](/documentation/Vision/TrackObjectRequest/init(detectedObject:_:frameAnalysisSpacing:))

Creates an object tracking request.

[`protocol BoundingBoxProviding`](/documentation/Vision/BoundingBoxProviding)

A protocol for objects that have a bounding box.

### Performing a request

[`func perform(on: URL, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-80bya)

Performs the request on an image URL and produces observations.

[`func perform(on: Data, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3f3f1)

Performs the request on image data and produces observations.

[`func perform(on: CGImage, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-qxxx)

Performs the request on a Core Graphics image and produces observations.

[`func perform(on: CVPixelBuffer, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-xspx)

Performs the request on a pixel buffer and produces observations.

[`func perform(on: CMSampleBuffer, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3hddl)

Performs the request on a Core Media buffer and produces observations.

[`func perform(on: CIImage, orientation: CGImagePropertyOrientation?) async throws -> Self.Result`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-85ex1)

Performs the request on a Core Image image and produces observations.

### Understanding the result

[`struct DetectedObjectObservation`](/documentation/Vision/DetectedObjectObservation)

An observation that provides the position and extent of an image feature that an image-analysis request detects.

### Configuring a request

[`let inputObservation: any BoundingBoxProviding & VisionObservation`](/documentation/Vision/TrackObjectRequest/inputObservation)

The object to track.

### Getting the revision

[`let revision: TrackObjectRequest.Revision`](/documentation/Vision/TrackObjectRequest/revision-swift.property)

The algorithm or implementation the request uses.

[`static let supportedRevisions: [TrackObjectRequest.Revision]`](/documentation/Vision/TrackObjectRequest/supportedRevisions)

The collection of revisions the request supports.

[`enum Revision`](/documentation/Vision/TrackObjectRequest/Revision-swift.enum)

A type that describes the algorithm or implementation that the request performs.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`VisionRequest`](/documentation/Vision/VisionRequest)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`ImageProcessingRequest`](/documentation/Vision/ImageProcessingRequest)

[`Sendable`](/documentation/Swift/Sendable)

[`StatefulRequest`](/documentation/Vision/StatefulRequest)

---

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)