配置:pcl1.8.0+vs2013环境配置(详细)_pcl:1.8.0 vs:2013 qt:5.9.0-CSDN博客
查看这篇,虽然文章看起来有些年头,但内容仍然是准确的(我配置的时候有个博客的附加项全是错误的,搞人心态emmmm)。然而,在配置附加依赖项的步骤中,存在一些版本相关的问题:
在libboost_atomic-vc141-mt-gd-x64-1_68.lib等文件中,vc141和1_68等标识需要根据您的PCL 1.9.1\3rdParty\Boost\lib文件夹中的实际情况进行修改;同理,vtkalglib-8.1-gd.lib文件中的8.1也需根据PCL 1.9.1\3rdParty\VTK\lib文件夹中的内容进行相应更改。这两个路径应依据您电脑上的安装情况来确定。
这个是另外一篇配置的,也还行,但是记住,最后一个,附加项那一步很重要!!!!!!!!!
Windows + VS2017超详细点云库(PCL)配置 | GYSHGX868's Notes
我的个人版本是1.9.1,我的Debug版本附加依赖项如下(和我版本一致的可以直接复制):
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-x64-1_68.lib
libboost_bzip2-vc141-mt-gd-x64-1_68.lib
libboost_chrono-vc141-mt-gd-x64-1_68.lib
libboost_container-vc141-mt-gd-x64-1_68.lib
libboost_context-vc141-mt-gd-x64-1_68.lib
libboost_coroutine-vc141-mt-gd-x64-1_68.lib
libboost_date_time-vc141-mt-gd-x64-1_68.lib
libboost_exception-vc141-mt-gd-x64-1_68.lib
libboost_fiber-vc141-mt-gd-x64-1_68.lib
libboost_filesystem-vc141-mt-gd-x64-1_68.lib
libboost_graph-vc141-mt-gd-x64-1_68.lib
libboost_graph_parallel-vc141-mt-gd-x64-1_68.lib
libboost_iostreams-vc141-mt-gd-x64-1_68.lib
libboost_locale-vc141-mt-gd-x64-1_68.lib
libboost_log-vc141-mt-gd-x64-1_68.lib
libboost_log_setup-vc141-mt-gd-x64-1_68.lib
libboost_math_c99-vc141-mt-gd-x64-1_68.lib
libboost_math_c99f-vc141-mt-gd-x64-1_68.lib
libboost_math_c99l-vc141-mt-gd-x64-1_68.lib
libboost_math_tr1-vc141-mt-gd-x64-1_68.lib
libboost_math_tr1f-vc141-mt-gd-x64-1_68.lib
libboost_math_tr1l-vc141-mt-gd-x64-1_68.lib
libboost_mpi-vc141-mt-gd-x64-1_68.lib
libboost_numpy27-vc141-mt-gd-x64-1_68.lib
libboost_numpy37-vc141-mt-gd-x64-1_68.lib
libboost_prg_exec_monitor-vc141-mt-gd-x64-1_68.lib
libboost_program_options-vc141-mt-gd-x64-1_68.lib
libboost_python37-vc141-mt-gd-x64-1_68.lib
libboost_python27-vc141-mt-gd-x64-1_68.lib
libboost_random-vc141-mt-gd-x64-1_68.lib
libboost_regex-vc141-mt-gd-x64-1_68.lib
libboost_serialization-vc141-mt-gd-x64-1_68.lib
libboost_signals-vc141-mt-gd-x64-1_68.lib
libboost_system-vc141-mt-gd-x64-1_68.lib
libboost_test_exec_monitor-vc141-mt-gd-x64-1_68.lib
libboost_thread-vc141-mt-gd-x64-1_68.lib
libboost_timer-vc141-mt-gd-x64-1_68.lib
libboost_type_erasure-vc141-mt-gd-x64-1_68.lib
libboost_unit_test_framework-vc141-mt-gd-x64-1_68.lib
libboost_wave-vc141-mt-gd-x64-1_68.lib
libboost_wserialization-vc141-mt-gd-x64-1_68.lib
libboost_zlib-vc141-mt-gd-x64-1_68.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.1-gd.lib
vtkChartsCore-8.1-gd.lib
vtkCommonColor-8.1-gd.lib
vtkCommonComputationalGeometry-8.1-gd.lib
vtkCommonCore-8.1-gd.lib
vtkCommonDataModel-8.1-gd.lib
vtkCommonExecutionModel-8.1-gd.lib
vtkCommonMath-8.1-gd.lib
vtkCommonMisc-8.1-gd.lib
vtkCommonSystem-8.1-gd.lib
vtkCommonTransforms-8.1-gd.lib
vtkDICOMParser-8.1-gd.lib
vtkDomainsChemistry-8.1-gd.lib
vtkexoIIc-8.1-gd.lib
vtkexpat-8.1-gd.lib
vtkFiltersAMR-8.1-gd.lib
vtkFiltersCore-8.1-gd.lib
vtkFiltersExtraction-8.1-gd.lib
vtkFiltersFlowPaths-8.1-gd.lib
vtkFiltersGeneral-8.1-gd.lib
vtkFiltersGeneric-8.1-gd.lib
vtkFiltersGeometry-8.1-gd.lib
vtkFiltersHybrid-8.1-gd.lib
vtkFiltersHyperTree-8.1-gd.lib
vtkFiltersImaging-8.1-gd.lib
vtkFiltersModeling-8.1-gd.lib
vtkFiltersParallel-8.1-gd.lib
vtkFiltersParallelImaging-8.1-gd.lib
vtkFiltersPoints-8.1-gd.lib
vtkFiltersProgrammable-8.1-gd.lib
vtkFiltersSelection-8.1-gd.lib
vtkFiltersSMP-8.1-gd.lib
vtkFiltersSources-8.1-gd.lib
vtkFiltersStatistics-8.1-gd.lib
vtkFiltersTexture-8.1-gd.lib
vtkFiltersTopology-8.1-gd.lib
vtkFiltersVerdict-8.1-gd.lib
vtkfreetype-8.1-gd.lib
vtkGeovisCore-8.1-gd.lib
vtkgl2ps-8.1-gd.lib
vtkhdf5-8.1-gd.lib
vtkhdf5_hl-8.1-gd.lib
vtkImagingColor-8.1-gd.lib
vtkImagingCore-8.1-gd.lib
vtkImagingFourier-8.1-gd.lib
vtkImagingGeneral-8.1-gd.lib
vtkImagingHybrid-8.1-gd.lib
vtkImagingMath-8.1-gd.lib
vtkImagingMorphological-8.1-gd.lib
vtkImagingSources-8.1-gd.lib
vtkImagingStatistics-8.1-gd.lib
vtkImagingStencil-8.1-gd.lib
vtkInfovisCore-8.1-gd.lib
vtkInfovisLayout-8.1-gd.lib
vtkInteractionImage-8.1-gd.lib
vtkInteractionStyle-8.1-gd.lib
vtkInteractionWidgets-8.1-gd.lib
vtkIOAMR-8.1-gd.lib
vtkIOCore-8.1-gd.lib
vtkIOEnSight-8.1-gd.lib
vtkIOExodus-8.1-gd.lib
vtkIOExport-8.1-gd.lib
vtkIOExportOpenGL-8.1-gd.lib
vtkIOGeometry-8.1-gd.lib
vtkIOImage-8.1-gd.lib
vtkIOImport-8.1-gd.lib
vtkIOInfovis-8.1-gd.lib
vtkIOLegacy-8.1-gd.lib
vtkIOLSDyna-8.1-gd.lib
vtkIOMINC-8.1-gd.lib
vtkIOMovie-8.1-gd.lib
vtkIONetCDF-8.1-gd.lib
vtkIOParallel-8.1-gd.lib
vtkIOParallelXML-8.1-gd.lib
vtkIOPLY-8.1-gd.lib
vtkIOSQL-8.1-gd.lib
vtkIOTecplotTable-8.1-gd.lib
vtkIOVideo-8.1-gd.lib
vtkIOXML-8.1-gd.lib
vtkIOXMLParser-8.1-gd.lib
vtkjpeg-8.1-gd.lib
vtkjsoncpp-8.1-gd.lib
vtklibharu-8.1-gd.lib
vtklibxml2-8.1-gd.lib
vtklz4-8.1-gd.lib
vtkmetaio-8.1-gd.lib
vtkNetCDF-8.1-gd.lib
vtkoggtheora-8.1-gd.lib
vtkParallelCore-8.1-gd.lib
vtkpng-8.1-gd.lib
vtkproj4-8.1-gd.lib
vtkRenderingAnnotation-8.1-gd.lib
vtkRenderingContext2D-8.1-gd.lib
vtkRenderingContextOpenGL-8.1-gd.lib
vtkRenderingCore-8.1-gd.lib
vtkRenderingFreeType-8.1-gd.lib
vtkRenderingGL2PS-8.1-gd.lib
vtkRenderingImage-8.1-gd.lib
vtkRenderingLabel-8.1-gd.lib
vtkRenderingLIC-8.1-gd.lib
vtkRenderingLOD-8.1-gd.lib
vtkRenderingOpenGL-8.1-gd.lib
vtkRenderingVolume-8.1-gd.lib
vtkRenderingVolumeOpenGL-8.1-gd.lib
vtksqlite-8.1-gd.lib
vtksys-8.1-gd.lib
vtktiff-8.1-gd.lib
vtkverdict-8.1-gd.lib
vtkViewsContext2D-8.1-gd.lib
vtkViewsCore-8.1-gd.lib
vtkViewsInfovis-8.1-gd.lib
vtkzlib-8.1-gd.lib
opengl32.lib
至于release版本,目前没配置,后续看情况更新
简单测试代码:
#include<pcl/visualization/cloud_viewer.h>
#include<iostream>//标准C++库中的输入输出类相关头文件。
#include<pcl/io/io.h>
#include<pcl/io/pcd_io.h>//pcd 读写类相关的头文件。
#include<pcl/io/ply_io.h>
#include<pcl/point_types.h> //PCL中支持的点类型头文件。
using namespace std;
using namespace pcl;
void viewerOneOff(visualization::PCLVisualizer& viewer) {
viewer.setBackgroundColor(0, 0, 0); //设置背景颜色为黑色
}
int main() {
PointCloud<PointXYZ>::Ptr cloud(new PointCloud<PointXYZ>);
char strfilepath[256] = "rabbit.pcd";
if (-1 == io::loadPCDFile(strfilepath, *cloud)) {
cout << "error input!" << endl;
return -1;
}
cout << cloud->points.size() << endl;
visualization::CloudViewer viewer("Cloud Viewer: Rabbit"); //创建viewer对象
viewer.showCloud(cloud);
viewer.runOnVisualizationThreadOnce(viewerOneOff);
system("pause");
return 0;
}
兔子的PCD文件
链接:https://pan.baidu.com/s/108Wmq4t0Gx9SVLq90Bd1yw
提取码:r8za