码迷,mamicode.com
首页 > 编程语言 > 详细

Windows10下PCL1.8.1以及Python-pcl1.81环境配置的掉发之路

时间:2019-11-30 00:07:35      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:only   comm   很多   libboost   更新   压缩包   etcd   资源管理   包含   

       因需要对三维激光点云进行处理,看到有C++下的PCL点云库,和Python下的Python-pcl(脱胎于C++下的PCL),在C++Python面前,我选择了跟风学习Python,毕竟人生苦短!然后前前后后折腾了很长时间,直至前两天终于碰到死耗子,成功搭建了Windows系统Python下的Python-pcl,所以不得不多哆嗦几句。一开始就选择在Windows下  进行部署,然后安装卸载报错无法解决中循环,然后看到很多博主推荐Linux系统,又想起曾经年少按照过双系统Ubuntu18.04,所以又去我陌生的Ubuntu下倒腾了两三天,果然还是别人Linux强,自己的一点也不争气,最后还是选择了我可爱的Windows......以下内容仅供个人记录,很多东西我至今也是懵的,不敢说能使用到投错医的你的身上。

1.环境简介

        Win10 64位,VS2017Python3.68PCL1.8.1Python-pcl,即github测试环境之一,配置Python-pcl需要提前配置PCL如下图(没有配好PCL前,一直没有搞好Python-pcl)。之前瞎搞没有注意,导致应该走了很多弯路,至今已不能一一列举。

技术图片

 

 

 

 

2.安装配置PCL1.81

2.1下载PCL1.8.1

        前往github PCL1.81,下载PCL-1.8.1-AllInOne-msvc2017-win64.exepcl-1.8.1-pdb-msvc2017-win64.zip,如下图:

技术图片

 

2.2安装并配置PCL1.8.1

【2.2.1】安装

       启动安装程序PCL-1.8.1-AllInOne-msvc2017-win64.exe,并记得勾选Add PCL to the system PATH for all users,理论上会帮你配置环境变量,不幸的是,我电脑上并没有帮我配置好,最后报了一个什么太长而没有配置成果的错误。

 

 技术图片【2.2.2】解压替换

       把下载的pcl-1.8.1-pdb-msvc2017-win64.zip压缩包解压,将里面的pbd文件复制在 X:\PCL\PCL 1.8.1\bin下(安装目录下的bin目录),没错是全部。

【2.2.3】环境变量配置

 

       当然如果前面勾选了Add PCL to the system PATH for all users,安装包会自动帮你配置环境变量,因为我之前试着在64位上安装32位的版本(红框内为64位),所以会有两个版本的,打码是因为大家都在打码......

       变量:

技术图片

 

技术图片

       环境变量:

 

 

 技术图片

 

 

 

       如果没有的话,需要手动配置(不建议),右击我的电脑-->属性-->高级系统设置-->环境变量-->下面的系统变量中的PATH中添加以下路径:

X:\PCL\PCL 1.8.1\bin;

X:\PCL\PCL 1.8.1\3rdParty\VTK\bin;

X:\PCL\PCL 1.8.1\3rdParty\FLANN\bin;

X:\PCL\PCL 1.8.1\3rdParty\Qhull\bin;

X:\PCL\PCL 1.8.1\3rdParty\OpenNI2\Tools;

  

 2.3VS2017中配置

【2.3.1】新建一个空项目,选择Debug-x64 

【2.3.2】配置目录及依赖

       在解决方案资源管理器中,右键选择属性,在最上面的配置中选择Debug-x64 ,在VC++目录的包含目录和库目录里分别添加以下对应项。

技术图片

 

 

        包含目录:

X:\PCL\PCL 1.8.1\3rdParty\OpenNI2\Include
X:\PCL\PCL 1.8.1\include\pcl-1.8
X:\PCL\PCL 1.8.1\3rdParty\VTK\include\vtk-8.0
X:\PCL\PCL 1.8.1\3rdParty\Qhull\include
X:\PCL\PCL 1.8.1\3rdParty\FLANN\include
X:\PCL\PCL 1.8.1\3rdParty\Eigen\eigen3
X:\PCL\PCL 1.8.1\3rdParty\Boost\include\boost-1_64

       库目录:

X:\PCL\PCL 1.8.1\3rdParty\OpenNI2\Lib
X:\PCL\PCL 1.8.1\3rdParty\VTK\lib
X:\PCL\PCL 1.8.1\3rdParty\Qhull\lib
X:\PCL\PCL 1.8.1\3rdParty\FLANN\lib
X:\PCL\PCL 1.8.1\3rdParty\Boost\lib
X:\PCL\PCL 1.8.1\lib

       在链接器-->输入-->附加依赖项中添加以下lib文件

技术图片

 

 

        附加依赖项

       Debug版本(我也是复制的,不敢改):

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;

opengl32.lib

  

       release版本:

