camerastereo.py¶
NOTE: This module is a feature under developement.
- class CameraStereo(cam_data_0, cam_data_1)[source]¶
Bases:
object
- cam_data_0¶
- cam_data_1¶
- stereo_rotation¶
- stereo_dist¶
- classmethod from_calibration(calib_path, pos_world_0, rot_world_0, focal_length)[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)[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)[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”