# SpatialImgDetections

Similar to [ImgDetections](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/img_detections.md), but this
message includes XYZ coordinates of the detected objects as well.

## Examples of functionality

 * [Spatial Detection
   Network](https://docs.luxonis.com/software-v3/depthai/examples/spatial_detection_network/spatial_detection.md)

## Reference

### dai::SpatialImgDetections

Kind: class

SpatialImgDetections message. Carries detection results together with spatial location data

#### ImgDetectionsT < SpatialImgDetection > Base

Kind: enum

#### ~SpatialImgDetections()

Kind: function

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DatatypeEnum getDatatype()

Kind: function

Get the datatype of this specific message.

return: DatatypeEnum

#### DEPTHAI_SERIALIZE(SpatialImgDetections, Base::Buffer::sequenceNum, Base::Buffer::ts, Base::Buffer::tsDevice, detections,
transformation, segmentationMaskWidth, segmentationMaskHeight)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
