xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 3KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-12
  • 語言: C/C++
  • 標簽: PCL??RANSAC??多個平面??

資源簡介

使用PCL中RANSAC探測識別平面,并且可將探測出的多個平面進行單獨保存。

資源截圖

代碼片段和文件信息

//RANSAC探測多個平面
#include
#include?
#include?
#include?
#include????//隨機參數估計方法頭文件
#include????//模型定義頭文件
#include????//基于采樣一致性分割的類的頭文件
#include?
#include?
#include
#include?
#include
using?namespace?std;
int?GetRandomNumber()
{

int?RandomNumber;
RandomNumber?=?rand()?%?(256)?+?0;//0到255之間選擇顏色
//生成其他范圍的數字:RandomNumber?=?rand()?%?(b-a+1)?+?a;
return?RandomNumber;
}
void?main()
{
//第一步:定義輸入的原始數據及濾波后的點,以及分割獲得的點、平面系數coefficients、存儲內點的索引集合對象inliers、用于顯示的窗口
pcl::PointCloud::Ptr?cloud(new?pcl::PointCloud);
pcl::PointCloud::Ptr?planar_segment(new?pcl::PointCloud);//創建分割對象
pcl::io::loadPCDFile(“E:\\program_study\\C++\\pcd_data\\table_scene_lms400.pcd“?*cloud);
//pcl::io::loadPCDFile(“E:\\program_study\\C++\\pcd_data\\cubic.pcd“?*cloud);
pcl::ModelCoefficients::Ptr?coefficients(new?pcl::ModelCoefficients);//模型系數
pcl::PointIndices::Ptr?inliers(new?pcl::PointIndices);//索引列表
pcl::SACSegmentation?seg;//分割對象
pcl::visualization::PCLVisualizer?viewer(“planar?segment“);
viewer.setBackgroundColor(0?0?0);
pcl::ExtractIndices?extract;//提取器

int?n_piece=2;//需要探測的面的個數

//第二步:將原始點加載進入
pcl::visualization::P

評論

共有 條評論