当前位置:网站首页>Opencvshare4 and vs2019 configuration
Opencvshare4 and vs2019 configuration
2022-06-13 02:26:00 【An unforgettable squirrel】
0 、 Preface
What I have been studying before is opencvSharp3 and vs2015, But there is not much information on the Internet . Find information today , I found that a man used opencvSharp4 and vs2019, It seems that the process inside is the same as the original opencv2 The more similar . I'm fed up with trying to collect all kinds of variable types , Decided to turn sharp4; But in my original vs2015 above ,sharp4 It can not be used normally , Decide to uninstall 15, loading 19.
1 、vs2015 uninstall
The computer has been reinstalled several times ,vs2015 You can't uninstall directly for a long time , Deleting the installation directory directly will obviously leave more garbage . I found a software on the Internet :
VisualStdioUninstaler
Successfully completed the unloading work . It should be noted that , The software needs to be opened by administrator ; You may fake death during operation , Reopening after closing can speed up unloading .( You also need to manually delete the installation directory )
( This software is specially uninstalled vs2013 and 2015 Of , On my computer vs2010 Although the opening is abnormal , But it can still be used normally )
2、vs2019 install
Found one vs2019 Offline installation package for , Taobao sold a temporary online disk account , download .
install , Considering my poor computer space , Only installed 【.net Desktop development 】, As follows :

Found in use ,.net Desktop development is traditional WPF; And general Windows Platform development should correspond to winform. in fact , My previous code is mainly based on winform Of , Simple use of discovery , In fact, there is little difference between the main concepts . But in terms of volume ,.net Volume 5G, General purpose Windows Platform volume 15G+, It is meaningful to learn something new .
3、 The first of cv project
(1) establish WPF application

(2) Interface design and response function
From assets - Control One of them Button To the interface , take xaml In file Content="Button" It is amended as follows Content=" Open the picture "
Check button , Click the lightning symbol on the right :

stay Click Double click the function , Generate response function
private void Button1_Click(object sender, RoutedEventArgs e)
{
}
Add a simple test function , Add the following :
private void Button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Hello");
Console.WriteLine("Hello");
}
Run the test , It is found that the original debugging skills can still be used , Happy .
(3)opencvSharp4 add to
First you need to use NuGet Add reference

Enter... In the browse column opencvSharp4 , install opencvSharp4 and OpencvSharp4.runtime.win

Add a reference to the top of the source code
using OpenCvSharp;
Modify the key response function
Mat img = Cv2.ImRead("y.png");
Cv2.ImShow("y.png",img);
among y.png I have put it in advance debug Under the table of contents . The operation interface is as follows :

(4) The system generates directories
Don't add opencv Under the circumstances ,debug The catalog file is as follows (y.png Put the picture in advance for me ):

add to opencv after debug The catalog file is as follows :

complete .
边栏推荐
- Chapter7-11_ Deep Learning for Question Answering (2/2)
- Armv8-m (Cortex-M) TrustZone summary and introduction
- 04路由跳转并携带参数
- [work with notes] NDK compiles the open source library ffmpeg
- Resource arrangement
- Leetcode 473. Match to square [violence + pruning]
- Leetcode 450. Delete node in binary search tree [binary search tree]
- [Dest0g3 520迎新赛] 拿到WP还整了很久的Dest0g3_heap
- [51nod.3210] binary Statistics (bit operation)
- Think: when do I need to disable mmu/i-cache/d-cache?
猜你喜欢

01 初识微信小程序

Thesis reading - autovc: zero shot voice style transfer with only autoencoder loss

在IDEA使用C3P0连接池连接SQL数据库后却不能显示数据库内容

Jump model between mirrors

Armv8-m learning notes - getting started

Huawei equipment is configured with IP and virtual private network hybrid FRR

02 优化微信开发者工具默认的结构

Is space time attention all you need for video understanding?

Basic principle of bilateral filtering

Huffman tree and its application
随机推荐
Huawei equipment is configured with dual reflectors to optimize the backbone layer of the virtual private network
Laravel 权限导出
Armv8-m learning notes - getting started
Easydl related documents and codes
Resource arrangement
synchronized下的 i+=2 和 i++ i++执行结果居然不一样
智能安全配电装置如何减少电气火灾事故的发生?
[reading papers] transformer miscellaneous notes, especially miscellaneous
[keras] generator for 3D u-net source code analysis py
Think: when do I need to disable mmu/i-cache/d-cache?
Number of special palindromes in basic exercise of test questions
STM32F103 IIC OLED program migration complete engineering code
Hstack, vstack and dstack in numpy
C # illustrated tutorial (Fourth Edition) chapter7-7.2 accessing inherited members
Paper reading - jukebox: a generic model for music
[pytorch] kaggle large image dataset data analysis + visualization
01 初识微信小程序
How to learn to understand Matplotlib instead of simple code reuse
Several articles on norms
Automatic differential reference