pycvcam.read_transform#

read_transform(file_path, cls)[source]#

Reads a json files containing a transformation. The JSON file must contain the following keys: ‘parameters’, ‘constants’, and optional ‘type’.

from pycvcam import Cv2Distortion
from pycvcam import read_transform

transform = read_transform("transform.json", Cv2Distortion)

See also

pycvcam.write_transform() for the corresponding write function and more information on the JSON format.

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

  • cls (Type[Transform]) – The class of the Transform object to create.

Return type:

Transform