# ImgAnnotations

ImgAnnotations stores overlays that can be rendered on top of an
[ImgFrame](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/img_frame.md). Each annotation can describe
vector primitives—points, line segments, polylines, bounding boxes, or text labels—along with styling information such as color
and thickness. The message is produced by nodes that enrich frames with additional context (for example, tracker overlays) and can
also be composed on the host before sending the data back to the device.

Use ImgAnnotations together with the
[ImageManip](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/image_manip.md) or
[Script](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/script.md) nodes to draw diagnostics or user
interface elements directly on the device output. On the host, you can iterate through the annotation list to render them with
OpenCV or other visualization libraries.

## Reference

### dai::ImgAnnotations

Kind: class

ImgAnnotations message. Carries annotations for an image.

#### std::vector< ImgAnnotation > annotations

Kind: variable

Transform .

#### std::optional< ImgTransformation > transformation

Kind: variable

#### ImgAnnotations()

Kind: function

Construct ImgAnnotations message.

#### ImgAnnotations(std::vector< ImgAnnotation > annotations)

Kind: function

#### ~ImgAnnotations()

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(ImgAnnotations, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, annotations, transformation)

Kind: function

### Need assistance?

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