CentralCamera.decomposeC#

classmethod CentralCamera.decomposeC(C: ndarray) CentralCamera[source]#

Decompose camera calibration matrix

Parameters:

C (ndarray(3,4)) – camera calibration matrix

Returns:

camera model parameters

Return type:

CentralCamera

Decompose a \(3\times 4\) camera calibration matrix C to determine feasible intrinsic and extrinsic parameters. The result is a CentralCamera instance with the following parameters set:

Parameter

Meaning

f

focal length in pixels

sx, sy

pixel size where sx =1

(u0, v0)

principal point

pose

pose of the camera frame wrt world

Example:

>>> from machinevisiontoolbox import CentralCamera
>>> from spatialmath import SE3
>>> camera = CentralCamera(name='camera1')
>>> C = camera.C(SE3(0.1, 0, 0))
>>> CentralCamera.decomposeC(C)
           Name: invC [CentralCamera]
     pixel size: 1.0 x 1.0
           pose: t = 0.1, 0, 0; rpy/yxz = 0°, 0°, 0°
   principal pt: [0. 0.]
   focal length: [1. 1.]

Note

Since only \(f s_x\) and \(f s_y\) can be estimated we set \(s_x = 1\).

References:
Seealso:

C points2C