pycvcam.write_transform#

write_transform(file_path, transform)[source]#

Convenience function to write a Transform object to a JSON file.

See also

pycvcam.core.Transform.to_json() for the corresponding method to convert a Transform object to JSON format.

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 writing function that uses the pycvcam.core.Transform.to_json() method directly.

Parameters:
  • file_path (str) – The path to the JSON file to write to.

  • transform (Transform) – The Transform object to write to the JSON file.

Returns:

This function does not return anything, it writes the Transform object to the specified JSON file.

Return type:

None