# utils

Python API: `depthai_nodes.message.utils`

Message-copying strategies and detection geometry helpers.

## Child Pages

 * [detection_utils](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/message/utils/detection_utils.md)

## Functions

### copy_message

```python
def copy_message(msg: dai.Buffer) -> dai.Buffer:
```

Copy a DepthAI message using the first supported copying strategy.

Prefer the message's native `copy()` method, then the supported custom message copiers, and finally `copy.deepcopy`. Buffer
ownership follows the selected strategy; native copies may share underlying pixel storage.

Parameters

 * `msg` (`dai.Buffer`): Message to copy.

Returns

 * `dai.Buffer`: A copy of the input message.

Raises

 * `TypeError`: If no copying strategy supports the message type.
