PCL.1在QT中显示点云

经过讨论终于知道是要干什么了:利用视差图生成点云

参考链接:由双目立体视差图重建三维点云【Win10+OpenCV3.4.1+PCL1.8】_$南山种豆$的博客-CSDN博客_视差图重建三维点云

视差图片:

在QT中显示点云需要编译VTK获得dll

参考:blog.csdn.net/qq_27916741/article/details/79949986

cmake:Download | CMake

vtk8.0:https://gitlab.kitware.com/vtk/vtk/-/archive/v8.0.0/vtk-v8.0.0.zip

编译过程参考:VTK8.1 在 Qt5.9 环境下的配置、编译和安装_jepco1的博客-CSDN博客_qt vtk部分

PCL.1在QT中显示点云_第1张图片注意版本选择在下面,如果不填的话默认是win32

PCL.1在QT中显示点云_第2张图片

取消勾选document,更改install目录,勾选QT ,更改Qt路径为msvc的

PCL.1在QT中显示点云_第3张图片

PCL.1在QT中显示点云_第4张图片

PCL.1在QT中显示点云_第5张图片

PCL.1在QT中显示点云_第6张图片

生成两个版本ALLBUILD以及INSTALL

这个地方绝对是血与泪的教训,大把的时间刷刷地没了!!!!!!!

生成debug版本的ALLBUILD和INSTALL后,把输出的install文件夹改名install-debug,新建一个install(空的)

然后在vs2015调整为release模式重新生成,再将install改名为install-release

如果不改的话,debug和release的生成同用一个目录,也就是说一个版本会直接覆盖另一个。

【谁能想到cmake编译生成的dll、lib都一个名字】

用于后续的目录 和 库的关联使用

将QTVTK*****.dll拷入qt目录下

注意在Qt5中改一下头文件  【更多解决办法:PCL1.8+Qt5+VS2013可视化点云_大作家佚名的博客-CSDN博客】

#include 

配置库目录:

../3rdparty/PCL1.8.1/lib;../3rdparty/PCL1.8.1/3rdParty/Boost/lib;../3rdparty/PCL1.8.1/3rdParty/FLANN/lib;../3rdparty/PCL1.8.1/3rdParty/Qhull/lib;../3rdparty/PCL1.8.1/3rdParty/VTK-debug/lib;../3rdparty/PCL1.8.1/3rdParty/OpenNI2/Lib;

生成的文件拷入VTK-debug/lib和 VTK-release/lib,两者都是相同的名字。。

