windows系统下 Vs Code 配置OpenCV

一.  依赖文件的安装

        Vs Code 与Visual Studio 两个程序各有千秋,配置OpenCv 的方式也就不一样了。

        本文以 Vs Code 为主,前期准备工作要准备好:

                · Cmake 下载 官网如下:

CMake - Upgrade Your Software Build System

                · MinGw 下载官网如下:

MinGW-w64 - for 32 and 64 bit Windows - Browse Files at SourceForge.net

                · Vs Code 下载以及C++的配置,根据自己的系统选择,Vs Code 官网如下:

Visual Studio Code - Code Editing. Redefined

                · Opencv下载,版本更新迭代很快,选择你喜欢的版本(根据你的电脑系统)下载,官网如下:

OpenCV - Open Computer Vision Library

二.  Cmake编译

        code无法直接使用opencv,需要把opencv的源文件进行编译,然后才能使用,这里借助CMake 编译

2-1. cmake需要注意的是

Where is the source code : 源码目录,我们使用opencv目录下的source=目录

Where to build the binaries : 最终输出构建的目录 放到opencv/build/x64/mingw

          

 2-2. 点击Configure

Specify 他和generator for this project :指定此项目的生成器

Optional platform for generator(if empty,generator uses: x64): 生成器的可选平台(空,使用x64)

Optional toolset to use (argument to -T): 要使用的可选工具集

Use default native compilers : 使用默认编译

Specify native compilers: 指定本机编译

Specity toolchain file for cross-compiling :指定用于交编译的工具链文件

Specify options for cross-compiling: 指定交互编译的选项

2-3. 选择MinGw Makefile ,点击next

2-4. 选

  • 32
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值