In computer vision a camera matrix or (camera) projection matrix is a 3 × 4 {\displaystyle 3\times 4} matrix which describes the mapping of a pinhole camera from 3D points in the world to 2D points in an image.
Let x {\displaystyle \mathbf {x} } be a representation of a 3D point in homogeneous coordinates (a 4-dimensional vector), and let y {\displaystyle \mathbf {y} } be a representation of the image of this point in the pinhole camera (a 3-dimensional vector). Then the following relation holds
where C {\displaystyle \mathbf {C} } is the camera matrix and the ∼ {\displaystyle \,\sim } sign implies that the left and right hand sides are equal except for a multiplication by a non-zero scalar k ≠ 0 {\displaystyle k\neq 0} :
Since the camera matrix C {\displaystyle \mathbf {C} } is involved in the mapping between elements of two projective spaces, it too can be regarded as a projective element. This means that it has only 11 degrees of freedom since any multiplication by a non-zero scalar results in an equivalent camera matrix.