一、下载安装
PCL 1.6.0的安装包下载地址是:http://pointclouds.org/downloads/
有linux,windows,Mac三种版本可选,在windows中,有32bit和64bit可选(64bit,MS2010版本试过在VS2012上会报错)。
直接选all-in-one版本可以不用编译直接用。
二、安装完成之后,配置环境:
1、计算机-->属性-->高级系统设置。弹出系统属性框。高级-->环境变量。添加系统变量,PCL_ROOT,默认安装目录是:D:\Program Files\PCL 1.6.0
(这一步一般会在安装的时候自动配置好,确认一下)
2、在系统变量Path后追加:
D:\Program Files\PCL 1.6.0\bin;
D:\Program Files\PCL1.6.0\3rdParty\FLANN\bin;
D:\Program Files\PCL1.6.0\3rdParty\Qhull\bin;
三、具体工程配置
1、新建工程后,项目属性->VC++目录->包含目录 添加:
D:\Program Files\PCL 1.6.0\include\pcl-1.6
D:\Program Files\PCL1.6.0\3rdParty\Boost\include
D:\Program Files\PCL1.6.0\3rdParty\Eigen\include
D:\Program Files\PCL1.6.0\3rdParty\FLANN\include
D:\Program Files\PCL1.6.0\3rdParty\Qhull\include
D:\Program Files\PCL1.6.0\3rdParty\VTK\include\vtk-5.8
2、项目属性->VC++目录->库目录 添加:
D:\Program Files\PCL 1.6.0\lib
D:\Program Files\PCL1.6.0\3rdParty\Boost\lib
D:\Program Files\PCL1.6.0\3rdParty\FLANN\lib
D:\Program Files\PCL 1.6.0\3rdParty\Qhull\lib
D:\Program Files\PCL1.6.0\3rdParty\VTK\lib\vtk-5.8
3、dubug模式,链接器->输入->附加依赖项 添加
opengl32.lib
pcl_kdtree_debug.lib
pcl_io_debug.lib
pcl_search_debug.lib
pcl_segmentation_debug.lib
pcl_apps_debug.lib
pcl_features_debug.lib
pcl_filters_debug.lib
pcl_visualization_debug.lib
pcl_common_debug.lib
flann_cpp_s-gd.lib
libboost_system-vc100-mt-gd-1_47.lib
libboost_filesystem-vc100-mt-gd-1_47.lib
libboost_thread-vc100-mt-gd-1_47.lib
libboost_date_time-vc100-mt-gd-1_47.lib
libboost_iostreams-vc100-mt-gd-1_47.lib
vtkalglib-gd.lib
vtkCharts-gd.lib
vtkCommon-gd.lib
vtkDICOMParser-gd.lib
vtkexoIIc-gd.lib
vtkexpat-gd.lib
vtkFiltering-gd.lib
vtkfreetype-gd.lib
vtkftgl-gd.lib
vtkGenericFiltering-gd.lib
vtkGeovis-gd.lib
vtkGraphics-gd.lib
vtkhdf5-gd.lib
vtkHybrid-gd.lib
vtkImaging-gd.lib
vtkInfovis-gd.lib
vtkIO-gd.lib
vtkjpeg-gd.lib
vtklibxml2-gd.lib
vtkmetaio-gd.lib
vtkNetCDF-gd.lib
vtkNetCDF_cxx-gd.lib
vtkpng-gd.lib
vtkproj4-gd.lib
vtkRendering-gd.lib
vtksqlite-gd.lib
vtksys-gd.lib
vtktiff-gd.lib
vtkverdict-gd.lib
vtkViews-gd.lib
vtkVolumeRendering-gd.lib
vtkWidgets-gd.lib
vtkzlib-gd.lib
四、注意
在64bit上有可能会出现运行时错误,报错找不到OpenNI64.dll,下载之后放到项目所在目录即可。