pysdic.Camera.from_composition#
- classmethod Camera.from_composition(composition, sensor_height, sensor_width)[source]#
Create a Camera object from a
pysdic.ComposedTransformationof three transformations[extrinsic, distortion, intrinsic](for example built withpysdic.compose_projection()).The transformations are not copied: the camera and the composition share them.
- Parameters:
composition (
pysdic.ComposedTransformation) – The composition[extrinsic, distortion, intrinsic].sensor_height (Integral) – The height of the camera sensor in pixels.
sensor_width (Integral) – The width of the camera sensor in pixels.
- Returns:
A new Camera object using the transformations of the composition.
- Return type:
- Raises:
TypeError – If
compositionis not apysdic.ComposedTransformation.ValueError – If the composition does not contain exactly 3 transformations.