Nodes/comfyui_cv/CV Transform Points 3D
ComfyUI Node

CV Transform Points 3D

Applies a 3x4 / 4x4 / 3x3 transform to an Nx3 point cloud (cv2.transform) - the step that moves a second stereo cloud into the first view's coordinate frame before merging. Feed the matrix from cv2.estimateAffine3D (3x4), 'CV ICP Register' (4x4) or any rotation (3x3). 'direction' selects forward (the matrix as given) or inverse: for a rigid matrix the inverse is built exactly (R^T, -R^T t), otherwise the homogeneous 4x4 is inverted numerically. Failure tolerant: an empty/None cloud passes through empty and a singular matrix returns the points unchanged.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Transform Points 3D
  • points
  • matrix
  • points
directionforward
Categoryimage/CV/points

Inputs (3)

NameTypeDefaultDescription
pointsNPARRAYNx3 (or Nx1x3 / HxWx3) point cloud. An Nx6 cloud from 'CV Point Cloud Normals' / 'CV Mesh Vertex Normals' is accepted and its POSITIONS come back Nx3: rotating a cloud rotates its normals too, so recompute them after moving it (which is exactly the transform -> normals -> ICP chain workflow 81 wires).
matrixNPARRAY3x4 [R|t], 4x4 homogeneous, or 3x3 rotation.
directionCOMBOforwardforward: p' = R p + t (use for a matrix that already maps THIS cloud into the target frame). inverse: p' = R^-1 (p - t) (use when the matrix maps the target frame into this one).

Outputs (1)

NameTypeDescription
pointsNPARRAYTransformed Nx3 float32 points, same order as the input.