1.安装pcl1.14.1
地址:Releases · PointCloudLibrary/pcl (github.com)
下载前两个
下载完成后双击exe文件,修改一下安装路径,然后一路下一步。
OpenNI2 默认安装到C:\Program Files 下了,想修改OpenNI2 的安装路径,可以在\PCL1.14.1\3rdParty\OpenNI2路径下双击如下图的程序,
然后先Remove后,再次双击安装,这个过程中修改安装路径为\PCL1.14.1\3rdParty\OpenNI2即可
解压pcl-1.14.1-pdb-msvc2022-win64.zip,将下图的文件复制到pcl的bin目录下
之后配置环境变量
2.qt 集成pcl
创建一个pcl1.14release.pri文件,内容如下:
INCLUDEPATH += D:\PCL1.14.1\include\pcl-1.14
INCLUDEPATH += D:\PCL1.14.1\3rdParty\Boost\include\boost-1_84
INCLUDEPATH += D:\PCL1.14.1\3rdParty\Eigen3\include\eigen3
INCLUDEPATH += D:\PCL1.14.1\3rdParty\Qhull\include
INCLUDEPATH += D:\PCL1.14.1\3rdParty\VTK\include\vtk-9.3
INCLUDEPATH += D:\PCL1.14.1\3rdParty\OpenNI2\Include
INCLUDEPATH += D:\PCL1.14.1\3rdParty\FLANN\include
CONFIG(release,debug|release){
LIBS += -LD:\PCL1.14.1\lib\
-lpcl_common\
-lpcl_features\
-lpcl_filters\
-lpcl_io\
-lpcl_io_ply\
-lpcl_kdtree\
-lpcl_keypoints\
-lpcl_ml\
-lpcl_octree\
-lpcl_outofcore\
-lpcl_people\
-lpcl_recognition\
-lpcl_registration\
-lpcl_sample_consensus\
-lpcl_search\
-lpcl_segmentation\
-lpcl_stereo\
-lpcl_surface\
-lpcl_tracking\
-lpcl_visualization\
LIBS += -LD:\PCL1.14.1\3rdParty\Boost\lib\
-llibboost_atomic-vc143-mt-x64-1_84\
-llibboost_bzip2-vc143-mt-x64-1_84\
-llibboost_chrono-vc143-mt-x64-1_84\
-llibboost_container-vc143-mt-x64-1_84\
-llibboost_context-vc143-mt-x64-1_84\
-llibboost_contract-vc143-mt-x64-1_84\
-llibboost_coroutine-vc143-mt-x64-1_84\
-llibboost_date_time-vc143-mt-x64-1_84\
-llibboost_exception-vc143-mt-x64-1_84\
-llibboost_fiber-vc143-mt-x64-1_84\
-llibboost_filesystem-vc143-mt-x64-1_84\
-llibboost_graph-vc143-mt-x64-1_84\
-llibboost_graph_parallel-vc143-mt-x64-1_84\
-llibboost_iostreams-vc143-mt-x64-1_84\
-llibboost_json-vc143-mt-x64-1_84\
-llibboost_locale-vc143-mt-x64-1_84\
-llibboost_log-vc143-mt-x64-1_84\
-llibboost_log_setup-vc143-mt-x64-1_84\
-llibboost_math_c99-vc143-mt-x64-1_84\
-llibboost_math_c99f-vc143-mt-x64-1_84\
-llibboost_math_c99l-vc143-mt-x64-1_84\
-llibboost_math_tr1-vc143-mt-x64-1_84\
-llibboost_math_tr1f-vc143-mt-x64-1_84\
-llibboost_math_tr1l-vc143-mt-x64-1_84\
-llibboost_mpi-vc143-mt-x64-1_84\
-llibboost_nowide-vc143-mt-x64-1_84\
-llibboost_numpy310-vc143-mt-x64-1_84\
-llibboost_prg_exec_monitor-vc143-mt-x64-1_84\
-llibboost_program_options-vc143-mt-x64-1_84\
-llibboost_python310-vc143-mt-x64-1_84\
-llibboost_random-vc143-mt-x64-1_84\
-llibboost_regex-vc143-mt-x64-1_84\
-llibboost_serialization-vc143-mt-x64-1_84\
-llibboost_stacktrace_noop-vc143-mt-x64-1_84\
-llibboost_stacktrace_windbg-vc143-mt-x64-1_84\
-llibboost_stacktrace_windbg_cached-vc143-mt-x64-1_84\
-llibboost_system-vc143-mt-x64-1_84\
-llibboost_test_exec_monitor-vc143-mt-x64-1_84\
-llibboost_thread-vc143-mt-x64-1_84\
-llibboost_timer-vc143-mt-x64-1_84\
-llibboost_type_erasure-vc143-mt-x64-1_84\
-llibboost_unit_test_framework-vc143-mt-x64-1_84\
-llibboost_url-vc143-mt-x64-1_84\
-llibboost_wave-vc143-mt-x64-1_84\
-llibboost_wserialization-vc143-mt-x64-1_84\
-llibboost_zlib-vc143-mt-x64-1_84\
LIBS += -LD:\PCL1.14.1\3rdParty\FLANN\lib\
-lflann\
-lflann_cpp\
-lflann_cpp_s\
-lflann_s\
LIBS += -LD:\PCL1.14.1\3rdParty\OpenNI2\Lib\
-lOpenNI2*
LIBS += -LD:\PCL1.14.1\3rdParty\Qhull\lib\
-lqhull_r\
-lqhullcpp\
-lqhullstatic\
-lqhullstatic_r\
LIBS += -LD:\PCL1.14.1\3rdParty\VTK\lib\
-lvtkcgns-9.3\
-lvtkChartsCore-9.3\
-lvtkCommonColor-9.3\
-lvtkCommonComputationalGeometry-9.3\
-lvtkCommonCore-9.3\
-lvtkCommonDataModel-9.3\
-lvtkCommonExecutionModel-9.3\
-lvtkCommonMath-9.3\
-lvtkCommonMisc-9.3\
-lvtkCommonSystem-9.3\
-lvtkCommonTransforms-9.3\
-lvtkDICOMParser-9.3\
-lvtkDomainsChemistry-9.3\
-lvtkDomainsChemistryOpenGL2-9.3\
-lvtkdoubleconversion-9.3\
-lvtkexodusII-9.3\
-lvtkexpat-9.3\
-lvtkFiltersAMR-9.3\
-lvtkFiltersCellGrid-9.3\
-lvtkFiltersCore-9.3\
-lvtkFiltersExtraction-9.3\
-lvtkFiltersFlowPaths-9.3\
-lvtkFiltersGeneral-9.3\
-lvtkFiltersGeneric-9.3\
-lvtkFiltersGeometry-9.3\
-lvtkFiltersGeometryPreview-9.3\
-lvtkFiltersHybrid-9.3\
-lvtkFiltersHyperTree-9.3\
-lvtkFiltersImaging-9.3\
-lvtkFiltersModeling-9.3\
-lvtkFiltersParallel-9.3\
-lvtkFiltersParallelImaging-9.3\
-lvtkFiltersPoints-9.3\
-lvtkFiltersProgrammable-9.3\
-lvtkFiltersReduction-9.3\
-lvtkFiltersSelection-9.3\
-lvtkFiltersSMP-9.3\
-lvtkFiltersSources-9.3\
-lvtkFiltersStatistics-9.3\
-lvtkFiltersTensor-9.3\
-lvtkFiltersTexture-9.3\
-lvtkFiltersTopology-9.3\
-lvtkFiltersVerdict-9.3\
-lvtkfmt-9.3\
-lvtkfreetype-9.3\
-lvtkGeovisCore-9.3\
-lvtkgl2ps-9.3\
-lvtkglew-9.3\
-lvtkhdf5-9.3\
-lvtkhdf5_hl-9.3\
-lvtkImagingColor-9.3\
-lvtkImagingCore-9.3\
-lvtkImagingFourier-9.3\
-lvtkImagingGeneral-9.3\
-lvtkImagingHybrid-9.3\
-lvtkImagingMath-9.3\
-lvtkImagingMorphological-9.3\
-lvtkImagingSources-9.3\
-lvtkImagingStatistics-9.3\
-lvtkImagingStencil-9.3\
-lvtkInfovisCore-9.3\
-lvtkInfovisLayout-9.3\
-lvtkInteractionImage-9.3\
-lvtkInteractionStyle-9.3\
-lvtkInteractionWidgets-9.3\
-lvtkIOAMR-9.3\
-lvtkIOAsynchronous-9.3\
-lvtkIOCellGrid-9.3\
-lvtkIOCesium3DTiles-9.3\
-lvtkIOCGNSReader-9.3\
-lvtkIOChemistry-9.3\
-lvtkIOCityGML-9.3\
-lvtkIOCONVERGECFD-9.3\
-lvtkIOCore-9.3\
-lvtkIOEnSight-9.3\
-lvtkIOExodus-9.3\
-lvtkIOExport-9.3\
-lvtkIOExportGL2PS-9.3\
-lvtkIOExportPDF-9.3\
-lvtkIOFLUENTCFF-9.3\
-lvtkIOGeometry-9.3\
-lvtkIOHDF-9.3\
-lvtkIOImage-9.3\
-lvtkIOImport-9.3\
-lvtkIOInfovis-9.3\
-lvtkIOIOSS-9.3\
-lvtkIOLegacy-9.3\
-lvtkIOLSDyna-9.3\
-lvtkIOMINC-9.3\
-lvtkIOMotionFX-9.3\
-lvtkIOMovie-9.3\
-lvtkIONetCDF-9.3\
-lvtkIOOggTheora-9.3\
-lvtkIOParallel-9.3\
-lvtkIOParallelXML-9.3\
-lvtkIOPLY-9.3\
-lvtkIOSegY-9.3\
-lvtkIOSQL-9.3\
-lvtkioss-9.3\
-lvtkIOTecplotTable-9.3\
-lvtkIOVeraOut-9.3\
-lvtkIOVideo-9.3\
-lvtkIOXML-9.3\
-lvtkIOXMLParser-9.3\
-lvtkjpeg-9.3\
-lvtkjsoncpp-9.3\
-lvtkkissfft-9.3\
-lvtklibharu-9.3\
-lvtklibproj-9.3\
-lvtklibxml2-9.3\
-lvtkloguru-9.3\
-lvtklz4-9.3\
-lvtklzma-9.3\
-lvtkmetaio-9.3\
-lvtknetcdf-9.3\
-lvtkogg-9.3\
-lvtkParallelCore-9.3\
-lvtkParallelDIY-9.3\
-lvtkpng-9.3\
-lvtkpugixml-9.3\
-lvtkRenderingAnnotation-9.3\
-lvtkRenderingCellGrid-9.3\
-lvtkRenderingContext2D-9.3\
-lvtkRenderingContextOpenGL2-9.3\
-lvtkRenderingCore-9.3\
-lvtkRenderingFreeType-9.3\
-lvtkRenderingGL2PSOpenGL2-9.3\
-lvtkRenderingHyperTreeGrid-9.3\
-lvtkRenderingImage-9.3\
-lvtkRenderingLabel-9.3\
-lvtkRenderingLICOpenGL2-9.3\
-lvtkRenderingLOD-9.3\
-lvtkRenderingOpenGL2-9.3\
-lvtkRenderingSceneGraph-9.3\
-lvtkRenderingUI-9.3\
-lvtkRenderingVolume-9.3\
-lvtkRenderingVolumeOpenGL2-9.3\
-lvtkRenderingVtkJS-9.3\
-lvtksqlite-9.3\
-lvtksys-9.3\
-lvtkTestingRendering-9.3\
-lvtktheora-9.3\
-lvtktiff-9.3\
-lvtkverdict-9.3\
-lvtkViewsContext2D-9.3\
-lvtkViewsCore-9.3\
-lvtkViewsInfovis-9.3\
-lvtkWrappingTools-9.3\
-lvtkzlib-9.3\
}
pcl安装路径修改为自己的,之后在pro文件引入pri文件即可
include ($$PWD/PCL/pcl1.14release.pri)