descriptor
TypeScriptget descriptor(): RequestDescriptorSwift declarationfinal var descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
class · iOS 18.0+ · SDK 27.1
final class TrackOpticalFlowRequestThis request generates an OpticalFlowObservation object that describes the directional change from image to image. The request works at the pixel level, so both images needs to have the same dimensions to successfully perform the request.
get descriptor(): RequestDescriptorSwift declarationfinal var descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
get regionOfInterest(): NormalizedRectSwift declarationfinal 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 regionOfInterest(value: NormalizedRect)Swift declarationfinal 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.
setComputeDevice(computeDevice: (_CoreML_MLComputeDevice) | null, computeStage: ComputeStage): voidSwift declarationfinal 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.
static get supportedRevisions(): Array<TrackOpticalFlowRequest_Revision>Swift declarationstatic let supportedRevisions: [TrackOpticalFlowRequest.Revision]The collection of currently-supported revisions for `TrackOpticalFlowRequest`.
get computationAccuracy(): TrackOpticalFlowRequest_ComputationAccuracySwift declarationfinal var computationAccuracy: TrackOpticalFlowRequest.ComputationAccuracy { get set }set computationAccuracy(value: TrackOpticalFlowRequest_ComputationAccuracy)Swift declarationfinal var computationAccuracy: TrackOpticalFlowRequest.ComputationAccuracy { get set }get frameAnalysisSpacing(): _CoreMedia_CMTimeSwift declarationfinal let frameAnalysisSpacing: CMTimeThe 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 outputPixelFormatType(): SDKHandleSwift declarationfinal var outputPixelFormatType: OSType { get set }The desired pixel format type of the observation. The default is `kCVPixelFormatType_TwoComponent32Float`.
set outputPixelFormatType(value: SDKHandle)Swift declarationfinal var outputPixelFormatType: OSType { get set }The desired pixel format type of the observation. The default is `kCVPixelFormatType_TwoComponent32Float`.
get supportedOutputPixelFormatTypes(): Array<SDKHandle>Swift declarationfinal var supportedOutputPixelFormatTypes: [OSType] { get }The collection of supported pixel format types.
get revision(): TrackOpticalFlowRequest_RevisionSwift declarationfinal let revision: TrackOpticalFlowRequest.RevisionThe request's configured revision.
static init(revision?: (TrackOpticalFlowRequest_Revision) | null, frameAnalysisSpacing?: (_CoreMedia_CMTime) | null): TrackOpticalFlowRequestSwift declarationinit(_ revision: TrackOpticalFlowRequest.Revision? = nil, frameAnalysisSpacing: CMTime? = nil)No declarations were skipped in this snapshot.