PointCloudConfig
最后更新
PointCloudConfig 为 PointCloud 节点提供配置。它可以在管道启动前通过 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()Get the datatype of this specific message.
Returns
DatatypeEnum
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)需要帮助?
请访问讨论论坛以获取技术支持或您可能有的任何其他问题。