前言
1、刚开始接触opencv,不知路在何方
2、本文的配置参考了大量其他博主,文章中都有链接标注
3、详细配置过程无,不过文档中也有很多有趣的地方
4、配置环境后完成的东西:目标检测(dnn);目标分割(mask rcnn);双目视觉
很重要 本文的坑 一定要看
我的文章中是vs2015 ,所以在配置pcl和vtk的时候版本号与文章中有出入,版本不对真的会错,真的会错
搭配:
vs2015+pcl1.8.1+vtk8.0
vs2017+pcl1.8.1+vtk8.0
vs2017+pcl1.9.1+vtk8.1
VS上openCV 4.1.1 配置
官网:https://opencv.org/releases/
https://www.cnblogs.com/aiguona/p/9370433.html
http://www.imooc.com/article/287720
测试:ok
opencv在vs2015中配置相对路径
参考:https://blog.csdn.net/u011499425/article/details/52458646
将需要用到的include 和lib文件夹放在项目目录下
配置release所需要的lib文件
如果想在别人电脑的vs环境下运行exe程序(即调试->开始执行),此时若exe程序的debug目录下没有添加相应的dll,可按下图配置去设置环境变量
SVN使用(合作开发)
QT安装配置与使用
安装以及配置windbg:
https://www.cnblogs.com/aiguona/p/9860742.html
git
…or create a new repository on the command line
echo "# AI" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/Du-Sen-Lin/AI.git
git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/Du-Sen-Lin/AI.git
git push -u origin master
easy
git clone ...
放在文件夹里面
git add 文件名/
git commit -m ' 描述'
git push
下载git上单个文件夹或文件:SVNcheckout /tree/…/变为trunk
https://blog.csdn.net/sunqiande88/article/details/80282913
版本回退
git log //穿梭前,用git log可以查看提交历史,以便确定要回退到哪个版本。
git reflog //重返未来,用git reflog查看命令历史,以便确定要回到未来的哪个版本。
git reset --hard commit_id //HEAD指向的版本就是当前版本,因此,Git允许我们在版本的历史之间穿梭,使用命令git reset --hard commit_id
常用命令
opencv:
https://github.com/zilongzhong/opencv
VS2017+Qt5.12.0+PCL1.9.1开发环境配置过程
可参考:
https://blog.csdn.net/xiaolong361/article/details/89361561
PCL1.9.1安装:
可参考:
https://blog.csdn.net/qq_34784753/article/details/77484414
https://blog.csdn.net/u011197534/article/details/52960394
下载地址:https://github.com/PointCloudLibrary/pcl/releases
.在安装PCL一键安装包时,勾选上Add PCL to system PATH for all users
.在安装过程中,OpenNI2在安装时会弹出界面,安装在你安装PCL的文件夹PCL 1.8.0\3rdParty\OpenNI2下,例如本文是选择目录E:\PCL\pcl\PCL 1.9.1\3rdParty\OpenNI2;之后就点下一步或安装就行了。
跳出这个(不知是否有影响)
配置环境变量:
已有
path里面手工添加
安装VTK为其添加Qt支持
1.下载对应版本的VTK源码
https://gitlab.kitware.com/vtk/vtk/tree/v8.1.0
2.下载安装Cmake
3.利用CMake生成VS工程
(1)CMake里面设置
(2)在VS中编译VTK
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 MSB6006 “cmd.exe”已退出,代码为 1。 VTKData C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets 171
(找不到解决办法 不管 去看相关文件基本已经生成了
vs2015 pcl上配置:
release:
https://www.cnblogs.com/yibeimingyue/p/10927477.html
包含目录:
库目录:
附加依赖项:
opencv_world411.lib
qtmain.lib
Qt5Core.lib
Qt5Gui.lib
Qt5Widgets.lib
QVTKWidgetPlugin.lib
libboost_thread-vc140-mt-1_64.lib
pcl_common_release.lib
pcl_features_release.lib
pcl_filters_release.lib
pcl_io_release.lib
pcl_io_ply_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
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
vtkDomainsChemistry-8.0.lib
vtkDICOMParser-8.0.lib
vtkexoIIc-8.0.lib
vtkexpat-8.0.lib
vtkFiltersAMR-8.0.lib
vtkFiltersExtraction-8.0.lib
vtkFiltersCore-8.0.lib
vtkFiltersGeneral-8.0.lib
vtkFiltersFlowPaths-8.0.lib
vtkFiltersGeneric-8.0.lib
vtkFiltersGeometry-8.0.lib
vtkFiltersHybrid-8.0.lib
vtkFiltersImaging-8.0.lib
vtkFiltersHyperTree-8.0.lib
vtkFiltersModeling-8.0.lib
vtkFiltersParallel-8.0.lib
vtkFiltersParallelImaging-8.0.lib
vtkFiltersSelection-8.0.lib
vtkFiltersProgrammable-8.0.lib
vtkFiltersSources-8.0.lib
vtkFiltersTexture-8.0.lib
vtkFiltersStatistics-8.0.lib
vtkFiltersVerdict-8.0.lib
vtkfreetype-8.0.lib
vtkGeovisCore-8.0.lib
vtkgl2ps-8.0.lib
vtkhdf5_hl-8.0.lib
vtkhdf5-8.0.lib
vtkImagingColor-8.0.lib
vtkImagingCore-8.0.lib
vtkImagingFourier-8.0.lib
vtkImagingSources-8.0.lib
vtkImagingGeneral-8.0.lib
vtkImagingHybrid-8.0.lib
vtkImagingMath-8.0.lib
vtkImagingMorphological-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
vtkIOExodus-8.0.lib
vtkIOEnSight-8.0.lib
vtkIOExport-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
vtkIOPLY-8.0.lib
vtkIOSQL-8.0.lib
vtkIOVideo-8.0.lib
vtkIOXML-8.0.lib
vtkIOXMLParser-8.0.lib
vtkjpeg-8.0.lib
vtkjsoncpp-8.0.lib
vtklibxml2-8.0.lib
vtkmetaio-8.0.lib
vtkNetCDF-8.0.lib
vtkoggtheora-8.0.lib
vtkParallelCore-8.0.lib
vtkpng-8.0.lib
vtkRenderingOpenGL2-8.0.lib
vtkproj4-8.0.lib
vtkRenderingAnnotation-8.0.lib
vtkRenderingContext2D-8.0.lib
vtkRenderingCore-8.0.lib
vtkRenderingFreeType-8.0.lib
vtkRenderingGL2PSOpenGL2-8.0.lib
vtkRenderingImage-8.0.lib
vtkRenderingLabel-8.0.lib
vtkRenderingLOD-8.0.lib
vtkRenderingVolume-8.0.lib
vtkRenderingVolumeOpenGL2-8.0.lib
vtksqlite-8.0.lib
vtksys-8.0.lib
vtktiff-8.0.lib
vtkverdict-8.0.lib
vtkViewsCore-8.0.lib
vtkViewsContext2D-8.0.lib
vtkViewsInfovis-8.0.lib
vtkzlib-8.0.lib
vtkGUISupportQtSQL-8.0.lib
vtkIOParallelXML-8.0.lib
vtkViewsQt-8.0.lib
vtkRenderingQt-8.0.lib
vtkGUISupportQt-8.0.lib
·
debug:
https://blog.csdn.net/BBHHTT/article/details/81156437
https://blog.csdn.net/uniqueyyc/article/details/79245009
https://www.cnblogs.com/weiyouqing/p/8046387.html
包含目录:
库目录:
附加依赖项:
opencv_world411d.lib
qtmaind.lib
Qt5Cored.lib
Qt5Guid.lib
Qt5Widgetsd.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
QVTKWidgetPlugin.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
vtkDomainsChemistry-8.0.lib
vtkDICOMParser-8.0.lib
vtkexoIIc-8.0.lib
vtkexpat-8.0.lib
vtkFiltersAMR-8.0.lib
vtkFiltersExtraction-8.0.lib
vtkFiltersCore-8.0.lib
vtkFiltersGeneral-8.0.lib
vtkFiltersFlowPaths-8.0.lib
vtkFiltersGeneric-8.0.lib
vtkFiltersGeometry-8.0.lib
vtkFiltersHybrid-8.0.lib
vtkFiltersImaging-8.0.lib
vtkFiltersHyperTree-8.0.lib
vtkFiltersModeling-8.0.lib
vtkFiltersParallel-8.0.lib
vtkFiltersParallelImaging-8.0.lib
vtkFiltersSelection-8.0.lib
vtkFiltersProgrammable-8.0.lib
vtkFiltersSources-8.0.lib
vtkFiltersTexture-8.0.lib
vtkFiltersStatistics-8.0.lib
vtkFiltersVerdict-8.0.lib
vtkfreetype-8.0.lib
vtkGeovisCore-8.0.lib
vtkgl2ps-8.0.lib
vtkhdf5_hl-8.0.lib
vtkhdf5-8.0.lib
vtkImagingColor-8.0.lib
vtkImagingCore-8.0.lib
vtkImagingFourier-8.0.lib
vtkImagingSources-8.0.lib
vtkImagingGeneral-8.0.lib
vtkImagingHybrid-8.0.lib
vtkImagingMath-8.0.lib
vtkImagingMorphological-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
vtkIOExodus-8.0.lib
vtkIOEnSight-8.0.lib
vtkIOExport-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
vtkIOPLY-8.0.lib
vtkIOSQL-8.0.lib
vtkIOVideo-8.0.lib
vtkIOXML-8.0.lib
vtkIOXMLParser-8.0.lib
vtkjpeg-8.0.lib
vtkjsoncpp-8.0.lib
vtklibxml2-8.0.lib
vtkmetaio-8.0.lib
vtkNetCDF-8.0.lib
vtkoggtheora-8.0.lib
vtkParallelCore-8.0.lib
vtkpng-8.0.lib
vtkRenderingOpenGL2-8.0.lib
vtkproj4-8.0.lib
vtkRenderingAnnotation-8.0.lib
vtkRenderingContext2D-8.0.lib
vtkRenderingCore-8.0.lib
vtkRenderingFreeType-8.0.lib
vtkRenderingGL2PSOpenGL2-8.0.lib
vtkRenderingImage-8.0.lib
vtkRenderingLabel-8.0.lib
vtkRenderingLOD-8.0.lib
vtkRenderingVolume-8.0.lib
vtkRenderingVolumeOpenGL2-8.0.lib
vtksqlite-8.0.lib
vtksys-8.0.lib
vtktiff-8.0.lib
vtkverdict-8.0.lib
vtkViewsCore-8.0.lib
vtkViewsContext2D-8.0.lib
vtkViewsInfovis-8.0.lib
vtkzlib-8.0.lib
vtkGUISupportQtSQL-8.0.lib
vtkIOParallelXML-8.0.lib
vtkViewsQt-8.0.lib
vtkRenderingQt-8.0.lib
vtkGUISupportQt-8.0.lib
参考已完成项目
最后release下配置相对路径,提交作业:
jetbot启动测试
https://github.com/NVIDIA-AI-IOT/jetbot/wiki
https://github.com/NVIDIA-AI-IOT/jetbot/wiki/examples
基本运动
前后左右方向调整
避免碰撞
https://github.com/NVIDIA-AI-IOT/jetbot/tree/master/notebooks/collision_avoidance
1、在jetbot上收集数据;
2、训练神经网络;(travel_model.ipynb)
3、运行实时演示(下载已有模型best_model.ipynb直接跳过2)
对象跟随
预先训练好的ssd_mobilenet_v2_coco.engine模型上传到此文件夹