sksurgerysurfacematch.interfaces.stereo_reconstructor module¶
Base class (pure virtual interface) for classes that do stereo recon.
-
class
sksurgerysurfacematch.interfaces.stereo_reconstructor.
StereoReconstructor
[source]¶ Bases:
object
Base class for stereo reconstruction algorithms. Clients call the reconstruct() method, passing in undistorted images. The output is an [Nx6] array where the N rows are each point, and the 6 columns are x, y, z, r, g, b.
-
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]¶ A derived class must implement this.
Camera parameters are those obtained from OpenCV.
Parameters: - left_image – left image, BGR
- left_camera_matrix – [3x3] camera matrix
- right_image – 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 in left camera space, where N is the number
of points, and 6 columns are x,y,z,r,g,b.
-