此页面由 AI 自动翻译。查看英文原版
最后更新

本页目录

  • 保存和加载
  • 参考
Claude CodeCodexCursor
Luxonis 智能体工具包为你常用的编程智能体加载 Luxonis 上下文与技能,更快地基于 OAK 开发应用。
安装工具包

ImgAnnotations

最后更新
ImgAnnotations 存储可以渲染在 ImgFrame 顶部的叠加层。每个注释可以描述矢量图元——点、线段、折线、边界框或文本标签——以及样式信息,例如颜色和粗细。该消息由用附加上下文(例如,跟踪器叠加层)丰富帧的节点生成,也可以在主机上组合,然后将数据发送回设备。将 ImgAnnotations 与 ImageManip 或 Script 节点一起使用,可以直接在设备输出上绘制诊断或用户界面元素。在主机上,您可以遍历注释列表,使用 OpenCV 或其他可视化库渲染它们。

保存和加载

ImgAnnotations 消息可以使用 save() 保存到文件,并使用 load() 读回。保存的文件是二进制 protobuf 封装。有关用法,请参阅 消息 save 和 load 函数。

参考

class

dai::ImgAnnotations

#include ImgAnnotations.hpp
variable
std::vector< ImgAnnotation > annotations
variable
std::optional< ImgTransformation > transformation
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)
inline function
DatatypeEnum getDatatype()
Get the datatype of this specific message.
Returns
DatatypeEnum
function
DEPTHAI_SERIALIZE(ImgAnnotations, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, Buffer::tsSystem, annotations, transformation)

需要帮助?

请访问讨论论坛以获取技术支持或您可能有的任何其他问题。