# 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

### depthai.PointCloudData(depthai.Buffer)

Kind: Class

PointCloudData message. Carries point cloud data.

#### __init__(self)

Kind: Method

#### getHeight(self) -> int: int

Kind: Method

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

#### getInstanceNum(self) -> int: int

Kind: Method

Retrieves instance number

#### getMaxX(self) -> float: float

Kind: Method

Retrieves maximal x coordinate in depth units (millimeter by default)

#### getMaxY(self) -> float: float

Kind: Method

Retrieves maximal y coordinate in depth units (millimeter by default)

#### getMaxZ(self) -> float: float

Kind: Method

Retrieves maximal z coordinate in depth units (millimeter by default)

#### getMinX(self) -> float: float

Kind: Method

Retrieves minimal x coordinate in depth units (millimeter by default)

#### getMinY(self) -> float: float

Kind: Method

Retrieves minimal y coordinate in depth units (millimeter by default)

#### getMinZ(self) -> float: float

Kind: Method

Retrieves minimal z coordinate in depth units (millimeter by default)

#### getPoints(self) -> numpy.typing.NDArray[numpy.float32]: numpy.typing.NDArray[numpy.float32]

Kind: Method

#### getSequenceNum(self) -> int: int

Kind: Method

Retrieves sequence number

#### getTimestamp(self) -> datetime.timedelta: datetime.timedelta

Kind: Method

Retrieves timestamp related to dai::Clock::now()

#### getTimestampDevice(self) -> datetime.timedelta: datetime.timedelta

Kind: Method

Retrieves timestamp directly captured from device's monotonic clock, not
synchronized to host time. Used mostly for debugging

#### getWidth(self) -> int: int

Kind: Method

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

#### isSparse(self) -> bool: bool

Kind: Method

Retrieves whether point cloud is sparse

#### setHeight(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData

Kind: Method

Specifies frame height

Parameter ``height``:
frame height

#### setInstanceNum(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData

Kind: Method

Instance number relates to the origin of the frame (which camera)

Parameter ``instance``:
Instance number

#### setMaxX(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData

Kind: Method

Specifies maximal x coordinate in depth units (millimeter by default)

Parameter ``val``:
maximal x coordinate in depth units (millimeter by default)

#### setMaxY(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData

Kind: Method

Specifies maximal y coordinate in depth units (millimeter by default)

Parameter ``val``:
maximal y coordinate in depth units (millimeter by default)

#### setMaxZ(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData

Kind: Method

Specifies maximal z coordinate in depth units (millimeter by default)

Parameter ``val``:
maximal z coordinate in depth units (millimeter by default)

#### setMinX(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData

Kind: Method

Specifies minimal x coordinate in depth units (millimeter by default)

Parameter ``val``:
minimal x coordinate in depth units (millimeter by default)

#### setMinY(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData

Kind: Method

Specifies minimal y coordinate in depth units (millimeter by default)

Parameter ``val``:
minimal y coordinate in depth units (millimeter by default)

#### setMinZ(self, arg0: typing.SupportsFloat) -> PointCloudData: PointCloudData

Kind: Method

Specifies minimal z coordinate in depth units (millimeter by default)

Parameter ``val``:
minimal z coordinate in depth units (millimeter by default)

#### setSequenceNum(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData

Kind: Method

Specifies sequence number

Parameter ``seq``:
Sequence number

#### setSize()

Kind: Method

#### setTimestamp(self, arg0: datetime.timedelta) -> PointCloudData: PointCloudData

Kind: Method

Retrieves image timestamp related to dai::Clock::now()

#### setTimestampDevice(self, arg0: datetime.timedelta) -> PointCloudData: PointCloudData

Kind: Method

Sets image timestamp related to dai::Clock::now()

#### setWidth(self, arg0: typing.SupportsInt) -> PointCloudData: PointCloudData

Kind: Method

Specifies frame width

Parameter ``width``:
frame width

