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
xto the right,ydown andzalong the viewing direction. Invert it for the camera-to-world pose. It describes the camera alone and does not includemodel_transform_matrix.Setting the matrix keeps the camera’s
distanceto 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.]])