什么是PCL
PCL(Point Cloud Library)是在吸收了前人点云相关研究基础上建立起来的大型跨平台开源C++编程库,它实现了大量点云相关的通用算法和高效数据结构,涉及到点云获取、滤波、分割、配准、检索、特征提取、识别、追踪、曲面重建、可视化等。支持多种操作系统平台,可在Windows、Linux、Android、Mac OS X、部分嵌入式实时系统上运行。如果说OpenCV是2D信息获取与处理的结晶,那么PCL就在3D信息获取与处理上具有同等地位,PCL是BSD授权方式,可以免费进行商业和学术应用。
下载地址
官网:http://pointclouds.org/downloads/windows.html
百度云:http://pan.baidu.com/s/1qYeZMpQ
安装步骤
双击下载好的PCL-1.7.2-AllInOne-msvc2013-win64.exe
点击”下一步“->“我接受”->是否将目录加入环境变量->选择目标文件夹->选择安装组件->安装
配置环境变量
在path中加入以下内容:
D:\jiao\applications\PCL 1.7.2\bin
D:\jiao\applications\PCL 1.7.2\3rdParty\FLANN\bin
D:\jiao\applications\PCL 1.7.2\3rdParty\Qhull\bin
D:\jiao\applications\PCL 1.7.2\3rdParty\VTK\bin
(pcl的安装目录,这里我是“D:\jiao\applications“)
配置vs2013
工程配置包含目录
D:\jiao\applications\PCL 1.7.2\include\pcl-1.7
D:\jiao\applications\PCL 1.7.2\3rdParty\VTK\include\vtk-6.2
D:\jiao\applications\PCL 1.7.2\3rdParty\Qhull\include;
D:\jiao\applications\PCL 1.7.2\3rdParty\FLANN\include;
D:\jiao\applications\PCL 1.7.2\3rdParty\Boost\include\boost-1_57;
D:\jiao\applications\PCL 1.7.2\3rdParty\Eigen\eigen3;
工程配置库目录
D:\jiao\applications\PCL 1.7.2\lib
D:\jiao\applications\PCL 1.7.2\3rdParty\VTK\lib
D:\jiao\applications\PCL 1.7.2\3rdParty\Qhull\lib
D:\jiao\applications\PCL 1.7.2\3rdParty\FLANN\lib
D:\jiao\applications\PCL 1.7.2\3rdParty\Boost\lib
工程配置链接输入的附加依赖项
DEBUG:
pcl_common_debug.lib
pcl_features_debug.lib
pcl_filters_debug.lib
pcl_io_debug.lib
pcl_io_ply_debug.lib
pcl_kdtree_debug.lib
pcl_keypoints_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_surface_debug.lib
pcl_tracking_debug.lib
pcl_visualization_debug.lib
libboost_atomic-vc120-mt-gd-1_57.lib
libboost_chrono-vc120-mt-gd-1_57.lib
libboost_container-vc120-mt-gd-1_57.lib
libboost_context-vc120-mt-gd-1_57.lib
libboost_coroutine-vc120-mt-gd-1_57.lib
libboost_date_time-vc120-mt-gd-1_57.lib
libboost_exception-vc120-mt-gd-1_57.lib
libboost_filesystem-vc120-mt-gd-1_57.lib
libboost_graph-vc120-mt-gd-1_57.lib
libboost_iostreams-vc120-mt-gd-1_57.lib
libboost_locale-vc120-mt-gd-1_57.lib
libboost_log-vc120-mt-gd-1_57.lib
libboost_log_setup-vc120-mt-gd-1_57.lib
libboost_math_c99-vc120-mt-gd-1_57.lib
libboost_math_c99f-vc120-mt-gd-1_57.lib
libboost_math_c99l-vc120-mt-gd-1_57.lib
libboost_math_tr1-vc120-mt-gd-1_57.lib
libboost_math_tr1f-vc120-mt-gd-1_57.lib
libboost_math_tr1l-vc120-mt-gd-1_57.lib
libboost_mpi-vc120-mt-gd-1_57.lib
libboost_prg_exec_monitor-vc120-mt-gd-1_57.lib
libboost_program_options-vc120-mt-gd-1_57.lib
libboost_random-vc120-mt-gd-1_57.lib
libboost_regex-vc120-mt-gd-1_57.lib
libboost_serialization-vc120-mt-gd-1_57.lib
libboost_signals-vc120-mt-gd-1_57.lib
libboost_system-vc120-mt-gd-1_57.lib
libboost_test_exec_monitor-vc120-mt-gd-1_57.lib
libboost_thread-vc120-mt-gd-1_57.lib
libboost_timer-vc120-mt-gd-1_57.lib
libboost_unit_test_framework-vc120-mt-gd-1_57.lib
libboost_wave-vc120-mt-gd-1_57.lib
libboost_wserialization-vc120-mt-gd-1_57.lib
flann_cpp_s-gd.lib
qhullstatic_d.lib
vtkalglib-6.2-gd.lib
vtkChartsCore-6.2-gd.lib
vtkCommonColor-6.2-gd.lib
vtkCommonComputationalGeometry-6.2-gd.lib
vtkCommonCore-6.2-gd.lib
vtkCommonDataModel-6.2-gd.lib
vtkCommonExecutionModel-6.2-gd.lib
vtkCommonMath-6.2-gd.lib
vtkCommonMisc-6.2-gd.lib
vtkCommonSystem-6.2-gd.lib
vtkCommonTransforms-6.2-gd.lib
vtkDICOMParser-6.2-gd.lib
vtkDomainsChemistry-6.2-gd.lib
vtkexoIIc-6.2-gd.lib
vtkexpat-6.2-gd.lib
vtkFiltersAMR-6.2-gd.lib
vtkFiltersCore-6.2-gd.lib
vtkFiltersExtraction-6.2-gd.lib
vtkFiltersFlowPaths-6.2-gd.lib
vtkFiltersGeneral-6.2-gd.lib
vtkFiltersGeneric-6.2-gd.lib
vtkFiltersGeometry-6.2-gd.lib
vtkFiltersHybrid-6.2-gd.lib
vtkFiltersHyperTree-6.2-gd.lib
vtkFiltersImaging-6.2-gd.lib
vtkFiltersModeling-6.2-gd.lib
vtkFiltersParallel-6.2-gd.lib
vtkFiltersParallelImaging-6.2-gd.lib
vtkFiltersProgrammable-6.2-gd.lib
vtkFiltersSelection-6.2-gd.lib
vtkFiltersSMP-6.2-gd.lib
vtkFiltersSources-6.2-gd.lib
vtkFiltersStatistics-6.2-gd.lib
vtkFiltersTexture-6.2-gd.lib
vtkFiltersVerdict-6.2-gd.lib
vtkfreetype-6.2-gd.lib
vtkftgl-6.2-gd.lib
vtkGeovisCore-6.2-gd.lib
vtkgl2ps-6.2-gd.lib
vtkhdf5-6.2-gd.lib
vtkhdf5_hl-6.2-gd.lib
vtkImagingColor-6.2-gd.lib
vtkImagingCore-6.2-gd.lib
vtkImagingFourier-6.2-gd.lib
vtkImagingGeneral-6.2-gd.lib
vtkImagingHybrid-6.2-gd.lib
vtkImagingMath-6.2-gd.lib
vtkImagingMorphological-6.2-gd.lib
vtkImagingSources-6.2-gd.lib
vtkImagingStatistics-6.2-gd.lib
vtkImagingStencil-6.2-gd.lib
vtkInfovisCore-6.2-gd.lib
vtkInfovisLayout-6.2-gd.lib
vtkInteractionImage-6.2-gd.lib
vtkInteractionStyle-6.2-gd.lib
vtkInteractionWidgets-6.2-gd.lib
vtkIOAMR-6.2-gd.lib
vtkIOCore-6.2-gd.lib
vtkIOEnSight-6.2-gd.lib
vtkIOExodus-6.2-gd.lib
vtkIOExport-6.2-gd.lib
vtkIOGeometry-6.2-gd.lib
vtkIOImage-6.2-gd.lib
vtkIOImport-6.2-gd.lib
vtkIOInfovis-6.2-gd.lib
vtkIOLegacy-6.2-gd.lib
vtkIOLSDyna-6.2-gd.lib
vtkIOMINC-6.2-gd.lib
vtkIOMovie-6.2-gd.lib
vtkIONetCDF-6.2-gd.lib
vtkIOParallel-6.2-gd.lib
vtkIOPLY-6.2-gd.lib
vtkIOSQL-6.2-gd.lib
vtkIOVideo-6.2-gd.lib
vtkIOXML-6.2-gd.lib
vtkIOXMLParser-6.2-gd.lib
vtkjpeg-6.2-gd.lib
vtkjsoncpp-6.2-gd.lib
vtklibxml2-6.2-gd.lib
vtkmetaio-6.2-gd.lib
vtkNetCDF-6.2-gd.lib
vtkNetCDF_cxx-6.2-gd.lib
vtkoggtheora-6.2-gd.lib
vtkParallelCore-6.2-gd.lib
vtkpng-6.2-gd.lib
vtkproj4-6.2-gd.lib
vtkRenderingAnnotation-6.2-gd.lib
vtkRenderingContext2D-6.2-gd.lib
vtkRenderingCore-6.2-gd.lib
vtkRenderingFreeType-6.2-gd.lib
vtkRenderingFreeTypeOpenGL-6.2-gd.lib
vtkRenderingGL2PS-6.2-gd.lib
vtkRenderingImage-6.2-gd.lib
vtkRenderingLabel-6.2-gd.lib
vtkRenderingLIC-6.2-gd.lib
vtkRenderingLOD-6.2-gd.lib
vtkRenderingOpenGL-6.2-gd.lib
vtkRenderingVolume-6.2-gd.lib
vtkRenderingVolumeOpenGL-6.2-gd.lib
vtksqlite-6.2-gd.lib
vtksys-6.2-gd.lib
vtktiff-6.2-gd.lib
vtkverdict-6.2-gd.lib
vtkViewsContext2D-6.2-gd.lib
vtkViewsCore-6.2-gd.lib
vtkViewsInfovis-6.2-gd.lib
vtkzlib-6.2-gd.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_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_surface_release.lib
pcl_tracking_release.lib
pcl_visualization_release.lib
libboost_atomic-vc120-mt-1_57.lib
libboost_chrono-vc120-mt-1_57.lib
libboost_container-vc120-mt-1_57.lib
libboost_context-vc120-mt-1_57.lib
libboost_coroutine-vc120-mt-1_57.lib
libboost_date_time-vc120-mt-1_57.lib
libboost_exception-vc120-mt-1_57.lib
libboost_filesystem-vc120-mt-1_57.lib
libboost_graph-vc120-mt-1_57.lib
libboost_iostreams-vc120-mt-1_57.lib
libboost_locale-vc120-mt-1_57.lib
libboost_log-vc120-mt-1_57.lib
libboost_log_setup-vc120-mt-1_57.lib
libboost_math_c99-vc120-mt-1_57.lib
libboost_math_c99f-vc120-mt-1_57.lib
libboost_math_c99l-vc120-mt-1_57.lib
libboost_math_tr1-vc120-mt-1_57.lib
libboost_math_tr1f-vc120-mt-1_57.lib
libboost_math_tr1l-vc120-mt-1_57.lib
libboost_mpi-vc120-mt-1_57.lib
libboost_prg_exec_monitor-vc120-mt-1_57.lib
libboost_program_options-vc120-mt-1_57.lib
libboost_random-vc120-mt-1_57.lib
libboost_regex-vc120-mt-1_57.lib
libboost_serialization-vc120-mt-1_57.lib
libboost_signals-vc120-mt-1_57.lib
libboost_system-vc120-mt-1_57.lib
libboost_test_exec_monitor-vc120-mt-1_57.lib
libboost_thread-vc120-mt-1_57.lib
libboost_timer-vc120-mt-1_57.lib
libboost_unit_test_framework-vc120-mt-1_57.lib
libboost_wave-vc120-mt-1_57.lib
libboost_wserialization-vc120-mt-1_57.lib
flann_cpp_s.lib
qhullstatic.lib
vtkalglib-6.2.lib
vtkChartsCore-6.2.lib
vtkCommonColor-6.2.lib
vtkCommonComputationalGeometry-6.2.lib
vtkCommonCore-6.2.lib
vtkCommonDataModel-6.2.lib
vtkCommonExecutionModel-6.2.lib
vtkCommonMath-6.2.lib
vtkCommonMisc-6.2.lib
vtkCommonSystem-6.2.lib
vtkCommonTransforms-6.2.lib
vtkDICOMParser-6.2.lib
vtkDomainsChemistry-6.2.lib
vtkexoIIc-6.2.lib
vtkexpat-6.2.lib
vtkFiltersAMR-6.2.lib
vtkFiltersCore-6.2.lib
vtkFiltersExtraction-6.2.lib
vtkFiltersFlowPaths-6.2.lib
vtkFiltersGeneral-6.2.lib
vtkFiltersGeneric-6.2.lib
vtkFiltersGeometry-6.2.lib
vtkFiltersHybrid-6.2.lib
vtkFiltersHyperTree-6.2.lib
vtkFiltersImaging-6.2.lib
vtkFiltersModeling-6.2.lib
vtkFiltersParallel-6.2.lib
vtkFiltersParallelImaging-6.2.lib
vtkFiltersProgrammable-6.2.lib
vtkFiltersSelection-6.2.lib
vtkFiltersSMP-6.2.lib
vtkFiltersSources-6.2.lib
vtkFiltersStatistics-6.2.lib
vtkFiltersTexture-6.2.lib
vtkFiltersVerdict-6.2.lib
vtkfreetype-6.2.lib
vtkftgl-6.2.lib
vtkGeovisCore-6.2.lib
vtkgl2ps-6.2.lib
vtkhdf5-6.2.lib
vtkhdf5_hl-6.2.lib
vtkImagingColor-6.2.lib
vtkImagingCore-6.2.lib
vtkImagingFourier-6.2.lib
vtkImagingGeneral-6.2.lib
vtkImagingHybrid-6.2.lib
vtkImagingMath-6.2.lib
vtkImagingMorphological-6.2.lib
vtkImagingSources-6.2.lib
vtkImagingStatistics-6.2.lib
vtkImagingStencil-6.2.lib
vtkInfovisCore-6.2.lib
vtkInfovisLayout-6.2.lib
vtkInteractionImage-6.2.lib
vtkInteractionStyle-6.2.lib
vtkInteractionWidgets-6.2.lib
vtkIOAMR-6.2.lib
vtkIOCore-6.2.lib
vtkIOEnSight-6.2.lib
vtkIOExodus-6.2.lib
vtkIOExport-6.2.lib
vtkIOGeometry-6.2.lib
vtkIOImage-6.2.lib
vtkIOImport-6.2.lib
vtkIOInfovis-6.2.lib
vtkIOLegacy-6.2.lib
vtkIOLSDyna-6.2.lib
vtkIOMINC-6.2.lib
vtkIOMovie-6.2.lib
vtkIONetCDF-6.2.lib
vtkIOParallel-6.2.lib
vtkIOPLY-6.2.lib
vtkIOSQL-6.2.lib
vtkIOVideo-6.2.lib
vtkIOXML-6.2.lib
vtkIOXMLParser-6.2.lib
vtkjpeg-6.2.lib
vtkjsoncpp-6.2.lib
vtklibxml2-6.2.lib
vtkmetaio-6.2.lib
vtkNetCDF-6.2.lib
vtkNetCDF_cxx-6.2.lib
vtkoggtheora-6.2.lib
vtkParallelCore-6.2.lib
vtkpng-6.2.lib
vtkproj4-6.2.lib
vtkRenderingAnnotation-6.2.lib
vtkRenderingContext2D-6.2.lib
vtkRenderingCore-6.2.lib
vtkRenderingFreeType-6.2.lib
vtkRenderingFreeTypeOpenGL-6.2.lib
vtkRenderingGL2PS-6.2.lib
vtkRenderingImage-6.2.lib
vtkRenderingLabel-6.2.lib
vtkRenderingLIC-6.2.lib
vtkRenderingLOD-6.2.lib
vtkRenderingOpenGL-6.2.lib
vtkRenderingVolume-6.2.lib
vtkRenderingVolumeOpenGL-6.2.lib
vtksqlite-6.2.lib
vtksys-6.2.lib
vtktiff-6.2.lib
vtkverdict-6.2.lib
vtkViewsContext2D-6.2.lib
vtkViewsCore-6.2.lib
vtkViewsInfovis-6.2.lib
vtkzlib-6.2.lib
验证是否安装成功
#include<pcl/visualization/cloud_viewer.h>
#include<iostream>
#include<pcl/io/io.h>
#include<pcl/io/pcd_io.h>
int main()
{
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudA(new pcl::PointCloud<pcl::PointXYZRGB>);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudB(new pcl::PointCloud<pcl::PointXYZRGB>);
pcl::io::loadPCDFile("cloudA.pcd", *cloudA);
pcl::io::loadPCDFile("cloudB.pcd", *cloudB);
pcl::visualization::PCLVisualizer viewer_pcl;
viewer_pcl.setCameraFieldOfView(0.785398); // approximately 45 degrees
viewer_pcl.setCameraPosition(0, 0, 0, 0, 0, 1, 0, -1, 0);
cloudA->operator+=(*cloudB);
viewer_pcl.addPointCloud(cloudA, "jiao");
viewer_pcl.spin();
return 0;
}
此程序功能为显示点云,工程文件夹下要放置两个点云文件cloudA.pcd,cloudB.pcd。注意编译平台要选择x64。