#### points

Kind: Property

#### points.setter(self, arg1: collections.abc.Sequence [ Point3f ])

Kind: Method

#### C++

### dai::PointCloudData

Kind: class

PointCloudData message. Carries point cloud data.

#### dai::PointCloudData::dependent_false

Kind: struct

#### PointCloudData()

Kind: function

Construct PointCloudData message.

#### PointCloudData(std::shared_ptr< RawPointCloudData > ptr)

Kind: function

#### ~PointCloudData()

Kind: function

#### std::vector< Point3f > & getPoints()

Kind: function

#### unsigned int getInstanceNum()

Kind: function

Retrieves instance number

#### unsigned int getWidth()

Kind: function

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

#### unsigned int getHeight()

Kind: function

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

#### float getMinX()

Kind: function

Retrieves minimal x coordinate in depth units (millimeter by default)

#### float getMinY()

Kind: function

Retrieves minimal y coordinate in depth units (millimeter by default)

#### float getMinZ()

Kind: function

Retrieves minimal z coordinate in depth units (millimeter by default)

#### float getMaxX()

Kind: function

Retrieves maximal x coordinate in depth units (millimeter by default)

#### float getMaxY()

Kind: function

Retrieves maximal y coordinate in depth units (millimeter by default)

#### float getMaxZ()

Kind: function

Retrieves maximal z coordinate in depth units (millimeter by default)

#### bool isSparse()

Kind: function

Retrieves whether point cloud is sparse

#### PointCloudData & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration >
timestamp)

Kind: function

Retrieves image timestamp related to dai::Clock::now()

#### PointCloudData & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration >
timestamp)

Kind: function

Sets image timestamp related to dai::Clock::now()

#### PointCloudData & setInstanceNum(unsigned int instance)

Kind: function

Instance number relates to the origin of the frame (which camera) parameters: instance: Instance number

#### PointCloudData & setSequenceNum(int64_t seq)

Kind: function

Specifies sequence number parameters: seq: Sequence number

#### PointCloudData & setWidth(unsigned int width)

Kind: function

Specifies frame width parameters: width: frame width

#### PointCloudData & setHeight(unsigned int height)

Kind: function

Specifies frame height parameters: height: frame height

#### PointCloudData & setSize(unsigned int width, unsigned int height)

Kind: function

Specifies frame size parameters: height: frame height; width: frame width

#### PointCloudData & setSize(std::tuple< unsigned int, unsigned int > size)

Kind: function

Specifies frame size parameters: size: frame size

#### PointCloudData & setMinX(float val)

Kind: function

Specifies minimal x coordinate in depth units (millimeter by default) parameters: val: minimal x coordinate in depth units
(millimeter by default)

#### PointCloudData & setMinY(float val)

Kind: function

Specifies minimal y coordinate in depth units (millimeter by default) parameters: val: minimal y coordinate in depth units
(millimeter by default)

#### PointCloudData & setMinZ(float val)

Kind: function

Specifies minimal z coordinate in depth units (millimeter by default) parameters: val: minimal z coordinate in depth units
(millimeter by default)

#### PointCloudData & setMaxX(float val)

Kind: function

Specifies maximal x coordinate in depth units (millimeter by default) parameters: val: maximal x coordinate in depth units
(millimeter by default)

#### PointCloudData & setMaxY(float val)

Kind: function

Specifies maximal y coordinate in depth units (millimeter by default) parameters: val: maximal y coordinate in depth units
(millimeter by default)

#### PointCloudData & setMaxZ(float val)

Kind: function

Specifies maximal z coordinate in depth units (millimeter by default) parameters: val: maximal z coordinate in depth units
(millimeter by default)

#### void getPclData()

Kind: function

#### int64_t getSequenceNum()

Kind: function

Retrieves sequence number

#### std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()

Kind: function

Retrieves timestamp related to dai::Clock::now()

#### std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()

Kind: function

Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
