# estimateCameraProjection

Estimate camera projection matrix from world-to-image point correspondences

*Since R2022b*

## Syntax

## Description

returns the camera projection matrix determined from known world points and their
corresponding image projections by using the direct linear transformation (DLT)
approach.`camProjection`

= estimateCameraProjection(`imagePoints`

,`worldPoints`

)

`[`

also returns the reprojection error that quantifies the accuracy of the projected image
coordinates.`camProjection`

,`reprojectionErrors`

] = estimateCameraProjection(`imagePoints`

,`worldPoints`

)

## Examples

## Input Arguments

## Output Arguments

## Tips

This function assumes the camera has negligible lens distortion. If there is lens distortion, calibrate the camera and use the

`estworldpose`

and`cameraProjection`

functions instead.If the camera intrinsics and extrinsics parameters are known, you can estimate the camera projection matrix using the

`cameraProjection`

function.You can use the camera projection matrix,

`camProjection`

, with the`findNearestNeighbors`

function to speed up the nearest neighbors search in a point cloud generated by an RGB-D sensor, such as Microsoft^{®}Kinect^{®}.

## Algorithms

Given the world points * X* and the image
points

*, the camera projection matrix*

**x***C*, is obtained by solving the equation

λ* x* =

*C*

*.*

**X**The equation is solved using the direct linear transformation (DLT) approach [1]. This approach formulates a homogeneous linear system of equations, and the solution is obtained through generalized eigenvalue decomposition.

Because the image point coordinates are given in pixel values, the approach for computing
the camera projection matrix is sensitive to numerical errors. To avoid numerical errors, the
input image point coordinates are normalized, so that their centroid is at the origin. Also,
the root mean squared distance of the image points from the origin is
`sqrt(2)`

. These steps summarize the process for estimating the camera
projection matrix.

Normalize the input image point coordinates with transform

*T*.Estimate camera projection matrix

*C*from the normalized input image points.^{N}Compute the denormalized camera projection matrix

*C*as*C*^{N}*T*^{-1}.Compute the reprojected image point coordinates

as**x**^{E}*C*.**X**Compute the reprojection errors as

*reprojectionErrors*= |−**x**|.**x**^{E}

## References

[1]

## Extended Capabilities

## Version History

**Introduced in R2022b**

## See Also

### Apps

### Functions

`cameraProjection`

|`estimateCameraParameters`

|`estworldpose`

|`estimateEssentialMatrix`

|`estimateFundamentalMatrix`

### Topics

- Evaluating the Accuracy of Single Camera Calibration
- Structure from Motion from Two Views
- Structure from Motion from Multiple Views
- Depth Estimation from Stereo Video
- Code Generation for Depth Estimation From Stereo Video
- What Is Camera Calibration?
- Using the Single Camera Calibrator App
- Using the Stereo Camera Calibrator App