Opencv在Visual Studio 2019中配置

VS 2019安装及配置opencv VS 2019安装及配置 阅读详情

文章目录

  • 前言
  • 一、 opencv的下载与安装
  • 二、系统环境变量配置
  • 三、在VS2019中进行配置
  • 四、测试程序


前言

在我们的语言学习过程中,会慢慢接触到很多实用的第三方类库。之前我们接触过Easyx这个库,通过简单的安装即可使用。当我们接触到opencv时,没有了安装界面。当我们下载好之后,调用头文件时又一直报错,不知道怎么解决,真的十分令人头秃。
在这里,我们以VS2019 为例,对opencv进行配置。本人在学习配置过程中参考文章CSDN博客:《VS2017配置opencv教程(超详细!!!)》。地址如下:https://blog.csdn.net/qq_41175905/article/details/80560429。


一、 opencv的下载与安装

opencv为开源类库,可以直接在官网下载。网址:https://opencv.org/

  1. 点击进入官网后,点击上方library,点击release,选择适合自己的版本。我以Windows系统为例,进行配置。
    下载界面
  2. 选择Windows版本,开始下载。目前最新版本为4.5.2,该版本号在配置过程中会用到。
  3. 下载完成后进行安装,开始界面为选择安装路径,一定要选一个自己能找到的路径!!!
  4. 安装完成后,就可以开始配置了。

二、系统环境变量配置

  1. 此电脑-右键-高级系统设置-环境变量
  2. 找到系统变量中的Path变量,双击,新建。此时需要opencv的安装路径。我直接将opencv安装到了D盘下。对
VS2019 OpenCV安装与配置教程 阅读详情

相关推荐

Windows10 + Visual Studio 2019 + OpenCV4.1.0 配置详解(亲测可用)

Visual Studio 2019 + OpenCV4.1.0 的安装 首先,在Visual Studio 2019 和 OpenCV4.1.0 官网下载两个软件,并按照安装流程进行安装,这里就不赘述了。比如我这里,就将两个软件安装到了D盘的同一个文件夹下。 1、Windows10 系统环境配置 用鼠标右键单击屏幕左下角“开始”按钮,选择【运行】命令,在弹出对话框中输入“control”命令,...

qq_24912401的博客 1万+

OpenCV:visual Studio 2019 配置成功后在新建项目中如何调用OpenCV库

一、编译环境 使用语言:C++ 操作系统:Windows10 编译器:Visual Studio 2019 OpenCV版本:OpenCV4.1.0 二、操作步骤 1)新建项目及原文件 这个过程大家肯定都会,这里就不赘述了。 当前界面如下图: 2)打开属性管理器 视图 --> 其他窗口 --> 属性管理器 3)修改解决方案平台 将图中的位置改为x64,这个很重要,不然程序运行...

Nire_Yeyu的博客 5413

使用Visual Studio 2019配置OpenCV

在使用OpenCV进行编程时,合适的开发环境和工具是非常重要的。本文将指导您如何在Visual Studio 2019中配置OpenCV,并提供相应的源代码示例。记得根据您的具体需求包含适当的OpenCV头文件,并链接相应的库文件。在弹出的窗口中,选择“VC++目录”,然后在“包含目录”一栏中添加OpenCV的include文件夹路径。接下来,在“库目录”一栏中添加OpenCV的lib文件夹路径。打开Visual Studio 2019,选择“创建新项目”>“Visual C++”>“空项目”。

TechRoar的博客 747

配置Visual Studio 2019进行OpenCV编程

然后,您可以编写和运行示例代码来验证您的设置,并开始开发自己的应用程序。在项目模板中,选择“Visual C++”类别,并选择“空项目”。请注意,上述路径假设您安装了64位版本的OpenCV,并且使用的是Visual Studio 2019的vc15工具集。在属性对话框中,选择“VC++目录”选项,并在“包含目录”字段中添加OpenCV的包含目录。选择与您的系统和Visual Studio 2019版本兼容的版本,并下载安装程序。在Visual Studio中,右键单击您创建的项目,并选择“属性”选项。

git_web425的博客 156

Visual Studio 2019与OpenCV的安装与配置教程

