Open3D点云基础操作报错退出(错误码3221225477)求助
Open3D 0.18.0操作点云触发错误码3221225477的问题
问题现象
- 点云可正常可视化,但执行
transform、paint_uniform_color等操作时,程序直接以错误码3221225477退出 - 向
o3d.visualization.draw_geometries传递相机参数时,该函数无法正常工作 - 注释掉
source.transform(transformation)、source.paint_uniform_color及target.paint_uniform_color相关代码后,程序可正常运行并可视化点云
环境信息
- 系统:Windows 10 64位
- Python版本:3.11.9
- 处理器:x64架构
- Open3D版本:0.18.0,通过pip安装
已尝试的解决方法
- 在虚拟环境中运行代码
- 使用以下命令重新安装Open3D:
pip install open3dpip3 install open3dpip install --user open3d
以上操作均未解决问题
运行代码
import open3d as o3d import numpy as np import matplotlib.pyplot as plt import os import sys def draw_registration_result(source, target, transformation): #source_temp = copy.deep_copy(source) #target_temp = copy.deepcopy(target) source.paint_uniform_color([1, 0.706, 0]) target.paint_uniform_color([0, 0.651, 0.929]) #source.transform(transformation) o3d.visualization.draw_geometries([source, target]) def preprocess_point_cloud(pcd, voxel_size): print(":: Downsample with a voxel size %.3f." % voxel_size) pcd_down = pcd.voxel_down_sample(voxel_size = voxel_size) radius_normal = voxel_size * 2 radius_feature = voxel_size * 5 print(":: Estimate normal with search radius %.3f." % radius_normal) pcd_down.estimate_normals(o3d.geometry.KDTreeSearchParamHybrid(radius = radius_normal, max_nn = 30)) print(":: Compute FPFH feature with search radius %.3f." % radius_feature) pcd_fpfh = o3d.pipelines.registration.compute_fpfh_feature(pcd_down, o3d.geometry.KDTreeSearchParamHybrid(radius = radius_feature, max_nn = 100)) return pcd_down, pcd_fpfh def prepare_dataset(voxel_size): print(":: Load two point clouds and disturb initial pose.") demo_icp_pcds = o3d.data.DemoICPPointClouds() source = o3d.io.read_point_cloud(demo_icp_pcds.paths[0]) target = o3d.io.read_point_cloud(demo_icp_pcds.paths[1]) transformation = np.asarray([[0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0]]) source.transform(transformation) draw_registration_result(source, target, np.identity(4)) source_down, source_fpfh = preprocess_point_cloud(source, voxel_size) target_down, target_fpfh = preprocess_point_cloud(target, voxel_size) return source, target, source_down, target_down, source_fpfh, target_fpfh voxel_size = 0.05 source, target, source_down, target_down, source_fpfh, target_fpfh = prepare_dataset(voxel_size)
报错信息
[Running] python -u "d:\python\Open3D\Practice.py" :: Load two point clouds and disturb initial pose. [Done] exited with code=3221225477 in 2.787 seconds
内容的提问来源于stack exchange,提问作者Abhishek Mahato
相关产品推荐
相关产品推荐

