# scene

Python API: `depthai_nodes.node.measure_anything_detector.scene`

DepthAI message conversion into the frozen MeasureAnything computation types.

## Classes

| Name | Description |
| --- | --- |
| [`SceneInputError`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/measure_anything_detector/scene.md#scene-Classes-SceneInputError) | A source frame is incomplete or cannot satisfy the calibrated scene contract. |

### exception `SceneInputError`

```python
class SceneInputError(ValueError)
```

A source frame is incomplete or cannot satisfy the calibrated scene contract.

Attributes

| Name | Description |
| --- | --- |
| `code` |  |

Methods

| Name | Description |
| --- | --- |
| [`__init__`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/measure_anything_detector/scene.md#scene-Classes-SceneInputError-__init__) |  |

#### method `__init__`

```python
def __init__(code: str)
```

## Functions

| Name | Description |
| --- | --- |
| [`prepare_scene`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/measure_anything_detector/scene.md#scene-Functions-prepare_scene) | Decode finite millimeter XYZ and RGB/mono images on their calibrated grids. |

### function `prepare_scene`

```python
def prepare_scene(
    pointCloud: dai.PointCloudData,
    color: dai.ImgFrame,
    left: dai.ImgFrame,
    right: dai.ImgFrame,
    supportPlane: SupportPlane,
) -> Scene
```

Decode finite millimeter XYZ and RGB/mono images on their calibrated grids.

Color input accepts NV12 and native 8-bit RGB/BGR layouts. Mono views accept GRAY8 or RAW8. DepthAI's `getCvFrame` handles the
delivered row layout and returns BGR for color, which is converted to RGB before algorithm invocation. Calibration comes from each
message's `ImgTransformation`, including crop/scale intrinsics, distortion, and pose in millimeters. XYZ must already occupy the
common calibration reference frame, as ordinary native DEFAULT point clouds with an identity custom transform do. The supplied
supportPlane uses those same coordinates. The views need not share image grids or be the exact inputs used to generate the cloud.
They must capture the same scene interval and carry calibration for their actual pixels, including any rectification, crop, or
scale. No image resize or point filtering occurs here.