vtkIOEnSight-8.0.lib
vtkRenderingCore-8.0.lib
vtkChartsCore-8.0.lib
vtkIOExodus-8.0.lib
vtkRenderingFreeType-8.0.lib
vtkCommonColor-8.0.lib
vtkIOExport-8.0.lib
vtkRenderingGL2PSOpenGL2-8.0.lib
vtkCommonComputationalGeometry-8.0.lib
vtkIOExportOpenGL2-8.0.lib
vtkRenderingImage-8.0.lib
vtkCommonCore-8.0.lib
vtkIOGeometry-8.0.lib
vtkRenderingLOD-8.0.lib
vtkCommonDataModel-8.0.lib
vtkIOImage-8.0.lib
vtkRenderingLabel-8.0.lib
vtkCommonExecutionModel-8.0.lib
vtkIOImport-8.0.lib
vtkRenderingOpenGL2-8.0.lib
vtkCommonMath-8.0.lib
vtkIOInfovis-8.0.lib
vtkRenderingQt-8.0.lib
vtkCommonMisc-8.0.lib
vtkIOLSDyna-8.0.lib
vtkRenderingVolume-8.0.lib
vtkCommonSystem-8.0.lib
vtkIOLegacy-8.0.lib
vtkRenderingVolumeOpenGL2-8.0.lib
vtkCommonTransforms-8.0.lib
vtkIOMINC-8.0.lib
vtkTestingGenericBridge-8.0.lib
vtkDICOMParser-8.0.lib
vtkIOMovie-8.0.lib
vtkTestingIOSQL-8.0.lib
vtkDomainsChemistry-8.0.lib
vtkIONetCDF-8.0.lib
vtkTestingRendering-8.0.lib
vtkDomainsChemistryOpenGL2-8.0.lib
vtkIOPLY-8.0.lib
vtkViewsContext2D-8.0.lib
vtkFiltersAMR-8.0.lib
vtkIOParallel-8.0.lib
vtkViewsCore-8.0.lib
vtkFiltersCore-8.0.lib
vtkIOParallelXML-8.0.lib
vtkViewsInfovis-8.0.lib
vtkFiltersExtraction-8.0.lib
vtkIOSQL-8.0.lib
vtkViewsQt-8.0.lib
vtkFiltersFlowPaths-8.0.lib
vtkIOTecplotTable-8.0.lib
vtkalglib-8.0.lib
vtkFiltersGeneral-8.0.lib
vtkIOVideo-8.0.lib
vtkexoIIc-8.0.lib
vtkFiltersGeneric-8.0.lib
vtkIOXML-8.0.lib
vtkexpat-8.0.lib
vtkFiltersGeometry-8.0.lib
vtkIOXMLParser-8.0.lib
vtkfreetype-8.0.lib
vtkFiltersHybrid-8.0.lib
vtkImagingColor-8.0.lib
vtkgl2ps-8.0.lib
vtkFiltersHyperTree-8.0.lib
vtkImagingCore-8.0.lib
vtkglew-8.0.lib
vtkFiltersImaging-8.0.lib
vtkImagingFourier-8.0.lib
vtkhdf5-8.0.lib
vtkFiltersModeling-8.0.lib 
vtkImagingGeneral-8.0.lib
vtkhdf5_hl-8.0.lib
vtkFiltersParallel-8.0.lib              
vtkImagingHybrid-8.0.lib            
vtkjpeg-8.0.lib
vtkFiltersParallelImaging-8.0.lib       
vtkImagingMath-8.0.lib              
vtkjsoncpp-8.0.lib
vtkFiltersPoints-8.0.lib                
vtkImagingMorphological-8.0.lib     
vtklibharu-8.0.lib
vtkFiltersProgrammable-8.0.lib          
vtkImagingSources-8.0.lib           
vtklibxml2-8.0.lib
vtkFiltersSMP-8.0.lib                   
vtkImagingStatistics-8.0.lib        
vtklz4-8.0.lib
vtkFiltersSelection-8.0.lib             
vtkImagingStencil-8.0.lib           
vtkmetaio-8.0.lib
vtkFiltersSources-8.0.lib               
vtkInfovisCore-8.0.lib              
vtknetcdf_c++.lib
vtkFiltersStatistics-8.0.lib            
vtkInfovisLayout-8.0.lib            
vtkoggtheora-8.0.lib
vtkFiltersTexture-8.0.lib               
vtkInteractionImage-8.0.lib         
vtkpng-8.0.lib
vtkFiltersTopology-8.0.lib              
vtkInteractionStyle-8.0.lib         
vtkproj4-8.0.lib
vtkFiltersVerdict-8.0.lib               
vtkInteractionWidgets-8.0.lib       
vtksqlite-8.0.lib
vtkGUISupportQt-8.0.lib                 
vtkNetCDF-8.0.lib                   
vtksys-8.0.lib
vtkGUISupportQtSQL-8.0.lib              
vtkParallelCore-8.0.lib             
vtktiff-8.0.lib
vtkGeovisCore-8.0.lib                   
vtkRenderingAnnotation-8.0.lib      
vtkverdict-8.0.lib
vtkIOAMR-8.0.lib                        
vtkRenderingContext2D-8.0.lib       
vtkzlib-8.0.lib
vtkIOCore-8.0.lib                       
vtkRenderingContextOpenGL2-8.0.lib

同理,编译完成后也要注意分目录进行dll的拷入

操作参考:在新建的Qt项目中添加显示点云的部件_JustNow_Man的博客-CSDN博客_qt显示点云

你可能感兴趣的:(#工具使用,cv相关草稿,学习笔记,qt,开发语言)