sksurgeryimage.calibration.aruco_point_detector module

ArUco implementation of PointDetector.

class sksurgeryimage.calibration.aruco_point_detector.ArucoPointDetector(dictionary, parameters, model, scale=(1, 1))[source]

Bases: sksurgeryimage.calibration.point_detector.PointDetector

Class to detect ArUco points in a 2D grey scale video image.

Note: For ArUco points, these don’t have to be on a regular grid. If you provide a ‘model’ which is a map of id : 3D point, the function _internal_get_points will provide the corresponding 3D points of those points that were detected.

get_model_points()[source]

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

sksurgeryimage.calibration.aruco_point_detector.get_intersect(a_1, a_2, b_1, b_2)[source]

Returns the point of intersection of the lines passing through a2,a1 and b2,b1.

See https://stackoverflow.com/questions/3252194/numpy-and-line-intersections

Parameters:
  • a_1 – [x, y] a point on the first line
  • a_2 – [x, y] another point on the first line
  • b_1 – [x, y] a point on the second line
  • b_2 – [x, y] another point on the second line