DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.
此页面由 AI 自动翻译。查看英文原版
最后更新

本页目录

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

PointCloudData

最后更新
PointCloudData 封装了 3D 空间信息,表示 3D 空间中的点集合。点云中的每个点都有自己的位置(X、Y、Z 坐标)。PointCloudData 用于表示 PointCloud 节点的输出,可用于执行各种空间分析和重建任务。Setter 方法仅用于向 PointCloudData 消息提供元数据(将用于记录和回放点云)。

参考

PointCloudData 的详细 API 提供了对 3D 点云数据的生成、操作和检索的控制。

Python

class

depthai.PointCloudData(depthai.Buffer)

method
method
getHeight(self) -> int: int
Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
method
getInstanceNum(self) -> int: int
Retrieves instance number
method
getMaxX(self) -> float: float
Retrieves maximal x coordinate in depth units (millimeter by default)
method
getMaxY(self) -> float: float
Retrieves maximal y coordinate in depth units (millimeter by default)
method
getMaxZ(self) -> float: float
Retrieves maximal z coordinate in depth units (millimeter by default)
method
getMinX(self) -> float: float
Retrieves minimal x coordinate in depth units (millimeter by default)
method
getMinY(self) -> float: float
Retrieves minimal y coordinate in depth units (millimeter by default)
method
getMinZ(self) -> float: float
Retrieves minimal z coordinate in depth units (millimeter by default)
method
method
getSequenceNum(self) -> int: int
Retrieves sequence number
method
getTimestamp(self) -> datetime.timedelta: datetime.timedelta
Retrieves timestamp related to dai::Clock::now()
method
getTimestampDevice(self) -> datetime.timedelta: datetime.timedelta
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
method
getWidth(self) -> int: int
Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
method
isSparse(self) -> bool: bool
Retrieves whether point cloud is sparse
method
setHeight(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData
Specifies frame height  Parameter ``height``:     frame height
method
setInstanceNum(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData
Instance number relates to the origin of the frame (which camera)  Parameter ``instance``:     Instance number
method
setMaxX(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData
Specifies maximal x coordinate in depth units (millimeter by default)  Parameter ``val``:     maximal x coordinate in depth units (millimeter by default)
method
setMaxY(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData
Specifies maximal y coordinate in depth units (millimeter by default)  Parameter ``val``:     maximal y coordinate in depth units (millimeter by default)
method
setMaxZ(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData
Specifies maximal z coordinate in depth units (millimeter by default)  Parameter ``val``:     maximal z coordinate in depth units (millimeter by default)
method
setMinX(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData
Specifies minimal x coordinate in depth units (millimeter by default)  Parameter ``val``:     minimal x coordinate in depth units (millimeter by default)
method
setMinY(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData
Specifies minimal y coordinate in depth units (millimeter by default)  Parameter ``val``:     minimal y coordinate in depth units (millimeter by default)
method
setMinZ(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData
Specifies minimal z coordinate in depth units (millimeter by default)  Parameter ``val``:     minimal z coordinate in depth units (millimeter by default)
method
setSequenceNum(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData
Specifies sequence number  Parameter ``seq``:     Sequence number
method
method
setTimestamp(self, arg0: datetime.timedelta) -> PointCloudData: PointCloudData
Retrieves image timestamp related to dai::Clock::now()
method
method
setWidth(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData
Specifies frame width  Parameter ``width``:     frame width
property
method

C++

class

dai::PointCloudData

#include PointCloudData.hpp
function
PointCloudData()
Construct PointCloudData message.
explicit function
PointCloudData(std::shared_ptr< RawPointCloudData > ptr)
function
~PointCloudData()
function
std::vector< Point3f > & getPoints()
function
unsigned int getInstanceNum()
Retrieves instance number
function
unsigned int getWidth()
Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
function
unsigned int getHeight()
Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
function
float getMinX()
Retrieves minimal x coordinate in depth units (millimeter by default)
function
float getMinY()
Retrieves minimal y coordinate in depth units (millimeter by default)
function
float getMinZ()
Retrieves minimal z coordinate in depth units (millimeter by default)
function
float getMaxX()
Retrieves maximal x coordinate in depth units (millimeter by default)
function
float getMaxY()
Retrieves maximal y coordinate in depth units (millimeter by default)
function
float getMaxZ()
Retrieves maximal z coordinate in depth units (millimeter by default)
function
bool isSparse()
Retrieves whether point cloud is sparse
function
PointCloudData & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Retrieves image timestamp related to dai::Clock::now()
function
PointCloudData & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
PointCloudData & setInstanceNum(unsigned int instance)
Instance number relates to the origin of the frame (which camera)
Parameters
  • instance: Instance number
function
PointCloudData & setSequenceNum(int64_t seq)
Specifies sequence number
Parameters
  • seq: Sequence number
function
PointCloudData & setWidth(unsigned int width)
Specifies frame width
Parameters
  • width: frame width
function
PointCloudData & setHeight(unsigned int height)
Specifies frame height
Parameters
  • height: frame height
function
PointCloudData & setSize(unsigned int width, unsigned int height)
Specifies frame size
Parameters
  • height: frame height
  • width: frame width
function
PointCloudData & setSize(std::tuple< unsigned int, unsigned int > size)
Specifies frame size
Parameters
  • size: frame size
function
PointCloudData & setMinX(float val)
Specifies minimal x coordinate in depth units (millimeter by default)
Parameters
  • val: minimal x coordinate in depth units (millimeter by default)
function
PointCloudData & setMinY(float val)
Specifies minimal y coordinate in depth units (millimeter by default)
Parameters
  • val: minimal y coordinate in depth units (millimeter by default)
function
PointCloudData & setMinZ(float val)
Specifies minimal z coordinate in depth units (millimeter by default)
Parameters
  • val: minimal z coordinate in depth units (millimeter by default)
function
PointCloudData & setMaxX(float val)
Specifies maximal x coordinate in depth units (millimeter by default)
Parameters
  • val: maximal x coordinate in depth units (millimeter by default)
function
PointCloudData & setMaxY(float val)
Specifies maximal y coordinate in depth units (millimeter by default)
Parameters
  • val: maximal y coordinate in depth units (millimeter by default)
function
PointCloudData & setMaxZ(float val)
Specifies maximal z coordinate in depth units (millimeter by default)
Parameters
  • val: maximal z coordinate in depth units (millimeter by default)
inline function
void getPclData()
function
int64_t getSequenceNum()
Retrieves sequence number
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()
Retrieves timestamp related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
struct

dai::PointCloudData::dependent_false

需要帮助?

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