pycvcam.OrthographicExtrinsic.from_tmatrix#
- classmethod OrthographicExtrinsic.from_tmatrix(tmatrix)[source]#
Class method to create a OrthographicExtrinsic object from a 4x4 transformation matrix.
- Parameters:
tmatrix (numpy.ndarray) – The 4x4 transformation matrix of the camera in the world coordinate system. It should be a numpy array of shape (4, 4).
- Returns:
A new instance of the OrthographicExtrinsic class with the specified transformation matrix.
- Return type:
Examples
Create an extrinsic object with a transformation matrix:
import numpy as np from pycvcam import OrthographicExtrinsic tmatrix = numpy.array([[0.93629336, -0.27509585, 0.21835066, 0.5], [0.28962948, 0.95642509, -0.03695701, 0.5], [-0.19866933, 0.0978434, 0.97517033, 0.5], [0.0, 0.0, 0.0, 1.0]]) extrinsic = OrthographicExtrinsic.from_tmatrix(tmatrix)