日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

PCL:描述三维离散点的ROPS特征(Code)

發(fā)布時間:2023/12/31 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PCL:描述三维离散点的ROPS特征(Code) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

前言:

?????? 三維點云為三維歐式空間點的集合。對點云的形狀描述若使用局部特征,則可分為兩種:固定世界坐標系的局部描述和尋找局部主方向的局部描述,ROPS特征為尋找局部主方向的特征描述。

1.尋找主方向(對XYZ軸經(jīng)過特定旋轉(zhuǎn))LFR:

???????? <1>.計算法線特征:這一步是非常耗計算量的,若達到可以接受的法線精度,此過程幾乎占據(jù)了 整個計算過程的50%;可選擇的方法有 使用空間樹索引建立近鄰域,對近鄰平面擬合,平面的參數(shù)方向既是法線一個方向。

???????? <2>.進行多邊形重建:利用貪婪投影的方法進行三角形重建,這個事一個調(diào)參數(shù)的過程,沒有可以完全的方法。

??????????????? 參數(shù)有:

gp3.setSearchMethod (treeNor);gp3.setSearchRadius (Gp3PolyParam.SearchRadius);// Set 最大搜索半徑gp3.setMu (Gp3PolyParam.MuTypeValue);// Set typical values gp3.setMaximumNearestNeighbors (Gp3PolyParam.MaximumNearestNeighbors);gp3.setMaximumSurfaceAngle (Gp3PolyParam.MaximumSurfaceAngle); // 45 度gp3.setMinimumAngle ( Gp3PolyParam.MinimumAngle); // 10 度gp3.setMaximumAngle (Gp3PolyParam.MaximumAngle); // 120 度gp3.setNormalConsistency (Gp3PolyParam.NormalConsistency);

?

???????? <3>.計算整幅圖像的ROPS特征:

?????????? 查找PCL官網(wǎng)的tutoriales:http://pointclouds.org/documentation/tutorials/rops_feature.php。

#include <pcl/features/rops_estimation.h> #include <pcl/io/pcd_io.h>int main (int argc, char** argv) {if (argc != 4)return (-1);pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ> ());if (pcl::io::loadPCDFile (argv[1], *cloud) == -1)return (-1);pcl::PointIndicesPtr indices = boost::shared_ptr <pcl::PointIndices> (new pcl::PointIndices ());std::ifstream indices_file;indices_file.open (argv[2], std::ifstream::in);for (std::string line; std::getline (indices_file, line);){std::istringstream in (line);unsigned int index = 0;in >> index;indices->indices.push_back (index - 1);}indices_file.close ();std::vector <pcl::Vertices> triangles;std::ifstream triangles_file;triangles_file.open (argv[3], std::ifstream::in);for (std::string line; std::getline (triangles_file, line);){pcl::Vertices triangle;std::istringstream in (line);unsigned int vertex = 0;in >> vertex;triangle.vertices.push_back (vertex - 1);in >> vertex;triangle.vertices.push_back (vertex - 1);in >> vertex;triangle.vertices.push_back (vertex - 1);triangles.push_back (triangle);}float support_radius = 0.0285f;unsigned int number_of_partition_bins = 5;unsigned int number_of_rotations = 3;pcl::search::KdTree<pcl::PointXYZ>::Ptr search_method (new pcl::search::KdTree<pcl::PointXYZ>);search_method->setInputCloud (cloud);pcl::ROPSEstimation <pcl::PointXYZ, pcl::Histogram <135> > feature_estimator;feature_estimator.setSearchMethod (search_method);feature_estimator.setSearchSurface (cloud);feature_estimator.setInputCloud (cloud);feature_estimator.setIndices (indices);feature_estimator.setTriangles (triangles);feature_estimator.setRadiusSearch (support_radius);feature_estimator.setNumberOfPartitionBins (number_of_partition_bins);feature_estimator.setNumberOfRotations (number_of_rotations);feature_estimator.setSupportRadius (support_radius);pcl::PointCloud<pcl::Histogram <135> >::Ptr histograms (new pcl::PointCloud <pcl::Histogram <135> > ());feature_estimator.compute (*histograms);return (0); }

文章鏈接:Rotational Projection Statistics for 3D Local Surface Description and Object Recognition;

A spin image is generated by projecting a local surface onto a 2D plane using a cylindrical parametrization. Similarly, a snapshot is obtained by rendering a local surface from the viewpoint which is perpendicular to the surface. Our RoPS differs from these methods in several aspects. First, RoPS represents a local surface from a set of viewpoints rather than just one view (as in the case of spin image and snapshot). Second, RoPS is associated with a unique and unambiguous LRF, and it is invariant to rotation. In contrast, spin image discards cylindrical angular information and snapshot is prone to rotation. Third, RoPS is more compact than spin image and snapshot since RoPS further encodes 2D matrices with a set of statistics. The typical lengths of RoPS, spin image and snapshot are 135, 225 and 1600, respectively (see Table 2,(Johnson and Hebert 1999)

and Malassiotis and Strintzis 2007)。

?

特征生成流程圖:

?

?

總結(jié)

以上是生活随笔為你收集整理的PCL:描述三维离散点的ROPS特征(Code)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。