安装前先关闭杀毒软件和360卫士,注意安装路径不能有中文,安装包路径也不要有中文。
1.鼠标右击【opencv-for_VS2017】压缩包选择【解压到opencv-for_VS2017】。

2.双击打开解压后的【opencv-for_VS2017】文件夹。

3.鼠标右击【opencv-3.4.6.exe】选择【以管理员身份运行】。

4.点击【···】更改软件的解压路径。

5.选择D盘然后点击【确定】。

6.点击【Extract】。

7.解压中。

8.打开软件解压路径下的【bin】文件夹,解压路径为第5步设置的路径,我这里打开路径为【D:\opencv\build\x64\vc15\bin】。

9.选中地址栏后鼠标右击选择【复制】。

10.右击【此电脑】选择【属性】。

11.点击【高级系统设置】。

12.点击【环境变量】。

13.在系统变量下选择【Path】然后点击【编辑】。

14.点击【新建】。

15.使用快捷键Ctrl+V粘贴,然后点击【确定】。

16.点击【确定】。

17.点击【确定】。

18.双击【Visual Studio 2017】软件图标启动软件。

19.点击【创建新项目】。

20.选择【Windows 控制台应用程序】再输入项目名称【textCV】,然后点击【确定】。

21.点击菜单栏中的【项目】然后选择【属性】。

22.平台中选择【x64】。

23.点击【VC++目录】然后选择【包含目录】。

24.点击下拉菜单,然后点击【编辑】。

25.分别输入【D:\opencv\build\include】、【D:\opencv\build\include\opencv】、【D:\opencv\build\include\opencv2】,然后点击【确定】。

26.选择【链接器】下面的【输入】。

27.选中【附加依赖项】然后点击下拉菜单选择【编辑】。

28.使用快捷键Ctrl+C复制【D:\opencv\build\x64\vc15\lib\*d.lib】并使用快捷键Ctrl+V粘贴到输入框中,然后点击【确定】。

29.点击【确定】。

30.鼠标右击项目选择【在文件资源管理器中打开文件夹】。

31.打开安装包解压后的【opencv-for_VS2017】文件夹,鼠标右击【text.bmp】选择【复制】。

32.在第30步打开的文件夹处鼠标右击空白处选择【粘贴】。

33.双击打开安装包解压后的【opencv-for_VS2017】文件夹里面的【测试代码】文档。

34.使用快捷键Ctrl+A全选所有字符,然后鼠标右击选择【复制】。

35.选择【x64】。

36.使用快捷键Ctrl+A全选程序代码,鼠标右击选择【粘贴】。

37.打开软件解压路径下的【bin】文件夹,解压路径为第5步设置的路径,我这里打开路径为【D:\opencv\build\x64\vc15\bin】。

38.按住Ctrl键不放鼠标左击选中【opencv_ffmpeg346_64.dll】、【opencv_world346.dll】、【opencv_world346d.dll】,然后鼠标右击选择【复制】。

39.打开【System】文件夹,路径为:【C:\Windows\System】。

40.在空白处鼠标右击选择【粘贴】。

41.点击【继续】。

42.点击【本地Windows调试器】。

43.点击【是】。

44.安装完成,软件运行界面如下。
网友评论