点云的配准是将从不同视角获取的点云进行配准,合成一幅在相同坐标系下的完成的点云。一般有手动配准和自动配准。
按我的理解,主要用到的是刚体变换,找到关键点,通过旋转平移实现两两配准。
本代码基于pcl_recognition模块执行3D对象识别。具体来说,它解释了如何使用对应分组Correspondence Grouping 算法,将在3D描述符匹配阶段之后获得的点对点对应集聚类成当前场景中存在的模型实例。对于表示场景中可能的模型实例的每个聚类,对应分组算法还输出变换矩阵,该变换矩阵识别当前场景中该模型的6自由度姿态估计。
code:
(1)showhelp //打印,即命令行显示
(2)parseCommandLine //对命令行的参数进行实际的解析
本码提供了两种聚类算法
You can choose between two correspondence clustering algorithms with the command line switch --algorithm (Hough|GC)
Hough (default)
This is a clustering algorithm based on a 3D Hough voting scheme described in:
F. Tombari and L. Di Stefano: “Object recognition in 3D scenes with occlusions and clutter by Hough voting”, 4th Pacific-Rim Symposium on Image and Video Technology, 2010.
GC
This is a geometric consistency clustering algorithm enforcing simple geometric constraints between pairs of correspondences. It builds on the proposal presented in:
H. Chen and B. Bhanu: “3D free-form object recognition in range images using local surface patches”, Pattern Recognition Letters, vol. 28, no. 10, pp. 1252-1262, 2007.
(3)computeCloudResolution //计算空间分辨率,计算点与其近邻点间平均距离
(4)main //主函数
创建场景和模型点云对象-----加载场景和模型点云------设置分辨率不变性-----计算法线-----下采样提取关键点-----计算关键点的描述符SHOT-----用KDtree找到模型-场景的对应-----聚类-----输出结果-----可视化
代码链接 http://pointclouds.org/documentation/tutorials/correspondence_grouping.php
原来的点云:
命令行如下,那是官网参数,如果要换别的点云,自己试。
https://blog.csdn.net/lizhengze1117/article/details/103230261 可以参考下这个的命令行参数。试下 -c
窗口显示:
-k -r
-k -c -r
跑后感:it's so complex for me . girl 就要有 girl 的样子 ,don't cry cry cry de .
底下这个是用的GC聚类,就是他的另一种--algorithm,显示的这咱也不明白。what's the hell !!!
参考:
https://github.com/PointCloudLibrary/data 这是GitHub上点云数据的链接
http://pointclouds.org/documentation/tutorials/correspondence_grouping.php 代码介绍