当前位置:网站首页>EmguCV录制视频
EmguCV录制视频
2022-07-23 12:03:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
我所录制的为摄像头的视频: 使用的函数为VideoWriter。
using System;
using System.Drawing;
using System.Windows.Forms;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
namespace EmguCVHist
{
public partial class Form1 : Form
{
Capture cap;
Image<Bgr, byte> frame;
VideoWriter vw;
public Form1()
{
InitializeComponent();
cap = new Emgu.CV.Capture(1);
vw = new VideoWriter("123.avi", 30, new Size(cap.Width, cap.Height), true);
cap.Start();
frame = new Image<Bgr, byte>(cap.Width, cap.Height);
cap.ImageGrabbed += Cap_ImageGrabbed;
cap.SetCaptureProperty(CapProp.Fps, 0);
}
private void Cap_ImageGrabbed(object sender, EventArgs e)
{
cap.Retrieve(frame, 0);
vw.Write(frame.Mat);
imageBox1.Image = frame;
}
}
}最后录制的视频会储存在项目所在文件夹的bin目录下的debug或release文件夹中。 最终效果:
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/126250.html原文链接:https://javaforall.cn
边栏推荐
- 【云原生】持续集成和部署(Jenkins)
- High cost performance, high anti-interference touch IC that meets a variety of keys: vk3606d, vk3610i, vk3618i have high power voltage rejection ratio
- ESP8266 NodeMCU 闪存文件系统(SPIFFS)
- [cloud native] continuous integration and deployment (Jenkins)
- 虚拟主播、偶像代言产品出问题谁负责?律师解析
- 上课作业(5)——#576. 饥饿的牛(hunger)
- 剑指 Offer II 115. 重建序列 : 拓扑排序构造题
- 1060 Are They Equal
- Comparison of functional characteristics and parameters of several solar panel battery charging management ICs cs5363, cs5350 and cs5328
- CONDA set up proxy
猜你喜欢

2022 the most NB JVM foundation to tuning notes, thoroughly understand Alibaba P6 small case

W3C 推出去中心化标识符作为 Web 标准

Ora-01654 error: table space is full, insert failed

MySQL string sorted by numeric value

Mathematical Modeling Typesetting

CS5363,CS5350,CS5328几款太阳能板电池充电管理IC的功能特性与参数对比

ECS remote monitoring

Governance and network security of modern commercial codeless development platform

FPGA-HLS-乘法器(流水线对比普通仿真)

How beautiful can VIM be configured?
随机推荐
V自P建N_部署使用
“1+1>10”:无代码/低代码与RPA技术的潜在结合
MySQL-字符串按照数值排序
ICML 2022 | 稀疏双下降:网络剪枝也能加剧模型过拟合?
1060 Are They Equal
W3C introduces decentralized identifier as web standard
Translucenttb recommendations
手机使用多了可能会丢掉工作
Governance and network security of modern commercial codeless development platform
Reproduce various counter attack methods
SOC的第一个Hello_World实验
7、 Logic of JMeter sending request
云原生(十一) | Kubernetes篇之Kubernetes原理与安装
2022 the most NB JVM foundation to tuning notes, thoroughly understand Alibaba P6 small case
反转链表画图演示
Packaging and use of fmdb
[operation and maintenance] SSH tunneling relies on the 22 port of SSH to realize the interface service of accessing the remote server
后缀表达式(暑假每日一题 4)
Learning summary of ugly code
【云原生】持续集成和部署(Jenkins)