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 forPointCloudData
offers control over the generation, manipulation, and retrieval of 3D point cloud data.Python
C++
Python
class
dai::PointCloudData
function
PointCloudData()
function
~PointCloudData()
function
std::vector< Point3f > getPoints()
function
std::vector< Point3fRGBA > getPointsRGB()
function
void setPoints(const std::vector< Point3f > & points)
function
void setPointsRGB(const std::vector< Point3fRGBA > & points)
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
bool isColor()
Retrieves whether point cloud is color
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)
function
PointCloudData & setSparse(bool val)
Specifies whether point cloud is sparse
Parameters
- val: whether point cloud is sparse
function
PointCloudData & setColor(bool val)
Specifies whether point cloud is color
Parameters
- val: whether point cloud is color
function
PointCloudData & setInstanceNum(unsigned int instanceNum)
Specifies instance number
Parameters
- instanceNum: instance number
inline function
void getPclData()
inline function
void setPclData(T...)
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
function
DEPTHAI_SERIALIZE(PointCloudData, width, height, minx, miny, minz, maxx, maxy, maxz, sparse, instanceNum, Buffer::ts, Buffer::tsDevice, Buffer::sequenceNum)
function
int64_t getSequenceNum()
Retrieves image 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.