sksurgerycalibration.video.video_calibration_data module

Containers for video calibration data.

class sksurgerycalibration.video.video_calibration_data.BaseVideoCalibrationData[source]

Bases: object

Constructor, no member variables, so just a pure virtual interface.

Not really necessary if you rely on duck-typing, but at least it shows the intention of what derived classes should implement, and means we can use this base class to type check against.

get_number_of_views()[source]

Returns the number of views of data.

load_data(dir_name: str, file_prefix: str)[source]

Loads all contained data from disk.

pop()[source]

Remove the last view of data.

reinit()[source]

Used to clear, re-initialise all member variables.

save_data(dir_name: str, file_prefix: str)[source]

Writes all contained data to disk.

class sksurgerycalibration.video.video_calibration_data.MonoVideoData[source]

Bases: sksurgerycalibration.video.video_calibration_data.BaseVideoCalibrationData

Stores data extracted from each video view of a mono calibration.

get_number_of_views()[source]

Returns the number of views.

load_data(dir_name: str, file_prefix: str)[source]

Loads the calibration data.

Parameters:
  • dir_name – directory to load from
  • file_prefix – prefix for all files
pop()[source]

Removes the last (most recent) view of data.

push(image, ids, object_points, image_points)[source]

Stores another view of data. Copies data.

reinit()[source]

Deletes all data.

save_annotated_images(dir_name: str, file_prefix: str)[source]

Saves video images, annotated with the ID of each 2D point detected.

save_data(dir_name: str, file_prefix: str)[source]

Saves the calibration data to lots of different files.

Parameters:
  • dir_name – directory to save to
  • file_prefix – prefix for all files
class sksurgerycalibration.video.video_calibration_data.StereoVideoData[source]

Bases: sksurgerycalibration.video.video_calibration_data.BaseVideoCalibrationData

Stores data extracted from each view of a stereo calibration.

get_number_of_views()[source]

Returns the number of views.

load_data(dir_name: str, file_prefix: str)[source]

Loads the calibration data.

Parameters:
  • dir_name – directory to load from
  • file_prefix – prefix for all files
pop()[source]

Removes the last (most recent) view of data.

push(left_image, left_ids, left_object_points, left_image_points, right_image, right_ids, right_object_points, right_image_points)[source]

Stores another view of data. Copies data.

reinit()[source]

Deletes all data.

save_annotated_images(dir_name: str, file_prefix: str)[source]

Saves video images, annotated with the ID of each 2D point detected.

save_data(dir_name: str, file_prefix: str)[source]

Saves the calibration data to lots of different files.

Parameters:
  • dir_name – directory to save to
  • file_prefix – prefix for all files
class sksurgerycalibration.video.video_calibration_data.TrackingData[source]

Bases: sksurgerycalibration.video.video_calibration_data.BaseVideoCalibrationData

Class for storing tracking data.

get_number_of_views()[source]

Returns the number of views of data. :return: int

load_data(dir_name: str, file_prefix: str)[source]

Loads tracking data from files.

Parameters:
  • dir_name – directory to load from
  • file_prefix – prefix for all files
pop()[source]

Removes the last (most recent) view of data.

push(device_tracking, calibration_tracking)[source]

Stores a pair of tracking data.

Parameters:
  • device_tracking – transformation for the thing you’re tracking
  • calibration_tracking – transformation for tracked calibration obj
reinit()[source]

Deletes all data.

save_data(dir_name: str, file_prefix: str)[source]

Saves the tracking data to lots of different files.

Parameters:
  • dir_name – directory to save to
  • file_prefix – prefix for all files