一、代码
Python
import sys
import time
import open3d as o3d
import numpy as np
import copy
import keyboard
import imageio
def gicp_reg(source_temp, target_temp, distance, trans_init):
reg_p = o3d.pipelines.registration.registration_generalized_icp(
source_temp, target_temp,
max_correspondence_distance=distance,
init=trans_init,
estimation_method=o3d.pipelines.registration.TransformationEstimationForGeneralizedICP(),
criteria=o3d.pipelines.registration.ICPConvergenceCriteria(
max_iteration=1
)
)
source_temp.transform(reg_p.transformation)
trans_init = reg_p.transformation
return source_temp, trans_init
def icp_reg(source_temp, tar