---
title: "init(id:image:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/photogrammetrysample/init(id:image:)"
---

# init(id:image:)

Creates a new sample.

## Declaration

```swift
init(id: Int, image: CVPixelBuffer)
```

## Parameters

- `id`: A unique identifier for the sample. This id must be in the domain [0, 2147483647].
- `image`: The image data in one of the following formats: doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_32BGRA doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_32ARGB
