ComfyUI Node
CV Point Cloud Normals
Estimates a surface normal per point by fitting a plane to each point's k nearest neighbours (cv2.ppf_match_3d.computeNormalsPC3d) and returns the Nx6 (x,y,z,nx,ny,nz) cloud the surface-matching nodes need. WIRE THIS IN FRONT OF 'CV PPF Pose Estimation' and 'CV ICP Register': given a bare Nx3 cloud those run 31x-100x slower and answer with a silently wrong pose instead of complaining. The plane fit leaves the SIGN of each normal arbitrary; 'flip toward viewpoint' orients them all towards a camera position, which is what you want for a cloud reconstructed from one view. Failure tolerant: fewer than 3 points (or a cv2 error) gives empty outputs with found=false.
CV Point Cloud Normals
- points
- cloud
- normals
- found
◄num_neighbors12►
◄orientationas computed (sign arbitrary)►
◄viewpoint_x0.0►
◄viewpoint_y0.0►
◄viewpoint_z0.0►
Categoryimage/CV/points
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| points | NPARRAY | Nx3 point cloud (an Nx6 cloud is accepted - its normals are recomputed). | |
| num_neighbors | INT | 123–200 | Neighbours per local plane fit. Higher = smoother normals and more smearing across edges; lower = noisier. 6-20 is the usual range. |
| orientation | COMBO | as computed (sign arbitrary) | A plane fit cannot tell inside from outside. 'flip toward viewpoint' points every normal at the viewpoint below - correct for a cloud seen from one camera, wrong for a closed object sampled all round. |
| viewpoint_xopt | FLOAT | 0.0 | Viewpoint the normals are flipped towards (only read when orientation is 'flip toward viewpoint'). |
| viewpoint_yopt | FLOAT | 0.0 | Viewpoint Y. The camera origin is (0,0,0) for a cloud straight out of 'CV Stereo Pair To Cloud'. |
| viewpoint_zopt | FLOAT | 0.0 | Viewpoint Z. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| cloud | NPARRAY | Nx6 float32 (x,y,z,nx,ny,nz) - feed the surface matching nodes with this, not with the Nx3 input. |
| normals | NPARRAY | Nx3 float32 unit normals only, in the input order (for drawing or filtering). |
| found | BOOLEAN | False when the normals could not be computed (fewer than 3 points, cv2 error). |