camerastereo

NOTE: This module is a feature under developement.

class pyvale.camerastereo.CameraStereo(cam_data_0: CameraData, cam_data_1: CameraData)[source]

Bases: object

cam_data_0
cam_data_1
classmethod from_calibration(calib_path: Path, pos_world_0: ndarray, rot_world_0: Rotation, focal_length: float) Self[source]

A method to initialise the CameraStereo using a calibration file and some additional parameters. This creates an instance of the CameraStereo class from the calibration parameters.

Parameters:
  • calib_path (Path) -- The path to the calibration file (in yaml format).

  • pos_world_0 (np.ndarray) -- The position of camera 0 in world coordinates.

  • rot_world_0 (Rotation) -- The rotation of camera 0 in world coordinates.

  • focal_length (float) -- The focal length of camera 0.

Returns:

Self -- An instance of the CameraStereo class, given the specified parameters.

save_calibration(base_dir: Path) None[source]

A method to save a calibration file of the stereo system as a yaml. This is so that the file can easily be read into python, but is also user-readable.

Parameters:

base_dir (Path) -- The base directory to which all files should be saved. The calibration file will be saved in a sub-directory named "calibration" within this directory.

Raises:

BlenderError -- "The specified save directory does not exist"

save_calibration_mid(base_dir: Path) None[source]

A method to save a calibration file of the stereo system in a MatchID accepted format.

Parameters:

base_dir (Path) -- The base directory to which all files should be saved. The calibration file will be saved in a sub-directory named "calibration" within this directory.

Raises:

BlenderError -- "The specified save directory does not exist"

stereo_dist
stereo_rotation