Triangulation
Recover a 3D point by intersecting the viewing rays implied by multiple camera observations.
Two cameras observe the same scene point from different positions.
Back-project each observation through its camera model.
Solve for the point best satisfying the projection equations.
Convert homogeneous coordinates and check depth and reprojection error.
Convert homogeneous coordinates and check depth and reprojection error.
Illustrative example. The stages explain the method; they are not a live OpenCV execution.
Try it on an image
Experiment at pixel level
Triangulate editable correspondences with two parallel synthetic pinhole cameras. Focal length and baseline must match your rectified images for physical units to be meaningful.
The engine loads on your first run. Your images stay in this browser.
Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.
Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Select a pixel
Select a pixel
When to use it
Reconstruct sparse geometry from matched points and known camera matrices.
How it works
- 01Back-project each observation through its camera model.
- 02Solve for the point best satisfying the projection equations.
- 03Convert homogeneous coordinates and check depth and reprojection error.
corresponding rays → least-squares 3D intersection
What to tune
Use well-conditioned views and reject points behind cameras or with poor reprojection consistency.
Where it breaks down
Nearly parallel rays create unstable depth. All observations and camera matrices must use compatible coordinate systems.
TypeScript API
Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.
All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.
Related methods
Camera calibration
Estimate a camera’s intrinsic parameters and lens distortion from known target geometry.
Lens undistortion
Invert a calibrated lens model to map distorted observations onto an idealized camera image.
Perspective-n-point pose
Estimate a camera-relative object pose from known 3D points and their 2D image observations.
Fundamental and essential matrices
Constrain where a point from one camera view can appear in another.