<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhotogrammetrySample",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation20PhotogrammetrySampleV"
  },
  "title" : "PhotogrammetrySample"
}
-->

# PhotogrammetrySample

An object that represents one image and its corresponding metadata.

```
struct PhotogrammetrySample
```

## Overview

This object holds a single input image for constructing 3D objects from a
series of photographs, along with the image’s metadata, such as EXIF data or
information about a depth buffer, an object mask, or gravity vector.

Use a  unique [`id`](/documentation/RealityKit/PhotogrammetrySample/id) for each [`PhotogrammetrySession`](/documentation/RealityKit/PhotogrammetrySession) so RealityKit can distinguish different [`PhotogrammetrySample`](/documentation/RealityKit/PhotogrammetrySample)
instances in status updates, error messages, and other contexts.

## Topics

### Creating a sample

[`init(id:image:)`](/documentation/RealityKit/PhotogrammetrySample/init(id:image:))

Creates a new sample.

### Describing the sample

[`image`](/documentation/RealityKit/PhotogrammetrySample/image)

The image data for this sample.

[`metadata`](/documentation/RealityKit/PhotogrammetrySample/metadata)

An image’s EXIF metadata.

[`depthDataMap`](/documentation/RealityKit/PhotogrammetrySample/depthDataMap)

The image’s depth data.

[`gravity`](/documentation/RealityKit/PhotogrammetrySample/gravity)

An image’s gravity vector.

[`objectMask`](/documentation/RealityKit/PhotogrammetrySample/objectMask)

The image’s object mask.



---

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)