miop.registration¶
Classes
Class for performing 3D point cloud registration using Procrustes alignment, based on known point correspondences. |
|
|
Class for performing 3D point cloud registration using the Iterative Closest Point (ICP) algorithm. |
- class miop.registration.RegistrationByCorresp[source]¶
Bases:
DAGNodeClass for performing 3D point cloud registration using Procrustes alignment, based on known point correspondences.
- pcds_tr¶
List of registered point clouds. Set after calling eval().
- Type:
list of open3d.geometry.PointCloud
- compute_point_cloud(camera_position, dense_matches)[source]¶
Triangulates 3D points from matched 2D correspondences using affine camera models.
- Parameters:
camera_position (list of dict) – List containing intrinsic matrices and rotations for each camera/view.
dense_matches (list) – 2D point correspondences across image pairs.
- Returns:
Reconstructed 3D point clouds for each image pair.
- Return type:
list of list of np.ndarray
- eval(pcds, camera_position, corresponding_points)[source]¶
Aligns a set of point clouds using Procrustes registration based on known correspondences.
- Parameters:
pcds (list of list of np.ndarray) – Each element in the outer list corresponds to a face/view. Each inner element is a point cloud (N, 3).
camera_position (list of dict) – Camera intrinsic and rotation parameters for triangulation.
corresponding_points (list) – List of corresponding 2D points across views for triangulation.
- Returns:
Transformed point clouds aligned to a common frame.
- Return type:
list of open3d.geometry.PointCloud
- procrustes_3d(X, Y)[source]¶
Computes the optimal rotation and translation to align Y to X using the Procrustes algorithm.
- Parameters:
X (np.ndarray, shape (N, 3)) – Reference 3D point cloud.
Y (np.ndarray, shape (N, 3)) – Point cloud to align.
- Returns:
R (np.ndarray, shape (3, 3)) – Optimal rotation matrix.
t (np.ndarray, shape (3,)) – Optimal translation vector.
- class miop.registration.RegistrationByICP(threshold=32.0, trans_init=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]))[source]¶
Bases:
DAGNodeClass for performing 3D point cloud registration using the Iterative Closest Point (ICP) algorithm. This class is a wrapper for Open3D’s ICP implementation.
- threshold¶
Distance threshold for ICP correspondence matching. Default is 32.0.
- Type:
float
- trans_init¶
Initial transformation matrix used to start the ICP process. Default is identity.
- Type:
np.ndarray, shape (4, 4)
- pcds_reg¶
List of registered point clouds after running the eval() method.
- Type:
list of open3d.geometry.PointCloud
- eval(pcds)[source]¶
Registers a list of point clouds using the ICP algorithm.
- Parameters:
pcds (list of list of np.ndarray) – Each sublist represents a group of point clouds for a given face (or view group). Each point cloud is expected to be an (N, 3) NumPy array.
- Returns:
Registered and merged point clouds.
- Return type:
list of open3d.geometry.PointCloud