pycvcam.TransformComposition.from_dict#
- classmethod TransformComposition.from_dict(data)[source]#
Create a TransformComposition object from a dictionary.
The input dictionary should have the following structure:
{ "type": "TransformComposition", "version": "1.3.0", "date": "2023-01-01T00:00:00", "transforms": [ { "type": "Cv2Distortion", "version": "1.3.0", "date": "2023-01-01T00:00:00", "parameters": [0.1, 0.2, 0.3, 0.01, 0.5], "constants": null }, { "type": "Cv2Distortion", "version": "1.3.0", "date": "2023-01-01T00:00:00", "parameters": [0.1, 0.2, 0.3, 0.01, 0.5], "constants": null } ] }
See also
to_dict(): Method to serialize the TransformComposition object to a dictionary.
- Parameters:
data (Dict[str, Any]) – A dictionary representation of the transformation.
- Returns:
A TransformComposition object created from the input dictionary.
- Return type:
- Raises:
ValueError – If the input dictionary does not contain the required keys or has invalid values.