win8安装PCL1.8.1配置VS2017
来源:互联网 发布:编程用笔记本电脑推荐 编辑:程序博客网 时间:2024/06/11 12:33
安装环境:VS2017+win8+64位
由于当时安装VS安装的是2017版本,所以参考了网上2015版本进行相关安装和配置。
准备:
首先下载这两个文件:(链接里还有VS2015,根据自己版本下载)
PCL-1.8.1-AllInOne-msvc2017-win64.exe // All in one 安装包基本上包含了PCL中所使用全部第三方编译包
PCL-1.8.1-pdb-msvc2017-win64.zip //PDB文件包主要用于后期单步调试时使用
下载地址:https://github.com/PointCloudLibrary/pcl/releases
- 点开PCL-1.8.1-AllInOne-msvc2017-win64.exe安装一键安装包,然后选择自己的安装目录,勾选上Add PCL to system PATH for all users,安装组件默认全选就好,最后点安装;(时间可能有点久,耐心等)
- 由于组件中我们选择了openni,在安装过程中会提示需要安装openni,这时注意我们更改openni的安装路径为PCL安装路径下的3rdParty\OpenNI2\文件夹,然后同意安装PrimerSense,基本上就已经安装完了,接下来配置系统变量。
- 由于我们勾选了Add PCL to system PATH for all users,安装好后,系统变量里会自动出现下面的几个变量
- 接下来我们还要在Path变量下添加几个变量:%PCL_ROOT\bin;%PCL_ROOT%\3rdParty\VTK\bin;%PCL_ROOT%\3rdParty\FLANN\bin;%OPENNI2_REDIST64%;%PCL_ROOT%\3rdParty\Qhull\bin;%PCL_ROOT%\3rdParty\OpenNI2\Tools
- 然后重启电脑使它生效;最后解压PCL-1.8.1-pdb-msvc2017-win64.zip,将里面的pdb文件全部复制到PCL安装路径下bin文件夹中;
现在PCL已经安装好了,我们可以开始配置VS2017开发环境
(1)新建一个空项目,将项目设置成64位。
(2)切换属性管理器,在Debug|64下添加新项目属性表,取名PCL。
(2)切换属性管理器,在Debug|64下添加新项目属性表,取名PCL。
(3)左侧点VC++目录,右侧包含目录添加:
D:\Program Files\PCL 1.8.1\3rdParty\OpenNI2\Include;D:\Program Files\PCL 1.8.1\include\pcl-1.8;D:\Program Files\PCL 1.8.1\3rdParty\VTK\include\vtk-8.0;D:\Program Files\PCL 1.8.1\3rdParty\QHull\include;D:\Program Files\PCL 1.8.1\3rdParty\FLANN\include;D:\Program Files\PCL 1.8.1\3rdParty\Eigen\eigen3;D:\Program Files\PCL 1.8.1\3rdParty\Boost\include\boost-1_64;
右侧库目录添加:
D:\Program Files\PCL 1.8.1\3rdParty\OpenNI2\Lib;D:\Program Files\PCL 1.8.1\3rdParty\VTK\lib;D:\Program Files\PCL 1.8.1\3rdParty\Qhull\lib;D:\Program Files\PCL 1.8.1\3rdParty\FLANN\lib;D:\Program Files\PCL 1.8.1\3rdParty\Boost\lib;D:\Program Files\PCL 1.8.1\lib;
左侧点链接器,再点输入,找到附加依赖项,添加如下: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
(注意:上边的包含目录,库目录按你自己的来,附加依赖项有些库版本不同,根据自己文件夹来)
(4)(出现错误erroe c4996;_Uninitialized_copy0时添加)
右侧CC++,点击预处理器,右侧预处理器定义,添加上
_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS
(5)(可以不设置)
项目环境目录配置:右键解决方案,属性,左侧配置属性–调试,右侧环境设置为: PATH=$(PCL_ROOT)\bin;$(PCL_ROOT)\3rdParty\FLANN\bin;$(PCL_ROOT)\3rdParty\VTK\bin;$(PCL_ROOT)\Qhull\bin;$(PCL_ROOT)\3rdParty\OpenNI2\Tools;$(PATH)
安装测试
将下面代码拷贝到vs里,点运行,出现控制台窗口后,提示未找到点云文件,这个可以不管,不报错误,即成功配置pcl。
#include <pcl/visualization/cloud_viewer.h>#include <iostream>#include <pcl/io/io.h>#include <pcl/io/pcd_io.h>
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkInteractionStyle);VTK_MODULE_INIT(vtkRenderingFreeType);VTK_MODULE_INIT(vtkRenderingOpenGL);int user_data;void viewerOneOff(pcl::visualization::PCLVisualizer& viewer){ viewer.setBackgroundColor(1.0, 0.5, 1.0); pcl::PointXYZ o; o.x = 1.0; o.y = 0; o.z = 0; viewer.addSphere(o, 0.25, "sphere", 0); std::cout << "i only run once" << std::endl;}void viewerPsycho(pcl::visualization::PCLVisualizer& viewer){ static unsigned count = 0; std::stringstream ss; ss << "Once per viewer loop: " << count++; viewer.removeShape("text", 0); viewer.addText(ss.str(), 200, 300, "text", 0); //FIXME: possible race condition here: user_data++;}int main(){ pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>); pcl::io::loadPCDFile("my_point_cloud.pcd", *cloud); pcl::visualization::CloudViewer viewer("Cloud Viewer"); //blocks until the cloud is actually rendered viewer.showCloud(cloud); //use the following functions to get access to the underlying more advanced/powerful //PCLVisualizer //This will only get called once viewer.runOnVisualizationThreadOnce(viewerOneOff); //This will get called once per visualization iteration viewer.runOnVisualizationThread(viewerPsycho); while (!viewer.wasStopped()) { //you can also do cool processing here //FIXME: Note that this is running in a separate thread from viewerPsycho //and you should guard against race conditions yourself... user_data++; } return 0;}
阅读全文
0 0
- win8安装PCL1.8.1配置VS2017
- VS2017+PCL1.8.1+Cmake(3.6 or later)环境配置
- vs2015+PCL1.8.1配置
- win8.1 安装vs2017 需要更新KB2919355
- WIN8.1 64位 +vs2012+PCL1.72安装
- VS2017 + Opencv3.2.0 安装配置
- ubuntu16.04下PCL1.8.1安装
- Ubuntu16.04 PCL1.8.1源码安装
- C#开发环境配置-VS2017安装使用
- 拥抱开源 vs2010 openni kinect pcl1.6 win8 64 驱动安装 等问题汇
- win8安装配置图解
- PCL1.6.0配置VS2010
- PCL1.7.2 VS2013 配置
- VS2013+PCL1.8.0配置
- pcl1.6+vs2010配置
- vs13+pcl1.8配置
- PCL1.8.0+VS2013配置
- PCL1.4 安装
- 无名 2
- 火狐浏览器兼容
- 解决inline-block元素的 bug
- 视图
- HDU2685(gcd的定理)
- win8安装PCL1.8.1配置VS2017
- 将本地文档库提交到Github
- LintCode:M-单词切分
- JDBC中的四个最基本对象功能及其用法
- 23种设计模式-jvm-linux-nio-psb-集合-线程
- ZOJ3609 Modular Inverse (扩展欧几里得)
- c++基础之字符
- 第4课: Spark Streaming的Exactly-One的事务处理和不重复输出彻底掌握
- IntelliJ Idea 2017 免费激活方法