# detection_utils

Python API: `depthai_nodes.message.utils.detection_utils`

## Functions

### compute_area

```python
def compute_area(detection: dai.ImgDetection | dai.SpatialImgDetection):
```

Computes the normalized area of a detection bounding box.

Parameters

 * `detection` (`dai.ImgDetection | dai.SpatialImgDetection`): Detection object to compute the area for. Can be of type
   dai.ImgDetection, or dai.SpatialImgDetection.

Returns

 * `float`: Normalized area (width * height) of the detection bounding box.
