终于又更新博客。。。。最近忙考研复试和毕业论文忙的焦头烂额了,论文是关于三维点云的,于是想写一个PCL库的配置教程。

三维点云配准是以PCL (Point Cloud Library) 这个C++开源的函数库来进行配准的,Point Cloud Library (PCL) 是一个独立的大型的处理二维/三维图像和点云数据的开源工程。在PCL函数库中,可以调用各种已经比较成熟的算法,比如多种滤波器,点云特征值的估计,点云表面的重建等等,由于PCL库的开源性,这无疑让广大的代码爱好者有了很好的学习平台。
PCL可以支持多种的操作系统平台,无论是Windows、Android还是Linux,甚至是在部分的嵌入式实时操作系统中都可以调用运行。
本教程中的点云配准是在Windows平台上进行实验,采用的是Visual Studio 2017 + PCL-all-in-one,虽然在Windows上配置点云库的过程比较繁琐,尤其是很多个依赖库需要手动包含到VS中,但考虑到后期数据处理、分析和能够更好的直观表达结果,选择了Windows平台。

一、配置条件

Windows电脑、Visual Studio 2017、PCL库对应的文件(一共是两个文件一个是PCL-1.8.1-AllInOne-msvc2017-win64.exe,一个是pcl-1.8.1-pdb-msvc2017-win64.zip)msvc后面的2017是VS对应的版本,然后电脑一般都是64位的。当然你的VS不是2017版,也可以去github下载其他对应版本的点云库,但是尽量用这个版本的,因为下面的配置路径,随版本不同,版本号也不一样,如果非不用VS2017的话,请到最底下FAQ寻找导出依赖库的方法。PCL库github下载地址:https://github.com/PointCloudLibrary/pcl/releases

二、PCL软件安装:

配置的软件准备好了,就准备安装了。安装PCL-1.8.1-AllInOne。首先要勾选上Add PCL to system PATH for all users,如下图所示。

然后安装路径建议为D盘

安装过程中,会弹出OpenNI的安装程序,更改安装路径为你安装的PCL路径下的3rdParty文件夹下的OpenNI2文件夹中。
在此PCL软件已经安装好了,接下来拷贝之前下载的pcl-1.8.1-pdb-msvc2017-win64.zip里面解压的全部文件,到你PCL安装路径下的bin文件夹。

三、电脑环境配准:

首先添加电脑的PCL的环境的系统变量。
我的电脑右键-->属性-->高级系统设置-->高级-->环境变量-->用户变量(在上面的Path)-->Path-->编辑-->新建
将以下路径一个个添加进入
D:\PCL 1.8.1\bin
D:\PCL 1.8.1\3rdParty\FLANN\bin
D:\PCL 1.8.1\3rdParty\Qhull\bin
D:\PCL 1.8.1\3rdParty\VTK\bin
D:\PCL 1.8.1\3rdParty\OpenNI2\Tools

四、VS的环境配置

首先在VS里面创建一个C++的控制台应用项目,自定义路径和项目名称,然后右侧解决方案里面右击项目进入属性。

在对底下进行配置之前,需要知道属性里面的配置都是对应着一个编译模式,有debug和release,同样的这两个分别对应win32和win64,配置时候请务必选择自己需要的模式,因为每种模式都是需要单独配置的,一般选择debug编译,然后是64位。以下是配置选择的位置。

1. 为了防止弹出很多的warning,加入预处理器,在属性目录"C/C++ "– >"预处理器"–>"预处理器定义" 加入(!!!这里点击预处理器定义那一栏最右边的小三角,选择编辑,进行添加,以下几个步骤中同样是这样进行编辑添加):
_SCL_SECURE_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS
PCL_NO_PRECOMPILE

2.点击“VC++目录”->“包含目录”,进行编辑。
添加下列路径:(按照自己的目录来设置)
D:\PCL 1.8.1\include\pcl-1.8;
D:\PCL 1.8.1\3rdParty\Boost\include\boost-1_64;
D:\PCL 1.8.1\3rdParty\Eigen\eigen3;
D:\PCL 1.8.1\3rdParty\FLANN\include;
D:\PCL 1.8.1\3rdParty\Qhull\include;
D:\PCL 1.8.1\3rdParty\VTK\include\vtk-8.0;
D:\PCL 1.8.1\3rdParty\OpenNI2\Include

