ON THIS PAGE

  • Configuration options
  • Output coordinate system selection
  • Reference

PointCloudConfig

PointCloudConfig carries configuration for the PointCloud node. It can be set via initialConfig before pipeline start or sent at runtime through the inputConfig queue.

Configuration options

  • setOrganized(bool) — When true, output keeps all width × height points (including invalid z ≤ 0). When false (default), only valid points are emitted.
  • setLengthUnit(LengthUnit) — Output coordinate unit: METER, CENTIMETER, MILLIMETER (default), INCH, FOOT.
  • Setting the coordinate system
    • setTransformationMatrix(matrix) — Apply a custom 4×4 (or 3×3 rotation-only) transformation to every output point. Default: identity. Only used when coordinate system type is DEFAULT.
    • setTargetCoordinateSystem(CameraBoardSocket) — Transform points into the frame of another camera socket using device calibration.
    • setTargetCoordinateSystem(HousingCoordinateSystem) — Transform points into a housing coordinate system.

Output coordinate system selection

The three coordinate system modes are mutually exclusive:
  • DEFAULT — Uses the identity or custom transformation matrix (if set) composed with frame extrinsics.
  • CAMERA_SOCKET — Transforms into the target camera's coordinate frame via calibration.
  • HOUSING — Transforms into a housing coordinate system via calibration.

Reference

Python

class

dai::PointCloudConfig

#include PointCloudConfig.hpp
function
PointCloudConfig()
function
~PointCloudConfig()
function
bool getOrganized()
Retrieve whether the point cloud is organized (all width*height points kept).
Returns
true if all width*height points are output, false if only valid (z > 0) points are kept
function
std::array< std::array< float, 4 >, 4 > getTransformationMatrix()
Retrieve transformation matrix applied to every output point.
Returns
4x4 row-major transformation matrix (identity by default)
function
LengthUnit getLengthUnit()
Retrieve the length unit used for output point coordinates.
function
PointCloudConfig & setOrganized(bool enable)
Enable or disable organized point cloud output. When true all width*height points are kept; when false only points with z > 0 are emitted.
function
PointCloudConfig & setTransformationMatrix(const std::array< std::array< float, 4 >, 4 > & transformationMatrix)
Set a 4x4 transformation matrix applied to every output point. Default is the identity matrix.
function
PointCloudConfig & setTransformationMatrix(const std::array< std::array< float, 3 >, 3 > & transformationMatrix)
Convenience overload: set a 3x3 rotation matrix (translation set to zero).
function
PointCloudConfig & setLengthUnit(LengthUnit unit)
Set the length unit for output point coordinates.
function
PointCloudConfig & setTargetCoordinateSystem(CameraBoardSocket targetCamera, bool useSpecTranslation)
Set target coordinate system to another camera socket.
Parameters
  • targetCamera: Target camera socket
  • useSpecTranslation: Use spec translation instead of calibration (default: false)
function
PointCloudConfig & setTargetCoordinateSystem(HousingCoordinateSystem housingCS, bool useSpecTranslation)
Set target coordinate system to housing coordinate system.
Parameters
  • housingCS: Target housing coordinate system
  • useSpecTranslation: Whether to use spec translation (default: true)
function
CoordinateSystemType getCoordinateSystemType()
Retrieve the coordinate system type.
function
CameraBoardSocket getTargetCameraSocket()
Retrieve the target camera socket (valid when coordSystemType == CAMERA_SOCKET).
function
HousingCoordinateSystem getTargetHousingCS()
Retrieve the target housing coordinate system (valid when coordSystemType == HOUSING).
function
bool getUseSpecTranslation()
Retrieve whether spec translation is used.
inline function
DatatypeEnum getDatatype()
function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
function
DEPTHAI_SERIALIZE(PointCloudConfig, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, organized, transformationMatrix, lengthUnit, coordSystemType, targetCameraSocket, targetHousingCS, useSpecTranslation)
enum

uint8_t CoordinateSystemType

enumerator
DEFAULT
enumerator
CAMERA_SOCKET
enumerator
HOUSING

C++

class

dai::PointCloudConfig

#include PointCloudConfig.hpp
function
PointCloudConfig()
function
~PointCloudConfig()
function
bool getOrganized()
Retrieve whether the point cloud is organized (all width*height points kept).
Returns
true if all width*height points are output, false if only valid (z > 0) points are kept
function
std::array< std::array< float, 4 >, 4 > getTransformationMatrix()
Retrieve transformation matrix applied to every output point.
Returns
4x4 row-major transformation matrix (identity by default)
function
LengthUnit getLengthUnit()
Retrieve the length unit used for output point coordinates.
function
PointCloudConfig & setOrganized(bool enable)
Enable or disable organized point cloud output. When true all width*height points are kept; when false only points with z > 0 are emitted.
function
PointCloudConfig & setTransformationMatrix(const std::array< std::array< float, 4 >, 4 > & transformationMatrix)
Set a 4x4 transformation matrix applied to every output point. Default is the identity matrix.
function
PointCloudConfig & setTransformationMatrix(const std::array< std::array< float, 3 >, 3 > & transformationMatrix)
Convenience overload: set a 3x3 rotation matrix (translation set to zero).
function
PointCloudConfig & setLengthUnit(LengthUnit unit)
Set the length unit for output point coordinates.
function
PointCloudConfig & setTargetCoordinateSystem(CameraBoardSocket targetCamera, bool useSpecTranslation)
Set target coordinate system to another camera socket.
Parameters
  • targetCamera: Target camera socket
  • useSpecTranslation: Use spec translation instead of calibration (default: false)
function
PointCloudConfig & setTargetCoordinateSystem(HousingCoordinateSystem housingCS, bool useSpecTranslation)
Set target coordinate system to housing coordinate system.
Parameters
  • housingCS: Target housing coordinate system
  • useSpecTranslation: Whether to use spec translation (default: true)
function
CoordinateSystemType getCoordinateSystemType()
Retrieve the coordinate system type.
function
CameraBoardSocket getTargetCameraSocket()
Retrieve the target camera socket (valid when coordSystemType == CAMERA_SOCKET).
function
HousingCoordinateSystem getTargetHousingCS()
Retrieve the target housing coordinate system (valid when coordSystemType == HOUSING).
function
bool getUseSpecTranslation()
Retrieve whether spec translation is used.
inline function
DatatypeEnum getDatatype()
function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
function
DEPTHAI_SERIALIZE(PointCloudConfig, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, organized, transformationMatrix, lengthUnit, coordSystemType, targetCameraSocket, targetHousingCS, useSpecTranslation)
enum

uint8_t CoordinateSystemType

enumerator
DEFAULT
enumerator
CAMERA_SOCKET
enumerator
HOUSING

Need assistance?

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