pcl_common_release.lib;pcl_features_release.lib;pcl_filters_release.lib;pcl_io_ply_release.lib;pcl_io_r.lease.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;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-vc141-mt-1_64.lib;libboost_bzip2-vc141-mt-1_64.lib;libboost_chrono-vc141-mt-1_64.lib;libboost_container-vc141-mt-1_64.lib;libboost_context-vc141-mt-1_64.lib;libboost_coroutine-vc141-mt-1_64.lib;libboost_date_time-vc141-mt-1_64.lib;libboost_exception-vc141-mt-1_64.lib;libboost_fiber-vc141-mt-1_64.lib;libboost_filesystem-vc141-mt-1_64.lib;libboost_graph-vc141-mt-1_64.lib;libboost_graph_parallel-vc141-mt-1_64.lib;libboost_iostreams-vc141-mt-1_64.lib;libboost_locale-vc141-mt-1_64.lib;libboost_log-vc141-mt-1_64.lib;libboost_log_setup-vc141-mt-1_64.lib;libboost_math_c99-vc141-mt-1_64.lib;libboost_math_c99f-vc141-mt-1_64.lib;libboost_math_c99l-vc141-mt-1_64.lib;libboost_math_tr1-vc141-mt-1_64.lib;libboost_math_tr1f-vc141-mt-1_64.lib;libboost_math_tr1l-vc141-mt-1_64.lib;libboost_mpi-vc141-mt-1_64.lib;libboost_numpy-vc141-mt-1_64.lib;libboost_numpy3-vc141-mt-1_64.lib;libboost_prg_exec_monitor-vc141-mt-1_64.lib;libboost_program_options-vc141-mt-1_64.lib;libboost_python-vc141-mt-1_64.lib;libboost_python3-vc141-mt-1_64.lib;libboost_random-vc141-mt-1_64.lib;libboost_regex-vc141-mt-1_64.lib;libboost_serialization-vc141-mt-1_64.lib;libboost_signals-vc141-mt-1_64.lib;libboost_system-vc141-mt-1_64.lib;libboost_test_exec_monitor-vc141-mt-1_64.lib;libboost_thread-vc141-mt-1_64.lib;libboost_timer-vc141-mt-1_64.lib;libboost_type_erasure-vc141-mt-1_64.lib;libboost_unit_test_framework-vc141-mt-1_64.lib;libboost_wave-vc141-mt-1_64.lib;libboost_wserialization-vc141-mt-1_64.lib;libboost_zlib-vc141-mt-1_64.lib;libboost_atomic-vc141-mt-1_64.lib;libboost_bzip2-vc141-mt-1_64.lib;libboost_chrono-vc141-mt-1_64.lib;libboost_container-vc141-mt-1_64.lib;libboost_context-vc141-mt-1_64.lib;libboost_coroutine-vc141-mt-1_64.lib;libboost_date_time-vc141-mt-1_64.lib;libboost_exception-vc141-mt-1_64.lib;libboost_fiber-vc141-mt-1_64.lib;libboost_filesystem-vc141-mt-1_64.lib;libboost_graph-vc141-mt-1_64.lib;libboost_graph_parallel-vc141-mt-1_64.lib;libboost_iostreams-vc141-mt-1_64.lib;libboost_locale-vc141-mt-1_64.lib;libboost_log-vc141-mt-1_64.lib;libboost_log_setup-vc141-mt-1_64.lib;libboost_math_c99-vc141-mt-1_64.lib;libboost_math_c99f-vc141-mt-1_64.lib;libboost_math_c99l-vc141-mt-1_64.lib;libboost_math_tr1-vc141-mt-1_64.lib;libboost_math_tr1f-vc141-mt-1_64.lib;libboost_math_tr1l-vc141-mt-1_64.lib;libboost_mpi-vc141-mt-1_64.lib;libboost_numpy-vc141-mt-1_64.lib;libboost_numpy3-vc141-mt-1_64.lib;libboost_prg_exec_monitor-vc141-mt-1_64.lib;libboost_program_options-vc141-mt-1_64.lib;libboost_python-vc141-mt-1_64.lib;libboost_python3-vc141-mt-1_64.lib;libboost_random-vc141-mt-1_64.lib;libboost_regex-vc141-mt-1_64.lib;libboost_serialization-vc141-mt-1_64.lib;libboost_signals-vc141-mt-1_64.lib;libboost_system-vc141-mt-1_64.lib;libboost_test_exec_monitor-vc141-mt-1_64.lib;libboost_thread-vc141-mt-1_64.lib;libboost_timer-vc141-mt-1_64.lib;libboost_type_erasure-vc141-mt-1_64.lib;libboost_unit_test_framework-vc141-mt-1_64.lib;libboost_wave-vc141-mt-1_64.lib;libboost_wserialization-vc141-mt-1_64.lib;libboost_zlib-vc141-mt-1_64.lib;OpenNI2.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;vtknetcdf_c++.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;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;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;vtknetcdf_c++.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;qhull_p.lib;qhull_r.lib;qhull.lib;qhullcpp.lib;qhullstatic.lib;qhullstatic_r.lib;flann.lib;flann_cpp.lib;flann_cpp_s.lib;flann_s.lib;flann.lib;flann_cpp.lib;flann_cpp_s.lib;flann_s.lib;

  

