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

本页目录

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

SpatialImgDetections

最后更新
与 ImgDetections 类似,但此消息还包含检测到的对象的 XYZ 坐标。

保存和加载

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

重映射

SpatialImgDetections 是可转换的,这意味着它可以重映射到另一个帧的坐标系中。有关详细信息,请参阅 重映射可转换消息。

功能示例

参考

class

dai::SpatialImgDetections

#include SpatialImgDetections.hpp
using
variable
LengthUnit unit
Length unit used by all imgDetections' spatialCoordinates in this list.
variable
std::optional< ImgTransformation > transformation
function
~SpatialImgDetections()
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
SpatialImgDetections transformTo(const ImgTransformation & target)
Returns a new SpatialImgDetections message with the spatial detections transformed into the target image transformation.For each detection, the bounding box is assumed to lie on a plane parallel to the image plane at depth detection.spatialCoordinates.z (that is, all four bounding-box corners are projected using the same depth value). The transformed corners are then fit with the smallest enclosing rotated rectangle to preserve rectangularity.
Parameters
  • target: Target image transformation.
Returns
SpatialImgDetections with transformed detections.
function
DEPTHAI_SERIALIZE(SpatialImgDetections, sequenceNum, ts, tsDevice, tsSystem, detections, transformation, segmentationMaskWidth, segmentationMaskHeight, unit)

需要帮助?

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