??????目录
??????1.1 下载资源包
1.2 安装PCL|OpenNI2
1.3 VS2015环境下配置PCL1.8.1
Release配置
Debug下配置
1.4 测试
CMake编译
VS2015编译
系列错误
待解决问题!
摆烂
1.5 说明
1.6 参考资料:
附:PCL下载网址:
1.1 下载资源包
默认安装好vs2015
vs下载地址:https://my.visualstudio.com/Downloads
需要:
-
① All in one 安装包 下载地址: http :// pointclouds.org/downloads/windows.html -
② all in one 包对应的PDB包 下载地址: https://github.com/PointCloudLibrary/pcl/releases -
③ PCL 源码包 下载地址: https ://github.com/PointCloudLibrary/pcl -
④ CMake
①②安装包下载地址: Point Cloud Library 1.8.1 has been released – Summary?Blog
1.2 安装PCL|OpenNI2
选择 PCL-1.8.1-AllInOne-msvc2015-win64_3 安装包,右键 以管理员身份运行;
选择第二个,Add PCL to the system PATH for all users 下一步;
?选择安装位置;
默认下一步;
选择安装的组件,默认全选;
等待;
安装过程中,提示安装OpenNI2.2
后面有的说OpenNI2太高,建议低版本,亲测高版本没啥影响,所以高低版本都行
改变安装路径,将安装路径设为PCL安装路径中的3rdParty文件夹中,即 D:\Program Files\PCL 1.8.1\3rdParty\ ,然后Install;
弹出提示:选择 安装
完成,Finish
提示 路径太长... 不用管,确定就行;
完成安装;
进入高级系统设置,查看环境变量;
出现这四个环境变量;
双击 Path ,编辑环境变量;
新建以下环境变量;
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?%PCL_ROOT%\3rdParty\FLANN\bin
??
?%PCL_ROOT%\3rdParty\Qhull\bin
??
?%PCL_ROOT%\3rdParty\OpenNI2\Tools
??
?%PCL_ROOT%\3rdParty\VTK\bin </span></span>
解压下载的 pcl-1.8.1-pdb-msvc2015-win64 文件夹,并将其中的全部pdb文件复制到PCL安装路径的bin文件夹下,我的是 D:\Program Files\PCL 1.8.1\bin
?按照《pcl点云库从入门到精通》上面内容,到此用CMake 进行测试,但是测试会出现问题:
网上找到了这个,但好像并没什么关系,先放这把:
CMake error: error in configuration process, project files may be invalid_lsxpu的专栏-CSDN博客
CMake
下载: 官网:Download | CMake 安装很简单,注意安装时自动添加环境变量就行
使用:
https://blog.csdn.net/finghting321/article/details
等具体用到再补充吧!
1.3 VS2015环境下配置PCL1.8.1
打开vs2015,新建项目,选择新建Win32控制台应用程序,命名为PCL_env_set.cpp 名字随意
?然后找到 视图 - 其他窗口 - 属性管理器 ,打开属性管理器
在 release|x64文件夹上 右键 添加新项目属性表,取名 PCLRelease64 ;
同样,在Debug|x64下添加新项目属性表,取名PCLDebug64;
Release配置
双击PCLRelease64,弹出属性页,左侧选中VC++目录
右侧在 包含目录 和 库目录 中添加如下路径 [ 路径要和自己安装位置相匹配 ]
包含目录
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?D:\Program Files\PCL 1.8.1\include\pcl-1.8
?D:\Program Files\PCL 1.8.1\3rdParty\Boost\include\boost-1_64
?D:\Program Files\PCL 1.8.1\3rdParty\Eigen\eigen3
?D:\Program Files\PCL 1.8.1\3rdParty\FLANN\include
?D:\Program Files\PCL 1.8.1\3rdParty\Qhull\include
?D:\Program Files\PCL 1.8.1\3rdParty\VTK\include\vtk-8.0
?D:\Program Files\PCL 1.8.1\3rdParty\OpenNI2\include</span></span>
注意: OpenNI2 文件夹中没有include文件夹,此处待解决,目前是先按教程写了上去
库目录
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?D:\Program Files\PCL 1.8.1\lib
?D:\Program Files\PCL 1.8.1\3rdParty\VTK\lib
?D:\Program Files\PCL 1.8.1\3rdParty\Boost\lib
?D:\Program Files\PCL 1.8.1\3rdParty\FLANN\lib
?D:\Program Files\PCL 1.8.1\3rdParty\Qhull\lib
?D:\Program Files\PCL 1.8.1\3rdParty\OpenNI2\Lib </span></span>
注意: OpenNI2 文件夹中没有Lib文件夹,此处待解决,目前是先按教程写了上去
此处问题待解决
解决办法:
受此篇博客的启发,我试了一下卸载重装OpenNI
PCL安装过程中openni不能正常安装_放舟江湖的博客-CSDN博客
这个问题卸载重装能解决!!!
重新安装后:
这时回到上面的包含目录 和 库目录 路径设置处!
将OPenNI的路径重新选择一下即可!
双击 PCLRelrase64 找到左侧 链接器 - 输入 - 附加依赖库
将以下内容添加至依赖项中
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?shell32.lib
?vtknetcdf_c++.lib
?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_ml_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_stereo_release.lib
?pcl_surface_release.lib
?pcl_tracking_release.lib
?pcl_visualization_release.lib
?libboost_atomic-vc140-mt-1_64.lib
?libboost_bzip2-vc140-mt-1_64.lib
?libboost_chrono-vc140-mt-1_64.lib
?libboost_container-vc140-mt-1_64.lib
?libboost_context-vc140-mt-1_64.lib
?libboost_coroutine-vc140-mt-1_64.lib
?libboost_date_time-vc140-mt-1_64.lib
?libboost_exception-vc140-mt-1_64.lib
?libboost_fiber-vc140-mt-1_64.lib
?libboost_filesystem-vc140-mt-1_64.lib
?libboost_graph-vc140-mt-1_64.lib
?libboost_graph_parallel-vc140-mt-1_64.lib
?libboost_iostreams-vc140-mt-1_64.lib
?libboost_locale-vc140-mt-1_64.lib
?libboost_log-vc140-mt-1_64.lib
?libboost_log_setup-vc140-mt-1_64.lib
?libboost_math_c99-vc140-mt-1_64.lib
?libboost_math_c99f-vc140-mt-1_64.lib
?libboost_math_c99l-vc140-mt-1_64.lib
?libboost_math_tr1-vc140-mt-1_64.lib
?libboost_math_tr1f-vc140-mt-1_64.lib
?libboost_math_tr1l-vc140-mt-1_64.lib
?libboost_mpi-vc140-mt-1_64.lib
?libboost_numpy3-vc140-mt-1_64.lib
?libboost_numpy-vc140-mt-1_64.lib
?libboost_prg_exec_monitor-vc140-mt-1_64.lib
?libboost_program_options-vc140-mt-1_64.lib
?libboost_python3-vc140-mt-1_64.lib
?libboost_python-vc140-mt-1_64.lib
?libboost_random-vc140-mt-1_64.lib
?libboost_regex-vc140-mt-1_64.lib
?libboost_serialization-vc140-mt-1_64.lib
?libboost_signals-vc140-mt-1_64.lib
?libboost_system-vc140-mt-1_64.lib
?libboost_test_exec_monitor-vc140-mt-1_64.lib
?libboost_thread-vc140-mt-1_64.lib
?libboost_timer-vc140-mt-1_64.lib
?libboost_type_erasure-vc140-mt-1_64.lib
?libboost_unit_test_framework-vc140-mt-1_64.lib
?libboost_wave-vc140-mt-1_64.lib
?libboost_wserialization-vc140-mt-1_64.lib
?libboost_zlib-vc140-mt-1_64.lib
?flann.lib
?flann_cpp.lib
?flann_cpp_s.lib
?flann_s.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.lib
?vtkChartsCore-8.0.lib
?vtkCommonColor-8.0.lib
?vtkCommonComputationalGeometry-8.0.lib
?vtkCommonCore-8.0.lib
?vtkCommonDataModel-8.0.lib
?vtkCommonExecutionModel-8.0.lib
?vtkCommonMath-8.0.lib
?vtkCommonMisc-8.0.lib
?vtkCommonSystem-8.0.lib
?vtkCommonTransforms-8.0.lib
?vtkDICOMParser-8.0.lib
?vtkDomainsChemistry-8.0.lib
?vtkexoIIc-8.0.lib
?vtkexpat-8.0.lib
?vtkFiltersAMR-8.0.lib
?vtkFiltersCore-8.0.lib
?vtkFiltersExtraction-8.0.lib
?vtkFiltersFlowPaths-8.0.lib
?vtkFiltersGeneral-8.0.lib
?vtkFiltersGeneric-8.0.lib
?vtkFiltersGeometry-8.0.lib
?vtkFiltersHybrid-8.0.lib
?vtkFiltersHyperTree-8.0.lib
?vtkFiltersImaging-8.0.lib
?vtkFiltersModeling-8.0.lib
?vtkFiltersParallel-8.0.lib
?vtkFiltersParallelImaging-8.0.lib
?vtkFiltersPoints-8.0.lib
?vtkFiltersProgrammable-8.0.lib
?vtkFiltersSelection-8.0.lib
?vtkFiltersSMP-8.0.lib
?vtkFiltersSources-8.0.lib
?vtkFiltersStatistics-8.0.lib
?vtkFiltersTexture-8.0.lib
?vtkFiltersTopology-8.0.lib
?vtkFiltersVerdict-8.0.lib
?vtkfreetype-8.0.lib
?vtkGeovisCore-8.0.lib
?vtkgl2ps-8.0.lib
?vtkhdf5-8.0.lib
?vtkhdf5_hl-8.0.lib
?vtkImagingColor-8.0.lib
?vtkImagingCore-8.0.lib
?vtkImagingFourier-8.0.lib
?vtkImagingGeneral-8.0.lib
?vtkImagingHybrid-8.0.lib
?vtkImagingMath-8.0.lib
?vtkImagingMorphological-8.0.lib
?vtkImagingSources-8.0.lib
?vtkImagingStatistics-8.0.lib
?vtkImagingStencil-8.0.lib
?vtkInfovisCore-8.0.lib
?vtkInfovisLayout-8.0.lib
?vtkInteractionImage-8.0.lib
?vtkInteractionStyle-8.0.lib
?vtkInteractionWidgets-8.0.lib
?vtkIOAMR-8.0.lib
?vtkIOCore-8.0.lib
?vtkIOEnSight-8.0.lib
?vtkIOExodus-8.0.lib
?vtkIOExport-8.0.lib
?vtkIOExportOpenGL-8.0.lib
?vtkIOGeometry-8.0.lib
?vtkIOImage-8.0.lib
?vtkIOImport-8.0.lib
?vtkIOInfovis-8.0.lib
?vtkIOLegacy-8.0.lib
?vtkIOLSDyna-8.0.lib
?vtkIOMINC-8.0.lib
?vtkIOMovie-8.0.lib
?vtkIONetCDF-8.0.lib
?vtkIOParallel-8.0.lib
?vtkIOParallelXML-8.0.lib
?vtkIOPLY-8.0.lib
?vtkIOSQL-8.0.lib
?vtkIOTecplotTable-8.0.lib
?vtkIOVideo-8.0.lib
?vtkIOXML-8.0.lib
?vtkIOXMLParser-8.0.lib
?vtkjpeg-8.0.lib
?vtkjsoncpp-8.0.lib
?vtklibharu-8.0.lib
?vtklibxml2-8.0.lib
?vtklz4-8.0.lib
?vtkmetaio-8.0.lib
?vtkNetCDF-8.0.lib
?vtkoggtheora-8.0.lib
?vtkParallelCore-8.0.lib
?vtkpng-8.0.lib
?vtkproj4-8.0.lib
?vtkRenderingAnnotation-8.0.lib
?vtkRenderingContext2D-8.0.lib
?vtkRenderingContextOpenGL-8.0.lib
?vtkRenderingCore-8.0.lib
?vtkRenderingFreeType-8.0.lib
?vtkRenderingGL2PS-8.0.lib
?vtkRenderingImage-8.0.lib
?vtkRenderingLabel-8.0.lib
?vtkRenderingLIC-8.0.lib
?vtkRenderingLOD-8.0.lib
?vtkRenderingOpenGL-8.0.lib
?vtkRenderingVolume-8.0.lib
?vtkRenderingVolumeOpenGL-8.0.lib
?vtksqlite-8.0.lib
?vtksys-8.0.lib
?vtktiff-8.0.lib
?vtkverdict-8.0.lib
?vtkViewsContext2D-8.0.lib
?vtkViewsCore-8.0.lib
?vtkViewsInfovis-8.0.lib
?vtkzlib-8.0.lib
?opengl32.lib</span></span>
Debug下配置
Debug下配置vc++的包含目录和库目录与Release下的一样
附加依赖项有所不同:
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?shell32.lib
?vtknetcdf_c++.lib
?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_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-vc140-mt-1_64.lib
?libboost_bzip2-vc140-mt-1_64.lib
?libboost_chrono-vc140-mt-1_64.lib
?libboost_container-vc140-mt-1_64.lib
?libboost_context-vc140-mt-1_64.lib
?libboost_coroutine-vc140-mt-1_64.lib
?libboost_date_time-vc140-mt-1_64.lib
?libboost_exception-vc140-mt-1_64.lib
?libboost_fiber-vc140-mt-1_64.lib
?libboost_filesystem-vc140-mt-1_64.lib
?libboost_graph-vc140-mt-1_64.lib
?libboost_graph_parallel-vc140-mt-1_64.lib
?libboost_iostreams-vc140-mt-1_64.lib
?libboost_locale-vc140-mt-1_64.lib
?libboost_log-vc140-mt-1_64.lib
?libboost_log_setup-vc140-mt-1_64.lib
?libboost_math_c99-vc140-mt-1_64.lib
?libboost_math_c99f-vc140-mt-1_64.lib
?libboost_math_c99l-vc140-mt-1_64.lib
?libboost_math_tr1-vc140-mt-1_64.lib
?libboost_math_tr1f-vc140-mt-1_64.lib
?libboost_math_tr1l-vc140-mt-1_64.lib
?libboost_mpi-vc140-mt-1_64.lib
?libboost_numpy3-vc140-mt-1_64.lib
?libboost_numpy-vc140-mt-1_64.lib
?libboost_prg_exec_monitor-vc140-mt-1_64.lib
?libboost_program_options-vc140-mt-1_64.lib
?libboost_python3-vc140-mt-1_64.lib
?libboost_python-vc140-mt-1_64.lib
?libboost_random-vc140-mt-1_64.lib
?libboost_regex-vc140-mt-1_64.lib
?libboost_serialization-vc140-mt-1_64.lib
?libboost_signals-vc140-mt-1_64.lib
?libboost_system-vc140-mt-1_64.lib
?libboost_test_exec_monitor-vc140-mt-1_64.lib
?libboost_thread-vc140-mt-1_64.lib
?libboost_timer-vc140-mt-1_64.lib
?libboost_type_erasure-vc140-mt-1_64.lib
?libboost_unit_test_framework-vc140-mt-1_64.lib
?libboost_wave-vc140-mt-1_64.lib
?libboost_wserialization-vc140-mt-1_64.lib
?libboost_zlib-vc140-mt-1_64.lib
?flann.lib
?flann_cpp.lib
?flann_cpp_s.lib
?flann_s.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.lib
?vtkChartsCore-8.0.lib
?vtkCommonColor-8.0.lib
?vtkCommonComputationalGeometry-8.0.lib
?vtkCommonCore-8.0.lib
?vtkCommonDataModel-8.0.lib
?vtkCommonExecutionModel-8.0.lib
?vtkCommonMath-8.0.lib
?vtkCommonMisc-8.0.lib
?vtkCommonSystem-8.0.lib
?vtkCommonTransforms-8.0.lib
?vtkDICOMParser-8.0.lib
?vtkDomainsChemistry-8.0.lib
?vtkexoIIc-8.0.lib
?vtkexpat-8.0.lib
?vtkFiltersAMR-8.0.lib
?vtkFiltersCore-8.0.lib
?vtkFiltersExtraction-8.0.lib
?vtkFiltersFlowPaths-8.0.lib
?vtkFiltersGeneral-8.0.lib
?vtkFiltersGeneric-8.0.lib
?vtkFiltersGeometry-8.0.lib
?vtkFiltersHybrid-8.0.lib
?vtkFiltersHyperTree-8.0.lib
?vtkFiltersImaging-8.0.lib
?vtkFiltersModeling-8.0.lib
?vtkFiltersParallel-8.0.lib
?vtkFiltersParallelImaging-8.0.lib
?vtkFiltersPoints-8.0.lib
?vtkFiltersProgrammable-8.0.lib
?vtkFiltersSelection-8.0.lib
?vtkFiltersSMP-8.0.lib
?vtkFiltersSources-8.0.lib
?vtkFiltersStatistics-8.0.lib
?vtkFiltersTexture-8.0.lib
?vtkFiltersTopology-8.0.lib
?vtkFiltersVerdict-8.0.lib
?vtkfreetype-8.0.lib
?vtkGeovisCore-8.0.lib
?vtkgl2ps-8.0.lib
?vtkhdf5-8.0.lib
?vtkhdf5_hl-8.0.lib
?vtkImagingColor-8.0.lib
?vtkImagingCore-8.0.lib
?vtkImagingFourier-8.0.lib
?vtkImagingGeneral-8.0.lib
?vtkImagingHybrid-8.0.lib
?vtkImagingMath-8.0.lib
?vtkImagingMorphological-8.0.lib
?vtkImagingSources-8.0.lib
?vtkImagingStatistics-8.0.lib
?vtkImagingStencil-8.0.lib
?vtkInfovisCore-8.0.lib
?vtkInfovisLayout-8.0.lib
?vtkInteractionImage-8.0.lib
?vtkInteractionStyle-8.0.lib
?vtkInteractionWidgets-8.0.lib
?vtkIOAMR-8.0.lib
?vtkIOCore-8.0.lib
?vtkIOEnSight-8.0.lib
?vtkIOExodus-8.0.lib
?vtkIOExport-8.0.lib
?vtkIOExportOpenGL-8.0.lib
?vtkIOGeometry-8.0.lib
?vtkIOImage-8.0.lib
?vtkIOImport-8.0.lib
?vtkIOInfovis-8.0.lib
?vtkIOLegacy-8.0.lib
?vtkIOLSDyna-8.0.lib
?vtkIOMINC-8.0.lib
?vtkIOMovie-8.0.lib
?vtkIONetCDF-8.0.lib
?vtkIOParallel-8.0.lib
?vtkIOParallelXML-8.0.lib
?vtkIOPLY-8.0.lib
?vtkIOSQL-8.0.lib
?vtkIOTecplotTable-8.0.lib
?vtkIOVideo-8.0.lib
?vtkIOXML-8.0.lib
?vtkIOXMLParser-8.0.lib
?vtkjpeg-8.0.lib
?vtkjsoncpp-8.0.lib
?vtklibharu-8.0.lib
?vtklibxml2-8.0.lib
?vtklz4-8.0.lib
?vtkmetaio-8.0.lib
?vtkNetCDF-8.0.lib
?vtkoggtheora-8.0.lib
?vtkParallelCore-8.0.lib
?vtkpng-8.0.lib
?vtkproj4-8.0.lib
?vtkRenderingAnnotation-8.0.lib
?vtkRenderingContext2D-8.0.lib
?vtkRenderingContextOpenGL-8.0.lib
?vtkRenderingCore-8.0.lib
?vtkRenderingFreeType-8.0.lib
?vtkRenderingGL2PS-8.0.lib
?vtkRenderingImage-8.0.lib
?vtkRenderingLabel-8.0.lib
?vtkRenderingLIC-8.0.lib
?vtkRenderingLOD-8.0.lib
?vtkRenderingOpenGL-8.0.lib
?vtkRenderingVolume-8.0.lib
?vtkRenderingVolumeOpenGL-8.0.lib
?vtksqlite-8.0.lib
?vtksys-8.0.lib
?vtktiff-8.0.lib
?vtkverdict-8.0.lib
?vtkViewsContext2D-8.0.lib
?vtkViewsCore-8.0.lib
?vtkViewsInfovis-8.0.lib
?vtkzlib-8.0.lib
?opengl32.lib</span></span>
在PCLDebug64属性页中点击C/C++选项中的 预处理器,编辑 预处理器定义;
此处设置参考来源:
02VS2017安装和配置PCL1-8-1-Windows-下配置安装PCL-开发环境 · 语雀 (yuque.com)
添加如下命令:
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?_CRT_SECURE_NO_WARNINGS
?_SCL_SECURE_NO_WARNINGS
?_SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING</span></span>
配置完成
1.4 测试
由于网络教程的测试基本没有给全文件,所以:
测试方式 via 《PCL点云库从入门到精通》PDF24页
CMake编译
建立两个文件,源程序文件 和 cmake配置文件 CMakeList.txt ,将这两个文件放置在同一文件夹source下,在source同一目录下建立cmake_bin文件夹
《PCL点云库从入门到精通》第二章第一节有源程序文件 和 cmake配置文件CMakeList.txt 的源代码
打开CMake程序,设置源文件目录与编译目录如图所示:
点击Generate ,选择 visual studio 14 2015 win64;
?
单击Finish ,再单击配置与生产按钮,等待:
等待 done
VS2015编译
打开刚才建立的 cmake_bin 文件夹得到工程文件
打开上图选中的工程文件 生成 .exe 文件,如图所示
【按照书中的代码编译会出错,报错代码为c2664,问题出在源文件中的代码,小白一枚,师兄帮我解决的 参考:PCL使用ConditionalRemoval移除离群点报错解决_岛民浩哥的博客-CSDN博客】
调好的代码暂存:
<span style="background-color:#f5f6f7"><span style="color:#1f2329">?#include <pcl/point_types.h>
? #include <pcl/io/pcd_io.h>
? #include <pcl/kdtree/kdtree_flann.h>
? #include <pcl/filters/bilateral.h>
??
?typedef pcl::PointXYZI PointT;
??
?int
?main (int argc, char*argv[])
? {
?std::string incloudfile = argv[1];
?std::string outcloudfile = argv[2];
?float sigma_s = atof (argv[3]);
?float sigma_r = atof (argv[4]);
??
?// 读入点云文件
? ? pcl::PointCloud<PointT>::Ptr cloud (new pcl::PointCloud<PointT>);
?pcl::io::loadPCDFile (incloudfile.c_str (), *cloud);
??
? ? pcl::PointCloud<PointT>outcloud;
??
?// 建立kdtree
? ? //pcl::KdTreeFLANN<PointT>::Ptr tree (new pcl::KdTreeFLANN<PointT>);
? ? pcl::search::KdTree<PointT>::Ptr tree(new pcl::search::KdTree<PointT>);
? ? pcl::BilateralFilter<PointT> bf;
? ? bf.setInputCloud (cloud);
? ? bf.setSearchMethod (tree);
? ? bf.setHalfSize (sigma_s);
? ? bf.setStdDev (sigma_r);
? ? bf.filter (outcloud);
??
?// 保存滤波输出点云文件
?pcl::io::savePCDFile (outcloudfile.c_str (), outcloud);
?return (0);
? }
??</span></span>
打开cmd cd到编译输出的 .exe文件目录下,运行该程序文件,
系列错误
出现错误:
在pcl安装目录中找到pcl_common_debug.dll 复制到工程目录下
pcl_common_debug.dll 文件 应该在 D:\Program Files\PCL 1.8.1\bin 目录下找
重新运行;
继续出错:
出错:
出错:
烦了,将pcl安装目录下的bin文件夹下的所有.dll文件全拷贝到.exe同级目录下:
又nm出错?
找到PCL安装目录 D:\Program Files\PCL 1.8.1\3rdParty\OpenNI2\Tools
将缺失的.dll文件拷贝到.exe程序同级目录
出错:
//翻译一下大致是:
??
调试失败</span>
??
表达式:无效的空指针
??
有关程序如何导致失败的信息,请参阅有关断言的VisualC++文档。
待解决问题!
还是找网上的测试吧:
02VS2017安装和配置PCL1-8-1-Windows-下配置安装PCL-开发环境 · 语雀 (yuque.com)
将下载的pcb文件复制在之前配置的文件夹处 这里 点击跳转
将源代码复制在新建的.cpp文件中
调试,提示 无法查找或打开 PDB 文件。
网上找的解决办法,试了一下,感觉不太行链接放上:
已加载“C:\Windows\System32\ntdll.dll”。无法查找或打开 PDB 文件。解决方法。_让思想去旅行的博客-CSDN博客
虽然没报错,但是生成的exe程序无法运行
接着 在这个评论区看到说 按ctr+F5 visual studio 调试时提示 已加载“C:\Windows\SysWOW64\ntdll.dll”。无法查找或打开 PDB 文件。_win_turn的博客-CSDN博客
试了一下,好像 有点希望了,按提示加入 #include "stdafx.h"
Ctrl+F5 试一下
nm...d...
去求吧,不搞了
摆烂
上面的问题解决不了,摆烂时候又重新试一下在VS2015编译,也就是这一步 点击跳转
出错:
提示:
怎么又TM出错啊?
那就重新再从CMake编译开始
点击跳转
编译结果:
不都写了 成功1,失败,0,跳过1
怎么还有这样的错误?
报错:
不管了,反正应该能打开 .exe文件
试试吧
出错:和上面的一样缺少 .dll
解决方法同上,还好我在删除前把上次拷贝的全部.dll放在一个文件夹里保存了
...没保存上
那就慢慢找吧
把缺的.dll文件放在.exe程序同级目录下
运行
历史总是惊人的相似,还是原来的错误,那就必须解决了!
解决办法个更新在这里: 点击跳转
1.5 说明
下次打开一个新的vs工程,如何添加保存好的属性表
点击“视图”->“其他窗口”->“属性管理器”
在Debug | x64上右键单击,选择“添加现有属性表”,选择PCL安装目录下的PCLd64PropertySheet.props;
在Release | x64上右键单击,选择“添加现有属性表”,选择PCL安装目录下的PCLr64PropertySheet.props;
这里就需要记住配置时创建的文件夹,我的是
D:\Visual Studio2015_PCL\PCL_environment\PCL_env_set.cpp\PCL_env_set.cpp
点击“视图”->“解决方案资源管理器”,回到工程即可。
?
1.6 参考资料:
【PCL点云库】Win10+VS2015+PCL1.8.1配置_su_fan的博客-CSDN博客
win10+vs2015+pcl1.8.1安装配置_u013925378的博客-CSDN博客_pcl vs2015
02VS2017安装和配置PCL1-8-1-Windows-下配置安装PCL-开发环境 · 语雀 (yuque.com)
PCL学习:用cmd测试安装提示无法找到没有找到pcl_common_debug.dll_zfjBIT的专栏-CSDN博客
PCL安装-win10+vs2017+PCL1.8.1(一)_xiaopi3的博客-CSDN博客
肝了几百个网页,放几个参考最多的吧......
附:PCL下载网址:
1.8.1-vs2015_x64 Point Cloud Library 1.8.1 has been released – Summary?Blog
1.9.0-vs2017_x64 Point Cloud Library 1.9.0 has been released – Summary?Blog
|