sksurgerysurfacematch.pipelines.register_cloud_to_stereo_mosaic module¶
Pipeline to register 3D point cloud to mosaic’ed surface reconstruction.
-
class
sksurgerysurfacematch.pipelines.register_cloud_to_stereo_mosaic.Register3DToMosaicedStereoVideo(video_segmentor: sksurgerysurfacematch.interfaces.video_segmentor.VideoSegmentor, surface_reconstructor: sksurgerysurfacematch.algorithms.reconstructor_with_rectified_images.StereoReconstructorWithRectifiedImages, rigid_registration: sksurgerysurfacematch.interfaces.rigid_registration.RigidRegistration, left_camera_matrix: numpy.ndarray, right_camera_matrix: numpy.ndarray, left_to_right_rmat: numpy.ndarray, left_to_right_tvec: numpy.ndarray, min_number_of_keypoints: int = 25, max_fre_threshold=2, left_mask: numpy.ndarray = None, z_range: list = None, radius_removal: list = None, voxel_reduction: list = None)[source]¶ Bases:
objectClass to register a point cloud to a series of surfaces derived from stereo video, and stitched together.
-
grab(left_image: numpy.ndarray, right_image: numpy.ndarray)[source]¶ Call this repeatedly to grab a surface and use ORM key points to match previous reconstruction to the current frame.
Parameters: - left_image – undistorted, BGR image
- right_image – undistorted, BGR image
-
register(point_cloud: numpy.ndarray, initial_transform: numpy.ndarray = None)[source]¶ Registers a point cloud to the internal mosaicc’ed reconstruction.
Parameters: - point_cloud – [Nx3] points, each row, x,y,z, e.g. from CT/MR.
- initial_transform – [4x4] of initial rigid transform.
Returns: residual, [4x4] transform, of point_cloud to left camera space,
and [Mx6] reconstructed point cloud, as [x, y, z, r, g, b] rows.
-