3.点击“VC++目录”->“库目录”,进行编辑。
添加下列路径:(按照自己的目录来设置)
D:\PCL 1.8.1\lib;
D:\PCL 1.8.1\3rdParty\Boost\lib;
D:\PCL 1.8.1\3rdParty\FLANN\lib;
D:\PCL 1.8.1\3rdParty\Qhull\lib;
D:\PCL 1.8.1\3rdParty\VTK\lib;
D:\PCL 1.8.1\3rdParty\OpenNI2\Lib;
4. 链接器-->输入-->附加依赖项,添加以下内容(分Debug版本和Release版本,两种版本的依赖项不一样)
Debug版本:
vtknetcdf_c++-gd.lib;
pcl_common_debug.lib;
pcl_features_debug.lib;
pcl_filters_debug.lib;
pcl_io_ply_debug.lib;
pcl_io_debug.lib;
pcl_kdtree_debug.lib;
pcl_keypoints_debug.lib;
pcl_ml_debug.lib;
pcl_octree_debug.lib;
pcl_outofcore_debug.lib;
pcl_people_debug.lib;
pcl_recognition_debug.lib;
pcl_registration_debug.lib;
pcl_sample_consensus_debug.lib;
pcl_search_debug.lib;
pcl_segmentation_debug.lib;
pcl_stereo_debug.lib;
pcl_surface_debug.lib;
pcl_tracking_debug.lib;
pcl_visualization_debug.lib;
libboost_atomic-vc141-mt-gd-1_64.lib;
libboost_bzip2-vc141-mt-gd-1_64.lib;
libboost_chrono-vc141-mt-gd-1_64.lib;
libboost_container-vc141-mt-gd-1_64.lib;
libboost_context-vc141-mt-gd-1_64.lib;
libboost_coroutine-vc141-mt-gd-1_64.lib;
libboost_date_time-vc141-mt-gd-1_64.lib;
libboost_exception-vc141-mt-gd-1_64.lib;
libboost_fiber-vc141-mt-gd-1_64.lib;
libboost_filesystem-vc141-mt-gd-1_64.lib;
libboost_graph-vc141-mt-gd-1_64.lib;
libboost_graph_parallel-vc141-mt-gd-1_64.lib;
libboost_iostreams-vc141-mt-gd-1_64.lib;
libboost_locale-vc141-mt-gd-1_64.lib;
libboost_log-vc141-mt-gd-1_64.lib;
libboost_log_setup-vc141-mt-gd-1_64.lib;
libboost_math_c99-vc141-mt-gd-1_64.lib;
libboost_math_c99f-vc141-mt-gd-1_64.lib;
libboost_math_c99l-vc141-mt-gd-1_64.lib;
libboost_math_tr1-vc141-mt-gd-1_64.lib;
libboost_math_tr1f-vc141-mt-gd-1_64.lib;
libboost_math_tr1l-vc141-mt-gd-1_64.lib;
libboost_mpi-vc141-mt-gd-1_64.lib;
libboost_numpy3-vc141-mt-gd-1_64.lib;
libboost_numpy-vc141-mt-gd-1_64.lib;
libboost_prg_exec_monitor-vc141-mt-gd-1_64.lib;
libboost_program_options-vc141-mt-gd-1_64.lib;
libboost_python3-vc141-mt-gd-1_64.lib;
libboost_python-vc141-mt-gd-1_64.lib;
libboost_random-vc141-mt-gd-1_64.lib;
libboost_regex-vc141-mt-gd-1_64.lib;
libboost_serialization-vc141-mt-gd-1_64.lib;
libboost_signals-vc141-mt-gd-1_64.lib;
libboost_system-vc141-mt-gd-1_64.lib;
libboost_test_exec_monitor-vc141-mt-gd-1_64.lib;
libboost_thread-vc141-mt-gd-1_64.lib;
libboost_timer-vc141-mt-gd-1_64.lib;
libboost_type_erasure-vc141-mt-gd-1_64.lib;
libboost_unit_test_framework-vc141-mt-gd-1_64.lib;
libboost_wave-vc141-mt-gd-1_64.lib;
libboost_wserialization-vc141-mt-gd-1_64.lib;
libboost_zlib-vc141-mt-gd-1_64.lib;
flann-gd.lib;
flann_cpp-gd.lib;
flann_cpp_s-gd.lib;
flann_s-gd.lib;
qhull_d.lib;
qhullcpp_d.lib;
qhullstatic_d.lib;
qhullstatic_r_d.lib;
qhull_p_d.lib;
qhull_r_d.lib;
vtkalglib-8.0-gd.lib;
vtkChartsCore-8.0-gd.lib;
vtkCommonColor-8.0-gd.lib;
vtkCommonComputationalGeometry-8.0-gd.lib;
vtkCommonCore-8.0-gd.lib;
vtkCommonDataModel-8.0-gd.lib;
vtkCommonExecutionModel-8.0-gd.lib;
vtkCommonMath-8.0-gd.lib;
vtkCommonMisc-8.0-gd.lib;
vtkCommonSystem-8.0-gd.lib;
vtkCommonTransforms-8.0-gd.lib;
vtkDICOMParser-8.0-gd.lib;
vtkDomainsChemistry-8.0-gd.lib;
vtkexoIIc-8.0-gd.lib;
vtkexpat-8.0-gd.lib;
vtkFiltersAMR-8.0-gd.lib;
vtkFiltersCore-8.0-gd.lib;
vtkFiltersExtraction-8.0-gd.lib;
vtkFiltersFlowPaths-8.0-gd.lib;
vtkFiltersGeneral-8.0-gd.lib;
vtkFiltersGeneric-8.0-gd.lib;
vtkFiltersGeometry-8.0-gd.lib;
vtkFiltersHybrid-8.0-gd.lib;
vtkFiltersHyperTree-8.0-gd.lib;
vtkFiltersImaging-8.0-gd.lib;
vtkFiltersModeling-8.0-gd.lib;
vtkFiltersParallel-8.0-gd.lib;
vtkFiltersParallelImaging-8.0-gd.lib;
vtkFiltersPoints-8.0-gd.lib;
vtkFiltersProgrammable-8.0-gd.lib;
vtkFiltersSelection-8.0-gd.lib;
vtkFiltersSMP-8.0-gd.lib;
vtkFiltersSources-8.0-gd.lib;
vtkFiltersStatistics-8.0-gd.lib;
vtkFiltersTexture-8.0-gd.lib;
vtkFiltersTopology-8.0-gd.lib;
vtkFiltersVerdict-8.0-gd.lib;
vtkfreetype-8.0-gd.lib;
vtkGeovisCore-8.0-gd.lib;
vtkgl2ps-8.0-gd.lib;
vtkhdf5-8.0-gd.lib;
vtkhdf5_hl-8.0-gd.lib;
vtkImagingColor-8.0-gd.lib;
vtkImagingCore-8.0-gd.lib;
vtkImagingFourier-8.0-gd.lib;
vtkImagingGeneral-8.0-gd.lib;
vtkImagingHybrid-8.0-gd.lib;
vtkImagingMath-8.0-gd.lib;
vtkImagingMorphological-8.0-gd.lib;
vtkImagingSources-8.0-gd.lib;
vtkImagingStatistics-8.0-gd.lib;
vtkImagingStencil-8.0-gd.lib;
vtkInfovisCore-8.0-gd.lib;
vtkInfovisLayout-8.0-gd.lib;
vtkInteractionImage-8.0-gd.lib;
vtkInteractionStyle-8.0-gd.lib;
vtkInteractionWidgets-8.0-gd.lib;
vtkIOAMR-8.0-gd.lib;
vtkIOCore-8.0-gd.lib;
vtkIOEnSight-8.0-gd.lib;
vtkIOExodus-8.0-gd.lib;
vtkIOExport-8.0-gd.lib;
vtkIOExportOpenGL-8.0-gd.lib;
vtkIOGeometry-8.0-gd.lib;
vtkIOImage-8.0-gd.lib;
vtkIOImport-8.0-gd.lib;
vtkIOInfovis-8.0-gd.lib;
vtkIOLegacy-8.0-gd.lib;
vtkIOLSDyna-8.0-gd.lib;
vtkIOMINC-8.0-gd.lib;
vtkIOMovie-8.0-gd.lib;
vtkIONetCDF-8.0-gd.lib;
vtkIOParallel-8.0-gd.lib;
vtkIOParallelXML-8.0-gd.lib;
vtkIOPLY-8.0-gd.lib;
vtkIOSQL-8.0-gd.lib;
vtkIOTecplotTable-8.0-gd.lib;
vtkIOVideo-8.0-gd.lib;
vtkIOXML-8.0-gd.lib;
vtkIOXMLParser-8.0-gd.lib;
vtkjpeg-8.0-gd.lib;
vtkjsoncpp-8.0-gd.lib;
vtklibharu-8.0-gd.lib;
vtklibxml2-8.0-gd.lib;
vtklz4-8.0-gd.lib;
vtkmetaio-8.0-gd.lib;
vtkNetCDF-8.0-gd.lib;
vtkoggtheora-8.0-gd.lib;
vtkParallelCore-8.0-gd.lib;
vtkpng-8.0-gd.lib;
vtkproj4-8.0-gd.lib;
vtkRenderingAnnotation-8.0-gd.lib;
vtkRenderingContext2D-8.0-gd.lib;
vtkRenderingContextOpenGL-8.0-gd.lib;
vtkRenderingCore-8.0-gd.lib;
vtkRenderingFreeType-8.0-gd.lib;
vtkRenderingGL2PS-8.0-gd.lib;
vtkRenderingImage-8.0-gd.lib;
vtkRenderingLabel-8.0-gd.lib;
vtkRenderingLIC-8.0-gd.lib;
vtkRenderingLOD-8.0-gd.lib;
vtkRenderingOpenGL-8.0-gd.lib;
vtkRenderingVolume-8.0-gd.lib;
vtkRenderingVolumeOpenGL-8.0-gd.lib;
vtksqlite-8.0-gd.lib;
vtksys-8.0-gd.lib;
vtktiff-8.0-gd.lib;
vtkverdict-8.0-gd.lib;
vtkViewsContext2D-8.0-gd.lib;
vtkViewsCore-8.0-gd.lib;
vtkViewsInfovis-8.0-gd.lib;
vtkzlib-8.0-gd.lib;
opengl32.lib;
release版本:
pcl_common_release.lib;
pcl_features_release.lib;
pcl_filters_release.lib;
pcl_io_ply_release.lib;
pcl_io_release.lib;
pcl_kdtree_release.lib;
pcl_keypoints_release.lib;
pcl_ml_release.lib;
pcl_octree_release.lib;
pcl_outofcore_release.lib;
pcl_people_release.lib;
pcl_recognition_release.lib;
pcl_registration_release.lib;
pcl_sample_consensus_release.lib;
pcl_search_release.lib;
pcl_segmentation_release.lib;
pcl_stereo_release.lib;
pcl_surface_release.lib;
pcl_tracking_release.lib;
pcl_visualization_release.lib;
pcl_io_release.lib;
libboost_atomic-vc141-mt-1_64.lib;
libboost_bzip2-vc141-mt-1_64.lib;
libboost_chrono-vc141-mt-1_64.lib;
libboost_container-vc141-mt-1_64.lib;
libboost_context-vc141-mt-1_64.lib;
libboost_coroutine-vc141-mt-1_64.lib;
libboost_date_time-vc141-mt-1_64.lib;
libboost_exception-vc141-mt-1_64.lib;
libboost_fiber-vc141-mt-1_64.lib;
libboost_filesystem-vc141-mt-1_64.lib;
libboost_graph-vc141-mt-1_64.lib;
libboost_graph_parallel-vc141-mt-1_64.lib;
libboost_iostreams-vc141-mt-1_64.lib;
libboost_locale-vc141-mt-1_64.lib;
libboost_log-vc141-mt-1_64.lib;
libboost_log_setup-vc141-mt-1_64.lib;
libboost_math_c99-vc141-mt-1_64.lib;
libboost_math_c99f-vc141-mt-1_64.lib;
libboost_math_c99l-vc141-mt-1_64.lib;
libboost_math_tr1-vc141-mt-1_64.lib;
libboost_math_tr1f-vc141-mt-1_64.lib;
libboost_math_tr1l-vc141-mt-1_64.lib;
libboost_mpi-vc141-mt-1_64.lib;
libboost_numpy-vc141-mt-1_64.lib;
libboost_numpy3-vc141-mt-1_64.lib;
libboost_prg_exec_monitor-vc141-mt-1_64.lib;
libboost_program_options-vc141-mt-1_64.lib;
libboost_python-vc141-mt-1_64.lib;
libboost_python3-vc141-mt-1_64.lib;
libboost_random-vc141-mt-1_64.lib;
libboost_regex-vc141-mt-1_64.lib;
libboost_serialization-vc141-mt-1_64.lib;
libboost_signals-vc141-mt-1_64.lib;
libboost_system-vc141-mt-1_64.lib;
libboost_test_exec_monitor-vc141-mt-1_64.lib;
libboost_thread-vc141-mt-1_64.lib;
libboost_timer-vc141-mt-1_64.lib;
libboost_type_erasure-vc141-mt-1_64.lib;
libboost_unit_test_framework-vc141-mt-1_64.lib;
libboost_wave-vc141-mt-1_64.lib;
libboost_wserialization-vc141-mt-1_64.lib;
libboost_zlib-vc141-mt-1_64.lib;
OpenNI2.lib;
vtkalglib-8.0.lib;
vtkChartsCore-8.0.lib;
vtkCommonColor-8.0.lib;
vtkCommonComputationalGeometry-8.0.lib;
vtkCommonCore-8.0.lib;
vtkCommonDataModel-8.0.lib;
vtkCommonExecutionModel-8.0.lib;
vtkCommonMath-8.0.lib;
vtkCommonMisc-8.0.lib;
vtkCommonSystem-8.0.lib;
vtkCommonTransforms-8.0.lib;
vtkDICOMParser-8.0.lib;
vtkDomainsChemistry-8.0.lib;
vtkexoIIc-8.0.lib;
vtkexpat-8.0.lib;
vtkFiltersAMR-8.0.lib;
vtkFiltersCore-8.0.lib;
vtkFiltersExtraction-8.0.lib;
vtkFiltersFlowPaths-8.0.lib;
vtkFiltersGeneral-8.0.lib;
vtkFiltersGeneric-8.0.lib;
vtkFiltersGeometry-8.0.lib;
vtkFiltersHybrid-8.0.lib;
vtkFiltersHyperTree-8.0.lib;
vtkFiltersImaging-8.0.lib;
vtkFiltersModeling-8.0.lib;
vtkFiltersParallel-8.0.lib;
vtkFiltersParallelImaging-8.0.lib;
vtkFiltersPoints-8.0.lib;
vtkFiltersProgrammable-8.0.lib;
vtkFiltersSelection-8.0.lib;
vtkFiltersSMP-8.0.lib;
vtkFiltersSources-8.0.lib;
vtkFiltersStatistics-8.0.lib;
vtkFiltersTexture-8.0.lib;
vtkFiltersTopology-8.0.lib;
vtkFiltersVerdict-8.0.lib;
vtkfreetype-8.0.lib;
vtkGeovisCore-8.0.lib;
vtkgl2ps-8.0.lib;
vtkhdf5-8.0.lib;
vtkhdf5_hl-8.0.lib;
vtkImagingColor-8.0.lib;
vtkImagingCore-8.0.lib;
vtkImagingFourier-8.0.lib;
vtkImagingGeneral-8.0.lib;
vtkImagingHybrid-8.0.lib;
vtkImagingMath-8.0.lib;
vtkImagingMorphological-8.0.lib;
vtkImagingSources-8.0.lib;
vtkImagingStatistics-8.0.lib;
vtkImagingStencil-8.0.lib;
vtkInfovisCore-8.0.lib;
vtkInfovisLayout-8.0.lib;
vtkInteractionImage-8.0.lib;
vtkInteractionStyle-8.0.lib;
vtkInteractionWidgets-8.0.lib;
vtkIOAMR-8.0.lib;
vtkIOCore-8.0.lib;
vtkIOEnSight-8.0.lib;
vtkIOExodus-8.0.lib;
vtkIOExport-8.0.lib;
vtkIOExportOpenGL-8.0.lib;
vtkIOGeometry-8.0.lib;
vtkIOImage-8.0.lib;
vtkIOImport-8.0.lib;
vtkIOInfovis-8.0.lib;
vtkIOLegacy-8.0.lib;
vtkIOLSDyna-8.0.lib;
vtkIOMINC-8.0.lib;
vtkIOMovie-8.0.lib;
vtkIONetCDF-8.0.lib;
vtkIOParallel-8.0.lib;
vtkIOParallelXML-8.0.lib;
vtkIOPLY-8.0.lib;
vtkIOSQL-8.0.lib;
vtkIOTecplotTable-8.0.lib;
vtkIOVideo-8.0.lib;
vtkIOXML-8.0.lib;
vtkIOXMLParser-8.0.lib;
vtkjpeg-8.0.lib;
vtkjsoncpp-8.0.lib;
vtklibharu-8.0.lib;
vtklibxml2-8.0.lib;
vtklz4-8.0.lib;
vtkmetaio-8.0.lib;
vtkNetCDF-8.0.lib;
vtknetcdf_c++.lib;
vtkoggtheora-8.0.lib;
vtkParallelCore-8.0.lib;
vtkpng-8.0.lib;
vtkproj4-8.0.lib;
vtkRenderingAnnotation-8.0.lib;
vtkRenderingContext2D-8.0.lib;
vtkRenderingContextOpenGL-8.0.lib;
vtkRenderingCore-8.0.lib;
vtkRenderingFreeType-8.0.lib;
vtkRenderingGL2PS-8.0.lib;
vtkRenderingImage-8.0.lib;
vtkRenderingLabel-8.0.lib;
vtkRenderingLIC-8.0.lib;
vtkRenderingLOD-8.0.lib;
vtkRenderingOpenGL-8.0.lib;
vtkRenderingVolume-8.0.lib;
vtkRenderingVolumeOpenGL-8.0.lib;
vtksqlite-8.0.lib;
vtksys-8.0.lib;
vtktiff-8.0.lib;
vtkverdict-8.0.lib;
vtkViewsContext2D-8.0.lib;
vtkViewsCore-8.0.lib;
vtkViewsInfovis-8.0.lib;
vtkzlib-8.0.lib;
qhull_p.lib;
qhull_r.lib;
qhull.lib;
qhullcpp.lib;
qhullstatic.lib;
qhullstatic_r.lib;
flann.lib;
flann_cpp.lib;
flann_cpp_s.lib;
flann_s.lib;
FAQ:
1.编译的时候记得将编译器变为x64的环境下运行,然后可能会报这样的错误:
error C4996: 'pcl::SAC_SAMPLE_SIZE': This map is deprecated and is kept only to prevent breaking existing user…
解决方式:属性"->"C/C++"->"SDL检查":改为否(/sdl)
2. 在Debug下编译会出现大量的如下warning(Release下没有):
warning LNK4099: 未找到 PDB“.pdb”正在链接对象,如同没有调试信息一样
解决方法:“视图”->"解决方案资源管理器"->"属性"->“链接器"->"调试",在右侧的“生成调试信息”改为“否”,确定即可。
3.本教程用的VS2017+PCL 1.8.1,如果你不是用的这个,上面所有的配置路径都要自行更改,然后不同版本的PCL库的Debug/release依赖项导出方法。
提取D:\PCL 1.8.1\3rdParty\VTK\lib下的所有静态链接库文件名并存储至文本.txt,方法如下:
1、win+r
2、输入:cmd回车
3、输入:cd /d D:\PCL 1.8.1\3rdParty\VTK\lib 回车
4、输入:dir /b *.lib *>1.txt 回车

至此,点云PCL库的环境就是已经配置完成了。
首先需要去下载要配准的点云数据文件.pcd格式,可用以下代码测试(将单个点云数据进行绘制输出):
#include "stdafx.h"
#include<pcl/visualization/cloud_viewer.h> #include <pcl/visualization/pcl_visualizer.h> #include
#include<pcl/io/io.h> #include<pcl/io/pcd_io.h> #include<pcl/io/ply_io.h> #include<pcl/point_types.h> int user_data;
using std::cout;

void viewerOneOff(pcl::visualization::PCLVisualizer& viewer) {
viewer.setBackgroundColor(1.0, 0.5, 1.0);
}

int main()
{
pcl::PointCloud::Ptr cloud(new pcl::PointCloud);

char strfilepath[256] = "resources/bun_1.pcd"; //路径填写你的点云数据的目录
pcl::io::loadPCDFile(strfilepath, *cloud);

pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::PCLVisualizer("view"));
viewer->addPointCloud(cloud, "cloud");
viewer->spin();

}


喵喵喵喵喵喵