怎么在自己的工程中使用pcl

本文档详细介绍了如何在Visual Studio 2010中配置Point Cloud Library(PCL)的步骤,包括下载必要的软件包,设置项目属性,以及添加包含目录和库依赖。通过遵循这些步骤,开发者可以在VS2010环境下顺利使用PCL进行3D点云处理。
摘要由CSDN通过智能技术生成

首先说一下,pcl官网上全是各种cmake的编译,对于我这种菜鸟来说,根本不懂啊!!!各种报错,又不知道怎么解决。后来还是决定按照其他库在vs中的配置方法一样来配置pcl。 其实感觉这样反而更简单,一劳永逸~


1. 首先要下一个pcl vs2010 x64 (all in one) 的安装包,这个在官网上有。 注意这里不要修改默认安装路径 C:\\Program Files\PCL 1.6.0,不然后面配置路径修改比较大,很麻烦。


再下一个Qt 4.8  不要修改安装默认路径 C;\\Qt    和 OpenNI  默认路径 C:\Program Files\OpenNI 不要改


2. 安装完成后,打开vs2010, 创建一个新项目。 在Debug  x64模式下创建项目属性模板。命名为pcl_x64_debug。

具体创建方式是: 打开属性管理器--> 右击 Debug | x64 --> 添加新属性模板 --> 命名为pcl_x64_debug ,确认退出 --> 右击 pcl_x64_debug ,选择属性 --> 下面是需要改的地方:

1) VC++ 目录 里面,向包含目录添加  C:\Program Files\PCL 1.6.0\include\pcl-1.6

C:\Program Files\PCL 1.6.0\3rdParty\FLANN\include

C:\Program Files\PCL 1.6.0\3rdParty\VTK\include\vtk-5.8

C:\Program Files\PCL 1.6.0\3rdParty\Boost\include

C:\Program Files\PCL 1.6.0\3rdParty\Qhull\include

C:\Program Files\PCL 1.6.0\3rdParty\Eigen\include

C:\Qt\4.8.0\include

C:\Program Files\OpenNI\Include

2) 库目录中添加 C:\Program Files\PCL 1.6.0\lib

3)链接器-->输入--> 附加依赖项  中添加 

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_system-vc100-mt-gd-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_filesystem-vc100-mt-gd-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_thread-vc100-mt-gd-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_date_time-vc100-mt-gd-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_iostreams-vc100-mt-gd-1_49.lib
C:\Program Files\PCL 1.6.0\lib\pcl_common_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_octree_debug.lib
C:\Program Files\OpenNI\Lib64\openNI64.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkCommon-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkRendering-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkHybrid-gd.lib
C:\Program Files\PCL 1.6.0\lib\pcl_io_debug.lib
C:\Program Files\flann\lib\flann_cpp_s-gd.lib
C:\Program Files\PCL 1.6.0\lib\pcl_kdtree_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_search_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_sample_consensus_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_filters_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_segmentation_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_visualization_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_features_debug.lib
C:\Program Files\qhull\lib\qhullstatic_d.lib
C:\Program Files\PCL 1.6.0\lib\pcl_surface_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_registration_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_keypoints_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_tracking_debug.lib
C:\Program Files\PCL 1.6.0\lib\pcl_apps_debug.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkGraphics-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkverdict-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkImaging-gd.lib
C:\Qt\4.8.0\lib\QtGuid4.lib
C:\Qt\4.8.0\lib\QtSqld4.lib
C:\Qt\4.8.0\lib\QtCored4.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkIO-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkFiltering-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkDICOMParser-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkNetCDF_cxx-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkmetaio-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtksys-gd.lib
ws2_32.lib
comctl32.lib
wsock32.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtksqlite-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkpng-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtktiff-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkzlib-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkjpeg-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkexpat-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkftgl-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkfreetype-gd.lib
opengl32.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkexoIIc-gd.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkNetCDF-gd.lib
vfw32.lib



4)在release x64模式下,1)2)不变,把3)添加的文件改为

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_system-vc100-mt-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_filesystem-vc100-mt-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_thread-vc100-mt-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_date_time-vc100-mt-1_49.lib
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_iostreams-vc100-mt-1_49.lib
C:\Program Files\PCL 1.6.0\lib\pcl_common_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_octree_release.lib
C:\Program Files\OpenNI\Lib64\openNI64.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkCommon.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkRendering.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkHybrid.lib
C:\Program Files\PCL 1.6.0\lib\pcl_io_release.lib
C:\Program Files\flann\lib\flann_cpp_s.lib
C:\Program Files\PCL 1.6.0\lib\pcl_kdtree_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_search_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_sample_consensus_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_filters_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_segmentation_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_visualization_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_features_release.lib
C:\Program Files\qhull\lib\qhullstatic.lib
C:\Program Files\PCL 1.6.0\lib\pcl_surface_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_registration_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_keypoints_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_tracking_release.lib
C:\Program Files\PCL 1.6.0\lib\pcl_apps_release.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkGraphics.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkverdict.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkImaging.lib
C:\Qt\4.8.0\lib\QtGui4.lib
C:\Qt\4.8.0\lib\QtSql4.lib
C:\Qt\4.8.0\lib\QtCore4.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkIO.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkFiltering.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkDICOMParser.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkNetCDF_cxx.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkmetaio.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtksys.lib
ws2_32.lib
comctl32.lib
wsock32.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtksqlite.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkpng.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtktiff.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkzlib.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkjpeg.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkexpat.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkftgl.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkfreetype.lib
opengl32.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkexoIIc.lib
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkNetCDF.lib
vfw32.lib




评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值