【PCL】教程 interactive_icp.cpp 使用ICP算法对3D点云进行准确的对齐,并通过可视化展示算法的迭代过程...

本文详细介绍了使用PCL库实现的迭代最近点(ICP)算法,通过示例展示了如何对3D点云进行精确对齐,以及如何通过键盘事件控制算法迭代。代码中包含加载PLY文件、定义变换、执行ICP对齐和实时可视化的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

测试程序

4393a1ba7e81df44aec9cb5172beb272.png

ad2272cf0b7716875adecd708cb6c0a3.png

./interactive_icp ../monkey.ply 5

终端输出:

[pcl::PLYReader::listPropertyDefinitionCallback] no fitting callbacks. element_name=face, property_name=vertex_indices
[pcl::PLYReader] monkey.ply:14: property 'list uint8 uint32 vertex_indices' of element 'face' is not handled


Loaded file monkey.ply (31488 points) in 235.44 ms


Applying this rigid transformation to: cloud_in -> cloud_icp
Rotation matrix :
    |  0.924 -0.383  0.000 |
R = |  0.383  0.924  0.000 |
    |  0.000  0.000  1.000 |
Translation vector :
t = <  0.000,  0.000,  0.400 >


Applied 5 ICP iteration(s) in 255.85 ms


ICP has converged, score is 0.0149681
ICP has converged, score is +4e-03
ICP has converged, score is +3e-03> cloud_in
ICP has converged, score is +3e-03> cloud_in
ICP has converged, score is +2e-03> cloud_in
ICP has converged, score is +2e-03> cloud_in
ICP has converged, score is +1e-03> cloud_in
ICP has converged, score is +1e-03-> cloud_in
ICP has converged, score is +9e-04-> cloud_in
ICP has converged, score is +7e-04-> cloud_in
ICP has converged, score is +5e-04-> cloud_in
ICP has converged, score is +3e-04-> cloud_in
ICP has converged, score is +2e-04-> cloud_in
ICP has converged, score is +1e-04-> cloud_in
ICP has converged, score is +5e-05-> cloud_in
ICP has converged, score is +1e-06-> cloud_in
ICP has converged, score is +2e-05-> cloud_in
ICP has converged, score is +2e-06-> cloud_in
ICP has converged, score is +1e-10-> cloud_in
ICP has converged, score is +1e-11-> cloud_in
ICP has converged, score is +4e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +4e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP transformation 36 : cloud_icp -> cloud_in
ICP transformation 37 : cloud_icp -> cloud_in
Rotation matrix :82 -0.023 | >0433 ms
    |  0.924  0.382 -0.023 | >9019 ms
R = | -0.382  0.924  0.019 | >2053 ms
    |  0.029 -0.008  1.000 | >2671 ms
Translation vector :, -0.400 >7246 ms
t = < -0.005, -0.004, -0.400 >8765 ms
Applied 1 ICP iteration in 20.0796 ms

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值