Skip to content

Commit

Permalink
Update fpfh_icp python example to work with latest Open3d (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdila authored Jul 2, 2022
1 parent 1ac3090 commit 111e2ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions examples/teaser_python_fpfh_icp/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@
# local refinement using ICP
icp_sol = o3d.pipelines.registration.registration_icp(
A_pcd, B_pcd, NOISE_BOUND, T_teaser,
o3d.registration.TransformationEstimationPointToPoint(),
o3d.registration.ICPConvergenceCriteria(max_iteration=100))
o3d.pipelines.registration.TransformationEstimationPointToPoint(),
o3d.pipelines.registration.ICPConvergenceCriteria(max_iteration=100))
T_icp = icp_sol.transformation

# visualize the registration after ICP refinement
A_pcd_T_icp = copy.deepcopy(A_pcd).transform(T_icp)
o3d.visualization.draw_geometries([A_pcd_T_icp,B_pcd])




2 changes: 1 addition & 1 deletion examples/teaser_python_fpfh_icp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def extract_fpfh(pcd, voxel_size):
o3d.geometry.KDTreeSearchParamHybrid(radius=radius_normal, max_nn=30))

radius_feature = voxel_size * 5
fpfh = o3d.registration.compute_fpfh_feature(
fpfh = o3d.pipelines.registration.compute_fpfh_feature(
pcd, o3d.geometry.KDTreeSearchParamHybrid(radius=radius_feature, max_nn=100))
return np.array(fpfh.data).T

Expand Down

0 comments on commit 111e2ce

Please sign in to comment.