OpenCV estimateTranslation3D_1
EstimateTranslation3D_1 — the twin, and it's identical
- src
- dst
- out
- inliers
- int
- nparray_1
- nparray_2
estimateTranslation3D_1 is a duplicate of estimateTranslation3D_0. Same inputs, same outputs, same generated code - the opencv-comfyui (geroldmeisinger/opencv-comfyui) generator emits one node per OpenCV overload and numbers them, and near-identical overloads become identical twin nodes. Use _0. There is no reason to pick this one.
What it does
Finds the 3D translation vector that aligns one set of matched 3D points onto another, under the assumption that the two sets differ only by a shift - no rotation, no scale. RANSAC handles the outlier correspondences. This is the most constrained member of the pack's point-alignment family, and it's for a narrow job: when you know the only difference between two point sets is position. If rotation or scale is also involved, use estimateAffine3D_2 instead.
Inputs and outputs
- src (NPARRAY) - source 3D points, N×3.
- dst (NPARRAY) - matching destination 3D points, N×3.
- ransacThreshold (FLOAT) - inlier tolerance, ~3.0 default.
- confidence (FLOAT) - RANSAC confidence, 0.99 default.
- out (NPARRAY, optional), inliers (NPARRAY, optional) - out-parameters; leave unconnected.
- Outputs: int - success flag (1 = fit OK, 0 = failed); nparray_1 - translation vector; nparray_2 - inlier mask.
Wiring it up
You supply N×3 point arrays as nparrays; you get back a flag, a vector, and a mask. None of the outputs are displayable images - feeding them into Nparrays2Image triggers the pack's 'NoneType' object has no attribute 'shape' error (the "not every nparray is an image" trap). Realistically, this node is for people processing 3D/depth data in ComfyUI, and it's a small niche even there.
Install and gotchas
Via ComfyUI Manager (search "opencv-comfyui") or git clone https://github.com/geroldmeisinger/opencv-comfyui into ComfyUI/custom_nodes, then restart. Requirements: opencv-contrib-python, numpy, torch; no model files. Standard pack traps - batch_size-1 images, Python-literal strings, the author's "Expect dragons!" warning - all apply. Full detail on the estimateTranslation3D_0 page.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| dst | NPARRAY | — | |
| ransacThreshold | FLOAT | — | |
| confidence | FLOAT | — | |
| outopt | NPARRAY | — | |
| inliersopt | NPARRAY | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| int | INT | — |
| nparray_1 | NPARRAY | — |
| nparray_2 | NPARRAY | — |