VS2010+PCL1.6.0+1.7.2(Win7 64位)安裝教程

查志強發表於2016-08-24

【原文:http://blog.csdn.net/u013094443/article/details/48894933】  

之前在自己的筆記本上(win7 32位系統)安裝過PCL1.6.0,但是今天在桌上型電腦上(win7 64位)按照那個教程沒有成功,後來摸索了一下,執行測試用例通過了,希望給需要的朋友一點點幫助吧!(由於CSDN對資源大小有限制,所以傳到360雲盤吧)

1. 將這兩個資源下載之後放在自己所建工程的同一級目錄下面;

PCL1.6.0:http://yunpan.cn/cHGwBSMbDEi6P 訪問密碼 ebba

PCL1.7.2:http://yunpan.cn/cHGwEDahFSxH8 訪問密碼 bb69


2. 屬性頁面設定:

2.1 Properties->VC++ Directories->Include Directories:

..\..\PCL 1.6.0\3rdParty\Boost\include

..\..\PCL 1.7.2\include

..\..\PCL 1.6.0\3rdParty\Eigen\include

..\..\PCL 1.6.0\3rdParty\FLANN\include

..\..\PCL 1.6.0\3rdParty\Qhull\include

..\..\PCL 1.6.0\3rdParty\VTK\include\vtk-5.8


2.2 Properties->VC++ Directories->Library Directories:

..\..\PCL 1.6.0\3rdParty\Boost\lib

..\..\PCL 1.7.2\lib

..\..\PCL 1.6.0\3rdParty\FLANN\lib

..\..\PCL 1.6.0\3rdParty\Qhull\lib

..\..\PCL 1.6.0\3rdParty\Eigen\bin

..\..\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8


2.3 Properties->Configuration Manager->Active Solution platform->New->X64(三維引擎好像都要做這個設定)

(這一步非常重要,不要忘記)


3. 拷貝下面的dll到工程目錄\X64\debug目錄下(從PCL1.6.0和PCL1.7.2的bin資料夾下面找)

pcl_apps_debug.dll
pcl_common_debug.dll
pcl_features_debug.dll
pcl_filters_debug.dll
pcl_geometry_debug.dll
pcl_io_debug.dll
pcl_io_ply_debug.dll
pcl_kdtree_debug.dll
pcl_keypoints_debug.dll
pcl_octree_debug.dll
pcl_outofcore_debug.dll
pcl_people_debug.dll
pcl_recognition_debug.dll
pcl_registration_debug.dll
pcl_sample_consensus_debug.dll
pcl_search_debug.dll
pcl_segmentation_debug.dll
pcl_surface_debug.dll
pcl_tracking_debug.dll
pcl_visualization_debug.dll
vtkalglib.dll
vtkCommon.dll
vtkDICOMParser.dll
vtkexoIIc.dll
vtkexpat.dll
vtkFiltering.dll
vtkfreetype.dll
vtkftgl.dll
vtkGraphics.dll
vtkHybrid.dll
vtkImaging.dll
vtkInfovis.dll
vtkIO.dll
vtkjpeg.dll
vtklibxml2.dll
vtkmetaio.dll
vtkMFC.dll
vtkNetCDF.dll
vtkNetCDF_cxx.dll
vtkpng.dll
vtkRendering.dll
vtksys.dll
vtktiff.dll
vtkverdict.dll
vtkWidgets.dll
vtkzlib.dll


4. 新建一個.h檔案,將需要包含的標頭檔案和lib檔案統統寫在這個檔案裡面,記得將這個新建的.h檔案新增進工程

//PclHeader.h

