> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/sensor-setup/orbbec-depth-cameras/orbbec-depth-file-format.md).

# Orbbec depth file format

Read the depth .zip file that iMotions Lab records from an Orbbec Gemini camera in your own scripts, from its calibration entry to the depth images.

When you record with an [Orbbec Gemini camera](https://help.imotions.com/lab/sensor-setup/orbbec-depth-cameras.md), iMotions Lab saves the depth images in a `.zip` file with the same name as the video. This article describes the entries in that file for readers who process the depth data in their own scripts.

## Entries

| Entry                     | Content                                                                                              |
| ------------------------- | ---------------------------------------------------------------------------------------------------- |
| `calibration.json`        | The first entry. The camera, the stream settings and the calibration needed to use the depth images. |
| `00000033`, `00000067`, … | One depth image per video frame.                                                                     |

## Depth images

| Property     | Value                                                                                                                                                                       |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Entry name   | The time of the paired video frame in milliseconds from the start of the recording, rounded and padded with zeros to eight digits. Sort the entries by their numeric value. |
| Size         | The same width and height as the video, given in `storedDepthProfile` in `calibration.json`.                                                                                |
| Pixel layout | Width × height unsigned 16-bit little-endian values, row by row from the top left, with no header.                                                                          |
| Value        | Multiply by `depthValueScaleMm` to get the distance in millimeters. 0 means that the camera measured no depth at that pixel.                                                |
| Alignment    | Aligned to the color image, so the depth pixel at (x, y) belongs to the video pixel at (x, y).                                                                              |
| Mirroring    | Mirrored in the same way as the video when **Flip Image** is selected for the camera.                                                                                       |

## calibration.json

The file is JSON. It describes the camera and streams at the start of the recording.

| Field                   | Type           | Description                                                                                                                                         |
| ----------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `schemaVersion`         | integer        | Version of the file layout. The current version is 2.                                                                                               |
| `device`                | object         | The camera: `name`, `serialNumber` and `firmwareVersion`.                                                                                           |
| `alignMode`             | string         | How the depth images were aligned before they were stored. `D2C_SW` means that the depth images were reprojected onto the color camera in software. |
| `flipHorizontal`        | boolean        | Whether the stored color and depth images are mirrored left to right.                                                                               |
| `flipVertical`          | boolean        | Whether the stored color and depth images are mirrored top to bottom.                                                                               |
| `depthValueScaleMm`     | number         | Millimeters per raw depth unit.                                                                                                                     |
| `colorProfile`          | stream profile | The color stream as delivered by the camera.                                                                                                        |
| `depthProfile`          | stream profile | The depth stream as delivered by the camera, before alignment.                                                                                      |
| `storedDepthProfile`    | stream profile | The depth images as stored in the file.                                                                                                             |
| `colorIntrinsics`       | intrinsics     | Color camera intrinsics at the color resolution.                                                                                                    |
| `colorDistortion`       | distortion     | Color camera lens distortion.                                                                                                                       |
| `depthIntrinsics`       | intrinsics     | Depth camera intrinsics at the resolution of `depthProfile`.                                                                                        |
| `depthDistortion`       | distortion     | Depth camera lens distortion.                                                                                                                       |
| `storedDepthIntrinsics` | intrinsics     | Intrinsics for converting a stored depth pixel into a 3D point. Mirrored along with the images when `flipHorizontal` or `flipVertical` is true.     |
| `depthToColorExtrinsic` | extrinsic      | Transform from the depth camera to the color camera.                                                                                                |

The object types have these fields:

| Type           | Fields                                                                                                                   |
| -------------- | ------------------------------------------------------------------------------------------------------------------------ |
| stream profile | `width` and `height` in pixels, `fps` and `format`, the Orbbec SDK pixel format name.                                    |
| intrinsics     | `fx`, `fy`, `cx` and `cy` in pixels, and the `width` and `height` they apply to.                                         |
| distortion     | Brown-Conrady coefficients `k1` to `k6`, `p1` and `p2`.                                                                  |
| extrinsic      | `rotation`, a 3×3 rotation matrix as nine numbers in row-major order, and `translationMm`, three numbers in millimeters. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/sensor-setup/orbbec-depth-cameras/orbbec-depth-file-format.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
