---
title: OpticalFlowObservation
framework: vision
role: symbol
role_heading: Structure
path: vision/opticalflowobservation
---

# OpticalFlowObservation

An object that represents an optical flow that an image-analysis request produces.

## Declaration

```swift
struct OpticalFlowObservation
```

## Overview

Overview The optical flow is a 2D image, with each pixel representing the directional change from a previous to current image.

## Topics

### Creating an observation

- [init(_:)](vision/opticalflowobservation/init(_:).md)

### Inspecting an observation

- [pixelFormat](vision/opticalflowobservation/pixelformat.md)
- [size](vision/opticalflowobservation/size.md)

### Getting the optical flow

- [flow(at:)](vision/opticalflowobservation/flow(at:).md)

### Accessing the memory

- [withUnsafePointer(_:)](vision/opticalflowobservation/withunsafepointer(_:).md)

### Instance Properties

- [pixelBuffer](vision/opticalflowobservation/pixelbuffer.md)

## Relationships

### Conforms To

- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [VisionObservation](vision/visionobservation.md)
