isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.35k stars 2.29k forks source link

Trying to follow Advanced Global Registration Tutorial and getting error #3258

Closed Dalecn109 closed 3 years ago

Dalecn109 commented 3 years ago

http://www.open3d.org/docs/latest/tutorial/Advanced/global_registration.html

def execute_global_registration(source_down, target_down, source_fpfh, target_fpfh, voxel_size):#TEMP distance_threshold = voxel_size * 1.5 print(":: RANSAC registration on downsampled point clouds.") print(" Since the downsampling voxel size is %.3f," % voxel_size) print(" we use a liberal distance threshold %.3f." % distance_threshold) result = o3d.pipelines.registration.registration_ransac_based_on_feature_matching( source_down, target_down, source_fpfh, target_fpfh, distance_threshold, o3d.pipelines.registration.TransformationEstimationPointToPoint(False), 4, [ o3d.pipelines.registration.CorrespondenceCheckerBasedOnEdgeLength(0.9), o3d.pipelines.registration.CorrespondenceCheckerBasedOnDistance(distance_threshold) ], o3d.pipelines.registration.RANSACConvergenceCriteria(4000000, 500)) return result

execute_global_registration result = o3d.pipelines.registration.registration_ransac_based_on_feature_matching( TypeError: registration_ransac_based_on_feature_matching(): incompatible function arguments. The following argument types are supported:

  1. (source: open3d.cpu.pybind.geometry.PointCloud, target: open3d.cpu.pybind.geometry.PointCloud, source_feature: open3d::pipelines::registration::Feature, target_feature: open3d::pipelines::registration::Feature, mutual_filter: bool, max_correspondence_distance: float, estimation_method: open3d.cpu.pybind.pipelines.registration.TransformationEstimation = TransformationEstimationPointToPoint without scaling., ransac_n: int = 3, checkers: List[open3d.cpu.pybind.pipelines.registration.CorrespondenceChecker] = [], criteria: open3d.cpu.pybind.pipelines.registration.RANSACConvergenceCriteria = RANSACConvergenceCriteria class with max_iteration=100000, and confidence=9.990000e-01) -> open3d.cpu.pybind.pipelines.registration.RegistrationResult

Invoked with: PointCloud with 159 points., PointCloud with 108 points., Feature class with dimension = 33 and num = 159 Access its data via data member., Feature class with dimension = 33 and num = 108 Access its data via data member., 0.07500000000000001, TransformationEstimationPointToPoint without scaling., 4, [CorrespondenceCheckerBasedOnEdgeLength with similarity_threshold=0.900000, CorrespondenceCheckerBasedOnDistance with distance_threshold=0.075000], RANSACConvergenceCriteria class with max_iteration=4000000, and confidence=5.000000e+02

Any ideas what could be causing this

Is it something to do with the change in pointcloud types or something of http://www.open3d.org/docs/latest/python_api/open3d.registration.registration_ransac_based_on_feature_matching.html and http://www.open3d.org/docs/release/python_api/open3d.pipelines.registration.registration_ransac_based_on_feature_matching.html Because the pointclouds go from being open3d.geometry.PointCloud to open3d.cpu.pybind.geometry.PointCloud if so how do i fix this.

kjans123 commented 3 years ago

@Dalecn109 did you ever find a solution to this?