当前位置:网站首页>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
边栏推荐
- Why do independent sellers like to do e-mail marketing? The original conversion rate can be improved so much!
- Sentinel vs Hystrix 限流对比,到底怎么选?
- Mysql8.0 MHA to achieve high availability "MHA"
- Experience sharing of system architecture designers preparing for the exam: from point to surface
- 【leetcode天梯】链表 · 021 合并两个有序链表
- 狗粮的成分
- 【饭谈】细说:下克上,向上管理,向上画饼。
- C#Socket
- pyqt5使用pyqtgraph绘制多个Y值散点图
- 【面试:并发篇23:多线程:join】join再理解
猜你喜欢
![[redis underlying parsing] string type](/img/a6/47083b033125195ebaf80090919fe2.png)
[redis underlying parsing] string type

2022最新软件测试八股文,能不能拿心仪Offer就看你背得怎样了

How will Web3 change the future of people?

2022 love analysis ― bank digitalization practice report

919. Complete binary tree inserter: simple BFS application problem

Sentinel vs Hystrix 限流对比,到底怎么选?
![[MAIXPY]kpu: load error:2005, ERR_READ_FILE: read file failed问题解决](/img/0b/da67b5a361a2cdfaf81568d34cf5f7.png)
[MAIXPY]kpu: load error:2005, ERR_READ_FILE: read file failed问题解决

函数栈帧的创建和销毁
![[interview: concurrent Article 23: multithreading: Join] re understanding of join](/img/ee/5160a55e776336ba844abe8e9db72a.png)
[interview: concurrent Article 23: multithreading: Join] re understanding of join

Redis 使用详解
随机推荐
ag 搜索工具参数详解
Share | intelligent fire emergency management platform solution (PDF attached)
Blood spitting finishing nanny level series tutorial - playing Fiddler bag capturing tutorial (7) - Fiddler status panel -quickexec command line
再次来光顾
Zero basic learning canoe panel (17) -- panel CAPL function
ONEFLOW V0.8.0 officially released
mysql8.0 mha实现高可用《mha》
【Redis底层解析】字符串类型
Composition of dog food
[leetcode ladder] linked list · 876 find the middle node of the linked list
919. Complete binary tree inserter: simple BFS application problem
[ManageEngine] value brought by Siem to enterprises
MPI learning notes (II): two implementation methods of matrix multiplication
Guys, how can Flink SQL submit tasks in per job mode?
ORIGYN基金会正式启动$OGY Staking,引领新一轮生态利好
Special class design
Why do independent sellers like to do e-mail marketing? The original conversion rate can be improved so much!
性能调试 -- Chrome Performance
文件无法保存(文件夹已损坏无法读取怎么办)
Face and key point detection: yolo5face practice