# triangulate

3-D locations of undistorted matching points in stereo images

## Syntax

## Description

returns the 3-D locations of matching pairs of undistorted image points from two
stereo images.`worldPoints`

= triangulate(`matchedPoints1`

,`matchedPoints2`

,`stereoParams`

)

returns
the 3-D locations of the matching pairs in a world coordinate system.
These locations are defined by camera projection matrices. `worldPoints`

= triangulate(`matchedPoints1`

,`matchedPoints2`

,`cameraMatrix1`

,`cameraMatrix2`

)

`[`

additionally returns reprojection errors for the world points using any of the input
arguments from previous syntaxes.`worldPoints`

,`reprojectionErrors`

]
= triangulate(___)

`[`

additionally returns the indices of valid and invalid world points. Valid points
are located in front of the cameras.`worldPoints`

,`reprojectionErrors`

,`validIndex`

]
= triangulate(___)

## Examples

## Input Arguments

## Output Arguments

## Tips

The `triangulate`

function does not account
for lens distortion. You can undistort the images using the `undistortImage`

function before detecting
the points. Alternatively, you can undistort the points themselves
using the `undistortPoints`

function.

## References

[1] Hartley, R. and A. Zisserman. "Multiple View Geometry
in Computer Vision." *Cambridge University Press*,
p. 312, 2003.

## Extended Capabilities

## Version History

**Introduced in R2014b**

## See Also

### Apps

### Functions

`triangulateMultiview`

|`reconstructScene`

|`estimateCameraParameters`

|`cameraMatrix`

|`undistortImage`

|`undistortPoints`

|`relativeCameraPose`