Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Kernel crashes when running the ICP algorithm in Python.

Open qinjiaying opened this issue 1 year ago • 0 comments

Checklist

My Question

Attempting to register two frames of point clouds using the ICP algorithm, but the kernel crashes. Conda version is 24.5.0, Python version is 3.9.19, and the latest Python packages are installed. There are no issues with the CPU or RAM. Where might the problem be?

加载数据库

# import open3d as o3d
# import numpy as np
# import laspy
# import copy
# import os
# import subprocess
# accumulated_target_pcd = o3d.geometry.PointCloud()

处理第一个点云文件

# first_ply_path = f"E:/Auguest_collect_data/c83-b/ply/1.ply"

读取第一个点云并

# accumulated_target_pcd = o3d.io.read_point_cloud(first_ply_path)

# ply_path = f"E:/Auguest_collect_data/c83-b/ply/2.ply"
# source = o3d.io.read_point_cloud(ply_path)

执行ICP配准,将源点云与累积的目标点云对齐

# icp_result = o3d.pipelines.registration.registration_icp(
    # source, accumulated_target_pcd, 0.05, np.eye(4),
    # o3d.pipelines.registration.TransformationEstimationPointToPoint(),
    # o3d.pipelines.registration.ICPConvergenceCriteria(max_iteration=1000)
# )

# 应用变换
# source.transform(icp_result.transformation)
# o3d.io.write_point_cloud(f"E:/Auguest_collect_data/c83-b/test_ply/ply_{i}.ply", source)

将变换后的源点云合并到累积点云中

# accumulated_target_pcd += source

# o3d.io.write_point_cloud(f"E:/Auguest_collect_data/c83-b/test_ply/accumulated_target_pcd.ply", accumulated_target_pcd)

“”” “”” { # "name": "", # "message": "", # "stack": "The Kernel crashed while executing code in this or the previous cell. Please review the code in the cell to # identify the possible cause of the failure. For more details, click <a # href='https://aka.ms/vscodeJupyterKernelCrash'>here. For more detailed information, check the Jupyter <a # href='command:jupyter.viewOutput'>log." # } “””

qinjiaying avatar Aug 23 '24 07:08 qinjiaying