例如,如果您将OpenCV库文件放在"C:\opencv"目录中,那么您需要添加"C:\opencv\include"目录。在编写和调试OpenCV应用程序时,您需要确保将OpenCV库文件(例如"opencv_worldxxx.dll")复制到您的应用程序的可执行文件所在的目录中。例如,如果您将OpenCV库文件放在"C:\opencv"目录中,那么您需要添加"C:\opencv\lib"目录。例如,如果您下载的是OpenCV 4.5.2版本,那么您需要添加"opencv_world452.lib"。

VvcyBug的博客 361

基于FPGA 外置qspi Flash的读写

fpga上实现flash读写代码

weixin_43498765的博客 4962

避坑指南:在Ubuntu 22.04上配置UR5e与ROS2 Humble真机通信的完整流程

本文详细介绍了在Ubuntu 22.04上配置UR5e机械臂与ROS2 Humble真机通信的完整流程,包括环境准备、网络配置、URCap安装、ROS2驱动部署及控制器状态验证等关键步骤。特别针对常见问题如网络连接失败、驱动启动错误等提供了实用解决方案,帮助工程师高效完成UR5e与ROS2的集成工作。

weixin_30790841的博客 467

LangFuse部署与实践

LangFuse的原理主要是基于可观察性和分析技术来监控和优化低延迟消息(LLM)应用。它提供了一套完整的解决方案,通过收集、处理和分析LLM应用在运行过程中产生的各种数据,来生成实时的、深入的、可操作的见解。通过提供实时的、深入的见解和可视化的跟踪功能,LangFuse使得识别和解决应用性能问题变得更加简单和高效。总的来说,LangFuse的原理是通过综合运用可观察性和分析技术,来提供对LLM应用的全面监控和优化能力。这使得开发者和运维团队能够更加高效地管理和维护他们的应用,从而提升用户体验和业务效益。

pumpkin84514的博客 7956

Cadence仿真数字电路功耗

Cadence仿真数字电路功耗 数字电路的功耗采用平均电流乘电源电压获得,所以本文的关键是测量平均电流。 仿真前设置好仿真参数后,在仿真的ADE街边选择:outputs➡to be saved➡select on design 选择电源的负端电流(若选择正端,则电流为负): 选择完成后,在ADE界面讲所选节点的plot也勾选上,点击run。仿真完成后自动显示波形。在波形上选中该电流曲线,右击选择:send to➡calculator 注意上图中,商店前的波形不稳定,需要进行截取。在calculator

qq_41519780的博客 1万+

LPC2124定时器实现跑马灯

文章目录一、keil 4新建工程 一、keil 4新建工程 1、Create New Project,注意,最好添加进一个新建好的文件夹里,keil不会帮你新建。 2、添加设备类型:NXP目录下的LPC2124 3、选择启动文件Startu.s 4、new 一个file,保存命名为.c文件 5、添加进project里,右击,add 选中,添加 6、设置编译输出.hex文件 ...

qq_37937830的博客 5753

【AI编程】Cursor编程工具使用教程:下载、配置、使用、运行Java项目

【AI编程】Cursor编程工具使用教程:下载、配置、使用、运行Java项目

funfan的博客 5199

Codex 100个真实案例 - 用AI做英语单词计划学习工具(记忆曲线+测验)

背单词是英语学习的基本功,但市面上的背单词 APP 要么收费、要么广告太多。本案例用 Codex 从零打造一个 **英语单词计划学习工具**,实现 SM-2 间隔重复算法(Anki 的核心算法)、单词本增删改查、多种测验模式(选择题/拼写/听写)、TTS 发音播放,以及学习数据的可视化统计图表。全程用自然语言驱动 Codex,用 Python 写后端逻辑 + 终端 UI,打造你的私人背单词助手!

yueyeguzhuo的专栏 221

C#客户端对接工厂MES的方法

本文介绍了使用C#实现WebApi客户端与工厂MES系统交互的方法。主要包括四个步骤:1)配置工控机IP地址;2)获取服务器URL;3)创建HttpHelper帮助类实现单例模式HttpClient,提供异步POST请求方法;4)通过实例化帮助类实现设备状态数据的JSON格式发送与接收。该方案采用异步通信方式,支持超时处理,能够满足大多数MES系统交互需求,帮助工程师快速完成设备与MES系统的数据对接。文中给出了核心代码片段和完整的数据交互流程示例。

weixin_39832501的博客 269

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

下一篇: HPL及HPCG测试
Irascible_Penguin
博客等级 码龄6年 1粉丝 2原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址