ON THIS PAGE

  • ImgAnnotations
  • Reference

ImgAnnotations

ImgAnnotations stores overlays that can be rendered on top of an ImgFrame. 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 or Script 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

class

dai::ImgAnnotations

#include ImgAnnotations.hpp
variable
std::vector< ImgAnnotation > annotations
function
ImgAnnotations()
Construct ImgAnnotations message.
inline explicit function
ImgAnnotations(std::vector< ImgAnnotation > annotations)
function
~ImgAnnotations()
function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
function
DEPTHAI_SERIALIZE(ImgAnnotations, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, annotations)

Need assistance?

Head over to Discussion Forum for technical support or any other questions you might have.