当前位置: 首页 > news >正文

Open3d:点对点ICP配准,点对面ICP配准

1.点对点ICP配准

print("Apply point-to-point ICP")
reg_p2p = o3d.pipelines.registration.registration_icp(source, target, threshold, trans_init,o3d.pipelines.registration.TransformationEstimationPointToPoint())
print(reg_p2p)
print("Transformation is:")
print(reg_p2p.transformation)
draw_registration_result(source, target, reg_p2p.transformation)

2.点对面ICP配准

print("Apply point-to-plane ICP")
reg_p2l = o3d.pipelines.registration.registration_icp(source, target, threshold, trans_init,o3d.pipelines.registration.TransformationEstimationPointToPlane())
print(reg_p2l)
print("Transformation is:")
print(reg_p2l.transformation)
draw_registration_result(source, target, reg_p2l.transformation)

3.分析

import open3d as o3d
import numpy as np# 读取点云
source = o3d.io.read_point_cloud("source.pcd")
target = o3d.io.read_point_cloud("target.pcd")# 计算法线(必需步骤)
source.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
#保持法线一致性, 使得法线均朝gu帽上方
source.orient_normals_towards_camera_location([0, 0, 0])target.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
#保持法线一致性, 使得法线均朝gu帽上方
target.orient_normals_towards_camera_location([0, 0, 0])# 设置ICP参数
max_correspondence_distance = 0.05
init_transformation = np.identity(4)# 创建Point-to-Plane估计器
estimation_method = o3d.pipelines.registration.TransformationEstimationPointToPlane()# 设置收敛准则
criteria = o3d.pipelines.registration.ICPConvergenceCriteria()
criteria.relative_fitness = 1e-6
criteria.relative_rmse = 1e-6
criteria.max_iteration = 100# 执行ICP配准
result = o3d.pipelines.registration.registration_icp(source, target, max_correspondence_distance,init_transformation, estimation_method, criteria
)print("变换矩阵:\n", result.transformation)
print("拟合度:", result.fitness)
print("内点RMSE:", result.inlier_rmse)

p2p-icp

p2l-icp

总结对比表:

方法类型目标函数优化目标收敛速度是否需要法向量
Point-to-point最小化点对之间的欧氏距离点对齐较慢
Point-to-plane最小化点到对应点切平面的距离点落在局部平面较快

Point-to-plane ICP 精度更高的核心原因

比较维度Point-to-pointPoint-to-plane
对齐方式强制点对重合允许滑移到局部平面,避免过拟合
对噪声的鲁棒性差(点对误差会被平方放大)好(法向约束平滑误差)
对初始误差容忍度
局部最优陷阱容易陷入更不易陷入
需要法向量是(但这也是它能更准的前提)

但需要注意:

  • 精度高的前提是法向量必须准确。如果法向量估计不准,Point-to-plane 反而可能更差。

  • Point-to-point 在某些低曲率或平面区域反而可能更稳定,因为没有法向量误差。


✅ 实际建议(工程经验):

  • 有可靠法向量 → 用 Point-to-plane

  • 法向量不可靠或无 → 用 Point-to-point 或先做平滑处理


📌 总结一句话:

在法向量准确的前提下,Point-to-plane ICP 的配准精度更高、更鲁棒。

参考资料:

1.ICP备案 - Open3D 0.19.0 文档

2.kimi.ai

3.deepseek.ai

http://www.dtcms.com/a/346394.html

相关文章:

  • 105.QML实现现代Neumorphism风格界面01-Button实现
  • 如何提升科研能力:先停止“无效工作”,开始“有效科研”
  • 第二节阶段WinFrom-5:文件操作
  • 车载诊断架构 --- EOL引起关于DTC检测开始条件的思考
  • Linux822 shell:expect 批量
  • 《C++起源与核心:版本演进+命名空间法》
  • 易基因:Nat Commun/IF15.7:多组学研究揭示UHRF2在原始生殖细胞DNA甲基化重编程中的抗性调控机制
  • 光耦合器:电子世界的 “光桥梁“
  • Opnecv详细介绍
  • 量子计算基础
  • C#_组合优于继承的实际应用
  • 音视频处理工作室:实时通信的媒体层设计
  • 容器操作案例
  • C语言——内存函数
  • TTS文字合成语音芯片的使用场景
  • No module named blake2b
  • GaussDB GaussDB 数据库架构师修炼(十八)SQL引擎(1)-SQL执行流程
  • ODDR双边沿数据输出
  • 1小时检测cAMP的武功秘籍
  • AI 绘画争议背后:版权归属、艺术原创性与技术美学的三方博弈
  • Linux系统安装llama-cpp并部署ERNIE-4.5-0.3B
  • Unity--判断一个点是否在扇形区域里面(点乘和叉乘的应用)
  • Day2--HOT100--283. 移动零,11. 盛最多水的容器,15. 三数之和
  • 94. 城市间货物运输 I, Bellman_ford 算法, Bellman_ford 队列优化算法
  • 【Android】 连接wifi时,强制应用使用流量
  • 反射【Reflect】
  • 深入浅出【最小生成树】:Prim与Kruskal算法详解
  • 111、【OS】【Nuttx】【周边】效果呈现方案解析:-print0 选项
  • AQS模板方法
  • 使用 Google 开源 AI 工具 LangExtract 进行结构化信息抽取