Camera.extrinsic_matrix

Camera.extrinsic_matrix#

property Camera.extrinsic_matrix: NumpyArray[float][source]#

Return or set the pose of the camera as a 4x4 extrinsic matrix.

The matrix maps world coordinates to camera coordinates in the OpenCV convention, with x to the right, y down and z along the viewing direction. Invert it for the camera-to-world pose. It describes the camera alone and does not include model_transform_matrix.

Setting the matrix keeps the camera’s distance to its focal point.

Added in version 0.50.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> camera = pv.Camera()
>>> camera.position = (0.0, 0.0, 4.0)
>>> camera.focal_point = (0.0, 0.0, 0.0)
>>> camera.up = (0.0, 1.0, 0.0)
>>> camera.extrinsic_matrix
array([[ 1.,  0.,  0.,  0.],
       [ 0., -1.,  0.,  0.],
       [ 0.,  0., -1.,  4.],
       [ 0.,  0.,  0.,  1.]])

See Also#

intrinsic_matrix