其中PCL庫(kù)的安裝:(要翻墻才可以訪問(wèn))
推薦參考:http://gyshgx868.github.io/2018/03/06/PointCloud/pcl-install/
目前我所學(xué)習(xí)到的方法有三種
1.使用pcl::registration::CorrespondenceEstimation
2.使用flann庫(kù)
3.使用pcl::search::Kdtree
方法一:使pcl::registration::CorrespondenceEstimation
參考代碼樣例:
建議參考網(wǎng)址:
https://github.com/otherlab/pcl/blob/master/test/registration/test_registration_api.cpp
和https://blog.csdn.net/qq_36501182/article/details/79173161

當(dāng)然:在建立?
pcl::registration::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointXYZ> corr_est時(shí)候,也可以不適用pcl::PointXYZ作為匹配類(lèi)型,可以使用其他特征比如:pcl::FPFHSignature33等,構(gòu)建
pcl::registration::CorrespondenceEstimation<pcl::FPFHSignature33, pcl::FPFHSignature33> corr_est
方法二:使用flann庫(kù)
值得注意的是,PCL庫(kù)應(yīng)該是包含了flann庫(kù)的,所以如果以及安裝pcl庫(kù),則不需要單獨(dú)裝flann庫(kù)。這里的例子直接看鏈接中的即可,個(gè)人感覺(jué)使用flann庫(kù)有點(diǎn)麻煩。
參考鏈接:https://blog.csdn.net/u011091739/article/details/80690647
方法三:使用pcl::search::Kdtree
同樣,貼兩個(gè)參考代碼的網(wǎng)址
https://blog.csdn.net/hanshuobest/article/details/50852663
和
https://github.com/PointCloudLibrary/pcl/blob/master/doc/tutorials/content/sources/iros2011/src/correspondence_viewer.cpp
其中鏈接一:只針對(duì)了某一個(gè)點(diǎn)在另一個(gè)點(diǎn)云中的對(duì)應(yīng)點(diǎn)匹配,可以作為基礎(chǔ)看,沒(méi)啥難度,這里不講了。
鏈接二:推薦,官方案例而且也很好懂,是兩個(gè)點(diǎn)云之間的匹配。主要關(guān)注下面這個(gè)函數(shù):

其中可能不懂的點(diǎn)在于LocalDescriptor是什么類(lèi)型,這里找到他的頭文件定義:
https://github.com/PointCloudLibrary/pcl/blob/master/doc/tutorials/content/sources/iros2011/include/typedefs.h

也就是說(shuō),通過(guò)kdTree是以pcl::FPFHSignature33這個(gè)特征作為匹配依據(jù)的。
最后:
如果不知道pcl::pcl::FPFHSignature33等特征是什么的小伙伴,建議看看:
http://pointclouds.org/documentation/tutorials/#features-tutorial這篇官方教程里面的Feature部分。講的很清楚。