2.4测试

#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);
    user_data++;
}
int main()
{
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>);
    pcl::io::loadPCDFile("rabbit.pcd", *cloud);//注意替换自己的pcd点云数据
    pcl::visualization::CloudViewer viewer("Cloud Viewer");
    viewer.showCloud(cloud);
    viewer.runOnVisualizationThreadOnce(viewerOneoff);
    viewer.runOnVisualizationThread(viewerPsycho);
    while (!viewer.wasStopped())
    {
        user_data++;
    }
    return 0;
}

结果如下:

技术图片

 

没错,可能会出问题:

问题1:简称warning STL4019:The member std::fpos::seekpos() is non-Standard

C4996 ‘std::fpos<_Mbstatet>::seekpos‘: warning STL4019: The member std::fpos::seekpos() is non-Standard, and is preserved only for compatibility with workarounds for old versions of Visual C++. It will be removed in a future release, and in this release always returns 0. Please use standards-conforming mechanisms to manipulate fpos, such as conversions to and from streamoff, or an integral type, instead. If you are receiving this message while compiling Boost.IOStreams, a fix has been submitted upstream to make Boost use standards-conforming mechanisms, as it does for other compilers. You can define _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING to acknowledge that you have received this warning, or define _REMOVE_FPOS_SEEKPOS to remove std::fpos::seekpos entirely.

 解决方案:右击项目,属性 --> C/C++ 常规 --> SDL检查 改为否,如下图:技术图片

 

 

问题2pcl_common_debug.dll等dll缺失

解决办法:启动Everything搜索大法,发现包好好的在那儿待着,然后我也不明白为什么程序找不到它们,然后网友们提到了环境变量问题,通过cmdpath打印出来发现该有的都有(安装PCL1.8.1时自动配置的,因为当时报错好像没有完全配置成功),迫于无奈,还是将对应缺失的dll路径重新添加到了系统环境变量中,置于自动添加系统变量之上。红框内为根据缺dll后续添加的系统路径,绿框内为安装自动生成的(应该哪里有问题)。

技术图片

 

 

 技术图片

 

 

 3.Python-pcl下载与配置

3.1Python-pcl下载

        github下载Python-pcl,以ZIP形式下载到本地并解压。

3.2Windows Gtk+下载

       下载Windows Gtk+并解压,将bin目录下的文件拷贝到上一个步骤解压的python-pcl-master文件夹下的pkg-config文件夹中。注意:据说 GTK+ 3.x版本跟Python2.7不兼容,此处不待考究下载了gtk+-bundle_3.6.4-20130513_win64.zip,电脑位数永远要注意。

3.3安装必需模块

       因为很多电脑都会有多个版本的Python,使用pip时应该注意,此处保险起见使用pip3

pip3 install --upgrade pip
pip3 install cython==0.25.2
pip3 install numpy

       题外话,运行第一步pip3 install --upgrade pip就出现了问题:更新pip时,好像把pip删了又提示没有权限写入新的pip(具体错误提示记不清了),然后连pip命令都无法使用了。

       解决办法:先后执行如下命令

python -m ensurepip
python -m pip install --upgrade pip

3.4编译?

       cmd进入解压后的python-pcl-master目录(目录包含setup.py

python setup.py build_ext -i
python setup.py install

       然后我就成了......

3.5测试案例

import pcl
import pcl.pcl_visualization
fileName=H:/Workspace/data/rabbit.pcd;#注意更换自己的pcd点云文件
cloud=pcl.load_XYZRGB(fileName)
visual = pcl.pcl_visualization.CloudViewing()

print(cloud[1])
visual.ShowColorCloud(cloud, bcloud)
v = True
while v:
    v = not (visual.WasStopped())

结果如下:

技术图片

参考博客:

https://blog.csdn.net/lhm_19960601/article/details/81196640
http://www.pclcn.org/bbs/forum.php?mod=viewthread&tid=170&extra=&page=1
https://blog.csdn.net/lizhengze1117/article/details/86567587
https://blog.csdn.net/stereohomology/article/details/37729289
https://blog.csdn.net/wwangfabei1989/article/details/80107147

结束语:

从最开始的啥都不知道,到不断的试错,不断尝试,直至碰巧配置成功,其间种种啥也不想说........

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Windows10下PCL1.8.1以及Python-pcl1.81环境配置的掉发之路

标签:only   comm   很多   libboost   更新   压缩包   etcd   资源管理   包含   

原文地址:https://www.cnblogs.com/waterbbro/p/11960616.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!