当前位置:网站首页>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
边栏推荐
- [hand tear STL] BitSet (bitmap), bloom filter
- PE format: analyze and implement IATHOOK
- C#程序设计的6大原则
- Stm3 (cubeide) lighting experiment
- 如何用 Redis 实现分布式锁的?
- Vivo official website app full model UI adaptation scheme
- Bitcoin.com:USDD代表了真正去中心化稳定币
- Six principles of C program design
- Create files, file permissions, ownership, and sticky bits
- Bitcoin.com:usdd represents a truly decentralized stable currency
猜你喜欢

人脸与关键点检测:YOLO5Face实战

ag 搜索工具参数详解

Web3 entrepreneurship has all the elements of explosive growth of innovation

C#Socket

pyqt5使用pyqtgraph绘制多个Y值散点图

立创EDA——我为什么要学EDA
![[database] conceptual design, logical design, relational database design theory](/img/4d/be7ab21c98fc1bf4b63e4abe22d9fc.png)
[database] conceptual design, logical design, relational database design theory

How to implement distributed locks with redis?

919. 完全二叉树插入器 : 简单 BFS 运用题

Special class design
随机推荐
Sentinel vs Hystrix 限流对比,到底怎么选?
H5 realize the animation effect of a scratch card
[ManageEngine] value brought by Siem to enterprises
零基础学习CANoe Panel(17)—— Panel CAPL Function
Vivo official website app full model UI adaptation scheme
Automatic assembly and fuse degradation of feign
选择的能力
分享|智慧消防应急管理平台解决方案(附PDF)
[leetcode ladder] linked list · 876 find the middle node of the linked list
【Redis底层解析】链表类型
C语言左值和右值说明[通俗易懂]
Fastjson deserialization vulnerability utilization analysis collection
Optimization analysis of storage structure and IO performance of openharmony littlefs file system
ag 搜索工具参数详解
2022 love analysis ― bank digitalization practice report
Unity Metaverse(二)、Mixamo & Animator 混合树与动画融合
Oracle RAC RMAN backup error ora-19501 ora-15081
开源的RSS订阅器FreshRSS
Six principles of C program design
Configuration and use of multithreading