pycvcam.Cv2Intrinsic.from_matrix#
- classmethod Cv2Intrinsic.from_matrix(intrinsic_matrix)[source]#
Class method to create a Cv2Intrinsic object from an intrinsic matrix.
- Parameters:
intrinsic_matrix (numpy.ndarray) – The intrinsic matrix of the camera. It should be a numpy array of shape (3, 3).
- Returns:
A new instance of the Cv2Intrinsic class with the specified intrinsic matrix.
- Return type:
Examples
Create an intrinsic object with a given intrinsic matrix:
import numpy as np from pycvcam import Cv2Intrinsic intrinsic_matrix = numpy.array([[1000, 0, 320], [0, 1000, 240], [0, 0, 1]]) intrinsic = Cv2Intrinsic.from_matrix(intrinsic_matrix)