ComfyUI Node
CV Omnidir Stereo Reconstruct
Rectifies an omnidirectional stereo pair, matches it with SGBM and back-projects the result (cv2.omnidir.stereoReconstruct) - the whole depth pipeline in one call, because the rectification of a catadioptric pair is not a homography and cannot be wired from the pinhole nodes. Feed both cameras' K, xi and 4-coefficient D plus the R and T between them. The disparity is expressed in the RECTIFIED frame, so compare it against 'left_rectified', not the input. Invalid pixels come back as -1 from cv2; this node writes 0 there and gives you a 'valid' mask instead. Failure tolerant: a cv2 error returns empty outputs with found=false.
CV Omnidir Stereo Reconstruct
- left
- right
- K_left
- dist_left
- K_right
- dist_right
- R
- T
- disparity
- valid
- left_rectified
- right_rectified
- point_cloud
- found
◄xi_left0.80►
◄xi_right0.80►
◄projectionRECTIFY_PERSPECTIVE►
◄num_disparities64►
◄block_size7►
Categoryimage/CV/features
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| left | IMAGE | Left omnidirectional image. | |
| right | IMAGE | Right omnidirectional image. | |
| K_left | NPARRAY | 3x3 K of the left camera. | |
| dist_left | NPARRAY | Four omnidir coefficients of the left camera. | |
| xi_left | FLOAT | 0.800–10 | Left mirror parameter. |
| K_right | NPARRAY | 3x3 K of the right camera. | |
| dist_right | NPARRAY | Four omnidir coefficients of the right camera. | |
| xi_right | FLOAT | 0.800–10 | Right mirror parameter. |
| R | NPARRAY | 3x3 rotation from the left to the right camera. | |
| T | NPARRAY | 3x1 translation from the left to the right camera. Its length sets the world scale of the cloud. | |
| projection | COMBO | RECTIFY_PERSPECTIVE | Rectification the matcher runs in. PERSPECTIVE keeps the middle of the field at higher resolution; LONGLATI unrolls the whole sphere and matches more of it, at lower resolution per pixel. cv2 accepts only these two here. |
| num_disparities | INT | 6416–512 | SGBM search range, must be a multiple of 16. It sets the NEAREST distance the pair can see. |
| block_size | INT | 73–51 | SGBM matching window (odd). Larger = smoother and blinder to detail. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| disparity | NPARRAY | Float32 disparity in the RECTIFIED frame; 0 where nothing matched (cv2 writes -1 there). |
| valid | NPARRAY | Uint8 mask, 255 where the disparity is real. |
| left_rectified | IMAGE | The rectified left image - the frame the disparity and the cloud are aligned with. |
| right_rectified | IMAGE | The rectified right image. |
| point_cloud | NPARRAY | Nx3 float32 cloud in the left camera's frame, in the units of T. Feed 'CV Filter Point Cloud' or 'CV Point Cloud Normals'. |
| found | BOOLEAN | — |