PointCloudConfig
PointCloudConfig 携带用于 点云 节点的配置。可在管道启动前通过 initialConfig 设置,或在运行时通过 inputConfig 队列发送。配置选项
setOrganized(bool)— 当为true时,输出保留所有width × height点(包括无效的 z ≤ 0 点)。当为false(默认)时,仅输出有效点。setLengthUnit(LengthUnit)— 输出坐标单位:METER、CENTIMETER、MILLIMETER(默认)、INCH、FOOT。- 设置坐标系
setTransformationMatrix(matrix)— 对每个输出点应用自定义的 4×4(或仅旋转的 3×3)变换。默认:单位矩阵。仅当坐标系类型为DEFAULT时使用。setTargetCoordinateSystem(CameraBoardSocket)— 通过设备标定将点变换到另一个摄像头插座的坐标系中。setTargetCoordinateSystem(HousingCoordinateSystem)— 将点变换到外壳坐标系中。
输出坐标系选择
DEFAULT— 使用单位矩阵或自定义变换矩阵(若已设置),并组合帧外参。CAMERA_SOCKET— 通过标定将点变换到目标摄像头的坐标系中。HOUSING— 通过标定将点变换到外壳坐标系中。
参考
Python
class
dai::PointCloudConfig
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)Set target coordinate system to another camera socket.
Parameters
- targetCamera: Target camera socket
function
PointCloudConfig & setTargetCoordinateSystem(HousingCoordinateSystem housingCS)Set target coordinate system to housing coordinate system.
Parameters
- housingCS: Target housing coordinate system
function
PointCloudConfig & setTargetCoordinateSystem(CameraBoardSocket targetCamera, bool useSpecTranslation)Deprecated: use setTargetCoordinateSystem(targetCamera) instead.
function
PointCloudConfig & setTargetCoordinateSystem(HousingCoordinateSystem housingCS, bool useSpecTranslation)Deprecated: use setTargetCoordinateSystem(housingCS) instead.
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, Buffer::tsSystem, organized, transformationMatrix, lengthUnit, coordSystemType, targetCameraSocket, targetHousingCS, useSpecTranslation)enum
uint8_t CoordinateSystemType
enumerator
DEFAULT
enumerator
CAMERA_SOCKET
enumerator
HOUSING
需要帮助?
请前往 OAKChina 官网 获取技术支持或解答您的任何疑问。