sksurgeryimage.calibration.dotty_grid_point_detector module

Dotty Grid implementation of PointDetector.

class sksurgeryimage.calibration.dotty_grid_point_detector.DottyGridPointDetector(model_points, list_of_indexes, camera_intrinsics, distortion_coefficients, scale=(1, 1), reference_image_size=None, rms=30, gaussian_sigma=5, threshold_window_size=151, threshold_offset=20, min_area=50, max_area=50000, dot_detector_params=None)[source]

Bases: sksurgeryimage.calibration.point_detector.PointDetector

Class to detect a grid of dots in a 2D grey scale video image.

More specifically, a grid of dots with 4 larger dots at known locations.

get_model_points()[source]

Returns a [Nx3] numpy ndarray representing the model points in 3D.

sksurgeryimage.calibration.dotty_grid_point_detector.get_model_points(dots_rows_columns: (<class 'int'>, <class 'int'>), pixels_per_mm: int, dot_separation: float) → numpy.ndarray[source]

Generate the expected locations of dots in the pattern, in pixel space.

Parameters:
  • dots_rows_columns ([int, int]) – Number of rows, number of columns
  • pixels_per_mm (int) – Pixels per mm
  • dot_separation (float) – Distance between dots in mm
Returns:

array pf point info - [id, x_pix, y_pix, x_mm, y_mm, z_mm]

Return type:

np.ndarray