cpython编译源代码后删除源代码_Visual Studio + OpenCV + OpenCV_contrib 源代码编译流程...

编写日期:2021年1月13日

目录

一、 概述

1. 运行平台

2. 什么是OpenCV_contrib?

二、 下载和安装OpenCV和OpenCV_contrib

1. 下载OpenCV和OpenCV_contrib的源代码

2. 使用CMake编译包含contrib模块的OpenCV

3. 使用Visual Studio完成编译并安装OpenCV

4. 配置环境变量

三、 新建测试工程

四、 参考


一、 概述

1. 运行平台

Visual Studio 2019,包含Visual C++ 16

OpenCV 4.5.1

目前最新的OpenCV_contrib

2. 什么是OpenCV_contrib?

OpenCV分为两大模块:OpenCV和OpenCV_contrib。

以下是【opencv_contrib】项目的官方GitHub页面上的介绍:

This repository is intended for the development of so-called "extra" modules, contributed functionality. New modules quite often do not have stable API, and they are not well-tested. Thus, they shouldn't be released as a part of official OpenCV distribution, since the library maintains binary compatibility, and tries to provide decent performance and stability.
So, all the new modules should be developed separately, and published in the opencv_contrib repository at first. Later, when the module matures and gains popularity, it is moved to the central OpenCV repository, and the development team provides production-quality support for this module.

OpenCV为了保证项目的整体软件质量,将一些较新的,稳定性尚还有所不足的模块不并入OpenCV主工程,而是单独设立一个独立的【opencv_contrib】库供有需要的人使用。

在OpenCV官网下载的用于傻瓜式安装的.exe自解压文件不包含opencv_contrib库中的内容。如果需要使用OpenCV_contrib当中的功能,就必须分别下载OpenCV和OpenCV_contrib的源代码,再通过CMake进行源代码编译。

二、 下载和安装OpenCV和OpenCV_contrib

1. 下载OpenCV和OpenCV_contrib的源代码

这里使用的是OpenCV 4.5.1:https://opencv.org/releases/

(注:当然也可以从OpenCV的GitHub页面下载最新的源代码,不过并不推荐这样做)

OpenCV_contrib:https://github.com/opencv/opencv_contrib

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值