pycvcam.Cv2Extrinsic.from_frame#

classmethod Cv2Extrinsic.from_frame(frame)[source]#

Class method to create a Cv2Extrinsic object from a 3D frame.

Parameters:

frame (Frame) – The 3D frame of the camera in the world coordinate system. It should be a py3dframe.Frame object.

Returns:

A new instance of the Cv2Extrinsic class with the specified 3D frame.

Return type:

Cv2Extrinsic

Examples

Create an extrinsic object with a 3D frame:

from py3dframe import Frame
from pycvcam import Cv2Extrinsic

frame = Frame(translation=[0.5, 0.5, 0.5], rotation_vector=[0.1, 0.2, 0.3], convention=4)
extrinsic = Cv2Extrinsic.from_frame(frame)