1from __future__
import annotations
4from typing
import Any, cast
7from ids_peak_icv
import lib_loader
17 Class for handling extrinsic parameters related to camera calibration.
19 This class stores and provides access to the extrinsic parameters, which include
20 the translation, rotation, and transformation matrix.
22 It is a result of the camera calibration or the workspace calibration.
24 The extrinsic camera parameters describe the transformation between the camera's coordinate system and the world coordinate system.
25 They can be used to convert points from the world coordinate system into the camera coordinate system.
27 @ingroup ids_peak_icv_python_calibration
28 @since ids_peak_icv 1.1
31 def __init__(self, *args: Any, **kwargs: Any) ->
None:
34 Initializes an instance of ExtrinsicParameters.
36 @since ids_peak_icv 1.1
40 self.
_parameters: peak_icv_extrinsic_parameters = kwargs[
"_parameters"]
42 raise NotPossibleException(
"{} shall not be initialized directly".format(self.__class__.__name__))
50 Returns the translation vector associated with the extrinsic parameters.
52 @return The translation as a numpy array (3D vector).
54 @since ids_peak_icv 1.1
63 Returns the rotation vector (Rodrigues rotation) associated with the extrinsic parameters.
65 @return The rotation as a numpy array (3D vector).
67 @since ids_peak_icv 1.1
76 Returns the transformation matrix calculated from the rotation and translation vectors.
78 @return A 4x4 transformation matrix.
80 @since ids_peak_icv 1.1
88 execute_and_map_return_codes(
89 lib_loader.dll().peak_icv_Calibration_Extrinsic_CalculateTransformationMatrix,
95 def __eq__(self, other: object) -> bool:
96 if not isinstance(other, ExtrinsicParameters):
98 return ctypes_objects_equal(self.
_parameters, other._parameters)
Class for handling extrinsic parameters related to camera calibration.
peak_icv_extrinsic_parameters _parameters
PointXYZ translation(self)
Returns the translation vector associated with the extrinsic parameters.
np.ndarray transformation_matrix(self)
Returns the transformation matrix calculated from the rotation and translation vectors.
None __init__(self, *Any args, **Any kwargs)
Initializes an instance of ExtrinsicParameters.
PointXYZ rotation(self)
Returns the rotation vector (Rodrigues rotation) associated with the extrinsic parameters.
bool __eq__(self, object other)
np.ndarray|None _transformation_matrix
Represents a point in 3D space.
Thrown when an operation cannot be performed due to logical constraints.