sksurgerysurfacematch.algorithms.stoyanov_reconstructor module

Surface reconstruction using Stoyanov MICCAI 2010 paper.

class sksurgerysurfacematch.algorithms.stoyanov_reconstructor.StoyanovReconstructor(use_hartley=False)[source]

Bases: sksurgerysurfacematch.interfaces.stereo_reconstructor.StereoReconstructor

Constructor.

reconstruct(left_image: numpy.ndarray, left_camera_matrix: numpy.ndarray, right_image: numpy.ndarray, right_camera_matrix: numpy.ndarray, left_to_right_rmat: numpy.ndarray, left_to_right_tvec: numpy.ndarray, left_mask: numpy.ndarray = None)[source]

Implementation of dense stereo surface reconstruction using Dan Stoyanov’s MICCAI 2010 method.

Camera parameters are those obtained from OpenCV.

Parameters:
  • left_image – undistorted left image, BGR
  • left_camera_matrix – [3x3] camera matrix
  • right_image – undistorted right image, BGR
  • right_camera_matrix – [3x3] camera matrix
  • left_to_right_rmat – [3x3] rotation matrix
  • left_to_right_tvec – [3x1] translation vector
  • left_mask – mask image, single channel, same size as left_image
Returns:

[Nx6] point cloud where the 6 columns

are x, y, z in left camera space, and r, g, b, colors.