CV PPF Pose Estimation
Finds a known 3D model inside a larger 3D scene with no initial guess (cv2.ppf_match_3d.PPF3DDetector): it hashes oriented point PAIRS of the model, then lets the scene's pairs vote for the 4x4 pose that maps model -> scene. Unlike 'CV ICP Register' it does not need the clouds to be roughly aligned already - but its answer is COARSE (on the shipped example ~14 degrees out), so the standard pipeline is PPF then ICP: 'CV Transform Points 3D' the model by this pose, 'CV Point Cloud Normals' it again, 'CV ICP Register' onto the scene, and compose the two with 'CV Matrix Multiply'. Cost grows steeply as the sampling steps shrink (training is O(sampled^2)); downsample big clouds first. Failure tolerant: a degenerate cloud (a plane, too few points) returns the identity with found=false.
- model
- scene
- pose
- poses
- votes
- pose_count
- found
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | NPARRAY | The object to look for, Nx6 (x,y,z,nx,ny,nz) from 'CV Point Cloud Normals'. An Nx3 cloud is accepted and its normals are computed here - never hand cv2 one directly, it silently runs 31x-100x slower and answers wrong. | |
| scene | NPARRAY | The cloud to search in, Nx6 (or Nx3, as above). May contain clutter and other objects - that is what PPF is for. | |
| relative_sampling_step | FLOAT | 0.0500.005–0.5 | Model downsampling, as a fraction of the model's diameter: 0.05 keeps points ~5% of the diameter apart. THE cost knob - halving it roughly quadruples training time (0.025 -> 26 s where 0.05 -> 3.5 s on a 2400-point model). |
| relative_distance_step | FLOAT | 0.0500.005–0.5 | Quantization of the point-pair distance in the hash table, as a fraction of the diameter. Larger tolerates more noise and blurs the vote. |
| num_angles | INT | 306–120 | Angle bins the pair features are quantized into. More = finer rotation resolution, bigger table. |
| relative_scene_sample_step | FLOAT | 0.200.01–1 | Fraction of scene points used as reference points (0.2 = every 5th). Lower = faster, less thorough. |
| relative_scene_distance | FLOAT | 0.0500.005–0.5 | Scene downsampling distance, as a fraction of the model diameter (the scene equivalent of relative_sampling_step). |
| max_poses | INT | 51–100 | How many of the highest-voted pose clusters to return in 'poses'. 'pose' is always the first. |
| normal_neighborsopt | INT | 123–200 | Neighbours per plane fit, used ONLY for an input that arrives without normals. Prefer wiring 'CV Point Cloud Normals' explicitly. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| pose | NPARRAY | 4x4 rigid transform mapping model -> scene, the highest-voted cluster (identity when found=false). Feed 'CV Transform Points 3D'. |
| poses | NPARRAY | Kx4x4 stack of the top 'max_poses' candidates, best first. PPF often gets the right pose at rank 2-3, so refine several with ICP and keep the one with the lowest 'CV Point Cloud Nearest Distance'. |
| votes | NPARRAY | Kx1 float32 vote count per candidate - a RELATIVE confidence only (it scales with the cloud size and the sampling steps), not a quality measure. |
| pose_count | INT | Number of candidates returned (<= max_poses). |
| found | BOOLEAN | False when the match could not run (empty or degenerate cloud, cv2 error). Gate the transform on it with a 'Basic data handling: IfElse'. |