DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.

ON THIS PAGE

  • Reference

PointCloudData

PointCloudData encapsulates 3D spatial information, representing a collection of points in a 3D space. Each point within the point cloud has its own position (X, Y, Z coordinates). PointCloudData is used to represent the output of PointCloud nodes and can be used to perform a variety of spatial analysis and reconstruction tasks.Setter methods are only used to provide metadata to the PointCloudData message (will be used for recording and replaying point clouds).

Reference

The detailed API for PointCloudData offers control over the generation, manipulation, and retrieval of 3D point cloud data.

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

Need assistance?

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