[cpp] view plain copy
  1. #pragma once  
  2.    
  3. #include <iostream>  
  4. #include <pcl/console/parse.h>  
  5. #include <pcl/point_types.h>  
  6.   
  7. #include <climits>  
  8. #include <cfloat>  
  9. #include <boost/config.hpp>  
  10.   
  11.   
  12. #include <pcl/filters/random_sample.h>  
  13. #include <pcl/sample_consensus/ransac.h>  
  14. #include <pcl/sample_consensus/sac_model.h>  
  15. #include <pcl/sample_consensus/model_types.h>  
  16. #include <pcl/sample_consensus/sac_model_plane.h>  
  17. #include <pcl/sample_consensus/sac_model_sphere.h>  
  18. #include <pcl/visualization/pcl_visualizer.h>  
  19.   
  20. /*#include <pcl/point_cloud.h>*/  
  21. #include <pcl/registration/registration.h>  
  22. #include <pcl/registration/icp.h>  
  23. #include <pcl/registration/correspondence_rejection_sample_consensus.h>  
  24. #include <pcl/registration/ia_ransac.h>  
  25. #include <pcl/registration/ndt.h>  
  26.   
  27. #include <limits>  
  28. #include <fstream>  
  29. #include <vector>  
  30. #include <Eigen/Core>  
  31. #include <pcl/point_types.h>  
  32. #include <pcl/point_cloud.h>  
  33. #include <pcl/io/pcd_io.h>  
  34. #include <pcl/filters/passthrough.h>  
  35. #include <pcl/filters/voxel_grid.h>  
  36. #include <pcl/features/normal_3d.h>  
  37. #include <pcl/features/fpfh.h>  
  38. #include <pcl/registration/ia_ransac.h>  
  39. #include <pcl/io/pcd_io.h>  
  40. #include <pcl/common/io.h>  
  41. #include <pcl/registration/icp_nl.h>  
  42. #include <pcl/features/fpfh_omp.h>  
  43. #include <pcl/features/normal_3d_omp.h>  
  44. #include <pcl/keypoints/uniform_sampling.h>  
  45. #include <pcl/registration/correspondence_rejection_distance.h>  
  46. #include <pcl/registration/correspondence_estimation.h>  
  47.   
  48. #include <pcl/filters/extract_indices.h>  
  49. #include <pcl/filters/filter.h>  
  50. #include <pcl/segmentation/sac_segmentation.h>  
  51. #include <pcl/filters/approximate_voxel_grid.h>  
  52. #include <pcl/filters/conditional_removal.h>  
  53. #include <pcl/filters/radius_outlier_removal.h>  
  54. #include <pcl/filters/statistical_outlier_removal.h>  
  55.   
  56. #include <pcl/common/transforms.h>  
  57. #include <pcl/segmentation/region_growing.h>  
  58. #include <pcl/segmentation/extract_clusters.h>  
  59. #include <pcl/segmentation/region_growing_rgb.h>  
  60. #include <pcl/kdtree/kdtree.h>  
  61. #include <pcl/kdtree/flann.h>  
  62. #include <pcl/kdtree/kdtree_flann.h>  
  63. #include <pcl/features/feature.h>  
  64. #include <pcl/segmentation/organized_multi_plane_segmentation.h>  
  65.   
  66.   
  67. #include <pcl/segmentation/region_3d.h>  
  68. #include <pcl/geometry/planar_polygon.h>  
  69. #include <pcl/segmentation/planar_region.h>  
  70.   
  71. #include <pcl/filters/crop_box.h>  
  72. #include <pcl/filters/filter.h>  
  73. #include <pcl/segmentation/supervoxel_clustering.h>  
  74. #include <pcl/segmentation/conditional_euclidean_clustering.h>  
  75.   
  76. #include <pcl/octree/octree.h>  
  77. #include <pcl/surface/gp3.h>  
  78.   
  79. typedef pcl::PointXYZ PointT;  
  80. typedef pcl::PointCloud<PointT> PointCloud;  
  81. typedef pcl::PointNormal PointNormalT;  
  82. typedef pcl::PointCloud<PointNormalT> PointCloudWithNormals;  
  83. //載入LIB檔案  
  84. #ifdef _DEBUG  
  85. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_apps_debug.lib")  
  86. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_common_debug.lib")  
  87. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_features_debug.lib")  
  88. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_filters_debug.lib")  
  89. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_io_debug.lib")  
  90. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_io_ply_debug.lib")  
  91. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_kdtree_debug.lib")  
  92. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_keypoints_debug.lib")  
  93. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_octree_debug.lib")  
  94. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_registration_debug.lib")  
  95. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_sample_consensus_debug.lib")  
  96. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_search_debug.lib")  
  97. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_segmentation_debug.lib")  
  98. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_surface_debug.lib")  
  99. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_tracking_debug.lib")  
  100. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_visualization_debug.lib")  
  101. #else  
  102. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_apps_release.lib")  
  103. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_common_release.lib")  
  104. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_features_release.lib")  
  105. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_filters_release.lib")  
  106. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_io_release.lib")  
  107. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_io_ply_release.lib")  
  108. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_kdtree_release.lib")  
  109. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_keypoints_release.lib")  
  110. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_octree_release.lib")  
  111. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_registration_release.lib")  
  112. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_sample_consensus_release.lib")  
  113. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_search_release.lib")  
  114. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_segmentation_release.lib")  
  115. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_surface_release.lib")  
  116. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_tracking_release.lib")  
  117. #pragma comment (lib, "../../PCL 1.7.2/lib/pcl_visualization_release.lib")  
  118. #endif  



相關文章