# image_output

Python API: `depthai_nodes.node.parsers.utils.image_output`

## Functions

### compute_image_output

```python
def compute_image_output(output_image: np.ndarray) -> np.ndarray:
```

Convert a model image tensor to an 8-bit image array.

Parameters

 * `output_image` (`np.ndarray`): CHW or HWC tensor, optionally preceded by a singleton batch dimension.

Returns

 * `np.ndarray`: A uint8 array with the same channel layout as the unbatched input. Values are min-max scaled to [0, 255];
   constant tensors become zero.

Raises

 * `ValueError`: If the tensor is not 3D after removing a singleton batch dimension.
