pycvcam.read_transform#
- read_transform(file_path, cls=None)[source]#
Convenience function to read a Transform object from a JSON file.
See also
pycvcam.core.Transform.to_json()for the corresponding method to write a Transform object to JSON format. The JSON file must contain the following keys: ‘parameters’, ‘constants’, and optional ‘type’.Important
This function only works with the default Transform subclasses defined in pycvcam. If you have a custom Transform subclass, you should implement your own reading function that uses the
pycvcam.core.Transform.from_json()method directly.- Parameters:
- Returns:
An instance of the specified Transform subclass with parameters and constants loaded from the JSON file.
- Return type: