OpenCV triangulatePoints_1
TriangulatePoints_1 — the stereo twin with the same point to make
- projMatr1
- projMatr2
- projPoints1
- projPoints2
- points4D
- nparray
triangulatePoints_1 is the second of two nodes for the same cv2.triangulatePoints function, split by the pack's generator across OpenCV's overload declarations. Identical inputs, identical output. If your workflow references this one by number, nothing about its behavior differs from _0 - the numbering is codegen noise, and this page and its sibling describe the same stereo-reconstruction routine.
The routine itself: given two camera projection matrices and a set of matched 2D points across two views, it reconstructs the 3D position of each correspondence by intersecting the two camera rays. That's the classical route to 3D-from-2D - structure from motion, photogrammetry, measuring real scenes from photographs - and it stands opposite the learned depth-estimation route covered in the KB. Neither is better universally; learned depth generalizes and fills holes, calibration-based reconstruction gives you actual metric scale when you have real cameras and a real rig.
Inputs and outputs that matter
- projMatr1, projMatr2 (NPARRAY) - 3×4 projection matrices for the two views.
- projPoints1, projPoints2 (NPARRAY) - the matching 2D points in each view (2×N or N×2).
The optional points4D is an out-parameter; leave it unwired, per the pack's standing advice. Output is one nparray: a 4×N homogeneous-points array; normalize by the fourth row to get (X, Y, Z).
Installation
Pack installs once for both: ComfyUI Manager (search "OpenCV"), or git clone https://github.com/geroldmeisinger/opencv-comfyui into ComfyUI/custom_nodes, restart. Needs opencv-contrib-python (pip install opencv-contrib-python). No model files.
Common issues
The usual pack-wide friction plus one calibration-specific trap. General: work on NPARRAY, batch size 1, Image2Nparray/Nparrays2Image at the boundaries. Specific: the quality of your 3D output is capped by the quality of your inputs - noisy feature matches and uncalibrated projection matrices produce scattered, meaningless point clouds, and nothing in the node will tell you. This is a genuinely expert tool; it rewards people who already know the math it wraps.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| projMatr1 | NPARRAY | — | |
| projMatr2 | NPARRAY | — | |
| projPoints1 | NPARRAY | — | |
| projPoints2 | NPARRAY | — | |
| points4Dopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |