trifinger_cameras.camera_calibration_file module

class trifinger_cameras.camera_calibration_file.CameraCalibrationFile(filename: str)[source]

Bases: object

Simplifies access to the data in a camera calibration file.

get_array(name: str) ndarray[source]

Get the specified array from the calibration data.

Parameters:

name – Name of the array (e.g. “camera_matrix”).

Returns:

The array with the specified name.

trifinger_cameras.camera_calibration_file.config_to_array(data: dict) ndarray[source]

Convert a dictionary with keys “data”, “rows” and “cols” to an array.

Parameters:

data – Dictionary containing the following keys: - “data”: a flat list with the array data. - “rows”: The number of rows in the array. - “cols”: The number of columns in the array.

Returns:

The given data as an array of shape (“rows”, “cols”).