pcl

点云数据的读取和显示

a 夏天 提交于 2019-11-26 02:41:01
pcd_read.cpp文件 # include <iostream> //标准输入输出流 # include <pcl/io/pcd_io.h> //PCL的PCD格式文件的输入输出头文件 # include <pcl/point_types.h> //PCL对各种格式的点的支持头文件 # include <pcl/visualization/cloud_viewer.h> //点云查看窗口头文件 int main ( int argc , char * * argv ) { pcl :: PointCloud < pcl :: PointXYZ > :: Ptr cloud ( new pcl :: PointCloud < pcl :: PointXYZ > ) ; // 创建点云(指针) if ( pcl :: io :: loadPCDFile < pcl :: PointXYZ > ( "bun0.pcd" , * cloud ) == - 1 ) //* 读入PCD格式的文件,如果文件不存在,返回-1 { PCL_ERROR ( "Couldn't read file test_pcd.pcd \n" ) ; //文件不存在时,返回错误,终止程序。 return ( - 1 ) ; } //打印点云数据 std :: cout << "Loaded:" <<

欧式聚类/聚类索引

隐身守侯 提交于 2019-11-26 02:35:54
#include <pcl/ModelCoefficients.h> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/filters/extract_indices.h> #include <pcl/filters/voxel_grid.h> #include <pcl/features/normal_3d.h> #include <pcl/kdtree/kdtree.h> #include <pcl/sample_consensus/method_types.h> #include <pcl/sample_consensus/model_types.h> #include <pcl/segmentation/sac_segmentation.h> #include <pcl/segmentation/extract_clusters.h> int main (int argc, char** argv) { //读入点云数据table_scene_lms400.pcd pcl::PCDReader reader; pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>), cloud_f

pcl 中setCameraPosition的参数说明

谁说我不能喝 提交于 2019-11-25 19:36:14
开发手册上给出的参数说明如下: void pcl::visualization::PCLVisualizer::setCameraPosition ( double pos_x , double pos_y , double pos_z , double view_x , double view_y , double view_z , double up_x , double up_y , double up_z , int viewport = 0 ) Set the camera pose given by position, viewpoint and up vector. Parameters [in] pos_x the x coordinate of the camera location [in] pos_y the y coordinate of the camera location [in] pos_z the z coordinate of the camera location [in] view_x the x component of the view point of the camera [in] view_y the y component of the view point of the camera [in] view_z the z