---
title: capturePhoto()
framework: visionkit
role: symbol
role_heading: Instance Method
path: visionkit/datascannerviewcontroller/capturephoto()
---

# capturePhoto()

Captures a high-resolution photo of the camera’s live video.

## Declaration

```swift
@MainActor func capturePhoto() async throws -> UIImage
```

## Return Value

Return Value An image of the live video.
