CV Register Point Clouds (3D)
Finds the transform that maps one 3D point set onto another given CORRESPONDING points (cv2.estimateAffine3D) - the 3D counterpart of 'OpenCV Find Homography (RANSAC)'. Typical use: two stereo pairs of the same scene. Match features between the two left views ('CV Match Features'), read the 3D position of each match out of the two XYZ maps ('CV Sample Array At Points' on cv2.reprojectImageTo3D's output), and this node returns the 3x4 [R|t] that brings the second cloud into the first one's frame - apply it with 'CV Transform Points 3D' and merge with 'CV Merge Point Clouds'. 'RANSAC + rigid refit' (default) rejects the outliers that noisy stereo depth always produces, then re-fits a clean rigid transform on the inliers only. Failure tolerant: fewer than 3 correspondences, a count mismatch or a degenerate configuration returns the identity transform with found=false instead of raising, so a failed registration merges the clouds unaligned rather than halting the workflow - branch on 'found' with a 'Basic data handling: IfElse' if you would rather skip the second cloud entirely.
- source
- target
- matrix
- inliers
- inlier_count
- scale
- found
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| source | NPARRAY | Nx3 points to be MOVED (the second view's cloud). | |
| target | NPARRAY | Nx3 points to move ONTO, one per source point in the same order (the reference view's cloud). | |
| method | COMBO | RANSAC + rigid refit | 'RANSAC + rigid refit': robust outlier rejection, then a rotation+translation(+uniform scale) fit on the inliers - the right choice for stereo clouds. 'RANSAC (affine)': keeps the general affine fit, which can absorb depth errors as shear. 'rigid (all points)': no outlier rejection (only for clean, already-filtered correspondences). |
| ransac_threshold | FLOAT | 0.300–1000000 | Inlier distance in the cloud's own unit (metres for a calibrated stereo reconstruction). Stereo depth noise grows with distance, so a few tenths of a metre is realistic; too tight finds no inliers, too loose accepts mismatches. |
| confidence | FLOAT | 0.9990–1 | RANSAC confidence: probability that the returned fit comes from an all-inlier sample. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| matrix | NPARRAY | 3x4 [R|t] mapping source -> target (identity when found=false). Feed 'CV Transform Points 3D'. |
| inliers | NPARRAY | Nx1 uint8 mask of the correspondences RANSAC kept (all zero when found=false; all 255 for the 'rigid (all points)' method). |
| inlier_count | INT | — |
| scale | FLOAT | Uniform scale of the rigid fit (1.0 for a pure rigid motion; far from 1 means the two clouds disagree about depth, e.g. a wrong baseline). |
| found | BOOLEAN | — |