当前位置:网站首页>The file cannot be saved (what if the folder is damaged and cannot be read)
The file cannot be saved (what if the folder is damaged and cannot be read)
2022-07-25 21:50:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
To use EmguCV, First of all, you need to go to the official website to download the installation package ( In addition to downloading the installation package , There are several other ways ). After installation , You have to configure environment variables . No more details here . There are many online tutorials . Here I share a download link of the official website :https://sourceforge.net/projects/emgucv/files/emgucv/
Here we use the form program to explain , First create a new form
1. quote EmguCV Of DLL:using Emgu.CV;using Emgu.CV.Structure;
hold Emgu.CV.UI Drag this class library to the toolbox , such , We can use his controls . Drag one onto the form imageBox Control (EmguCV Control instead of .NET Control ) Two buttons ( General button ).
The complete code of the form is as follows :
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Mat img;
private void btnRead_Click(object sender, EventArgs e)
{
// Mode one
img = CvInvoke.Imread("1000.jpg");
CvInvoke.Imshow("img", img);
CvInvoke.WaitKey(0);
// Mode two
//Image<Bgr, Byte> img = new Image<Bgr, byte>("aa.jpg");// Load picture from file
//imageBox1.Image = img;
}
private void btnSave_Click(object sender, EventArgs e)
{
// Mode one
CvInvoke.Imwrite("new.jpg", img);
MessageBox.Show(" Saved successfully ");
// Mode two
//imageBox1.Image.Save(@"D:\new.jpg");
}I use two ways to read and save . But only method one can work normally . In the second way, the program is imageBox1.Image = img; This sentence is stuck . I haven't found the reason yet . However, the second method can be used .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/127918.html Link to the original text :https://javaforall.cn
边栏推荐
- [51Nod1676 无向图同构]无向图哈希[通俗易懂]
- 【测开方法论】测开平台pk心得-抉择
- Vivo official website app full model UI adaptation scheme
- 【Flink】FLink RocksDBListState 报错 You cannot add null to a ListState
- Experience sharing of system architecture designers preparing for the exam: from point to surface
- 2022-07-18: what is the output of the following go language code? A:Groutine; B:Main; C:Goroutine; D:GoroutineMain。 package m
- At present, flynk CDC does not support mysql5.5. If you change the source code and release this restriction, there will be a lot of data problems?
- Web3 entrepreneurship has all the elements of explosive growth of innovation
- 2022 latest examination questions and answers of eight members (standard staff) of Shanghai Architecture
- Detailed explanation of Ag search tool parameters
猜你喜欢

Vivo official website app full model UI adaptation scheme

Byte side: can TCP and UDP use the same port?

Special class design

IJCAI2022开会了! 微软等《领域泛化Domain Generalization》教程

Research: more than 70% of doctors are still prescribing unsafe antibiotic drugs
![[manageengine]itsm application in retail industry](/img/25/e8d9a320c5d4b1cf2e187b61180991.png)
[manageengine]itsm application in retail industry

如何用 Redis 实现分布式锁的?

Web3 entrepreneurship has all the elements of explosive growth of innovation

Detailed explanation of JVM memory model and structure (five model diagrams)
![[ManageEngine] value brought by Siem to enterprises](/img/1e/56d64d193e0428523418bef5e98866.png)
[ManageEngine] value brought by Siem to enterprises
随机推荐
Performance debugging -- chrome performance
LeetCode_ 93_ Restore IP address
dovecot 设置邮箱quota
开源协议是否具有法律效力?
[redis underlying parsing] linked list type
[Flink] flick rocksdbliststate reports an error you cannot add null to a liststate
How to solve the problem of high concurrency and large traffic with PHP
【面试:并发篇24:多线程:综合练习】顺序控制
Special symbols in shell
Protobuf的简单使用
[leetcode ladder] linked list · 021 merge two ordered linked lists
My heart's broken! After being cheated by 30000, a 16-year-old girl was unconvinced and cheated by 50000
【Redis底层解析】字符串类型
ONEFLOW V0.8.0 officially released
【饭谈】Web3.0到来后,测试人员该何去何从?(十条预言和建议)
卸载npm和安装npm_使用`npm uninstall`卸载npm软件包「建议收藏」
What are the application characteristics of NTU general database gbase Bi?
零基础学习CANoe Panel(17)—— Panel CAPL Function
QT | learn about QT creator by creating a simple project
Ability to choose