当前位置:网站首页>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
边栏推荐
- Bean Validation核心组件篇----04
- redis 安装
- 上课作业(5)——#576. 饥饿的牛(hunger)
- Remote system command execution
- W3C 推出去中心化标识符作为 Web 标准
- sqlnet.ora文件设置不对造成ORA-12154 、ORA-01017连接异常
- sqlnet. Ora-12154 and ora-01017 connection exceptions caused by incorrect ora file settings
- TranslucentTB 推荐
- Redis master-slave replication
- Find the minimum value and location in multiple numbers (with repetition)
猜你喜欢

Mysql—六大日志

JSP之自定义jstl标签

Mysql—主从复制

SSB signal modulation and demodulation based on MATLAB (with source code)
![[untitled]](/img/cb/eb8edb5b15a8e87560a63355f35a9c.png)
[untitled]

反转链表画图演示

The difference between deadlock, hunger and dead cycle

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

Vinka introduces high anti-interference vk36n series touch IC: vk36n1d, vk36n2p, vk36n3b, vk36n4i, easy to use

CS5363,CS5350,CS5328几款太阳能板电池充电管理IC的功能特性与参数对比
随机推荐
Unity notes ilruntime access
Vinka introduces high anti-interference vk36n series touch IC: vk36n1d, vk36n2p, vk36n3b, vk36n4i, easy to use
Packaging and use of alamofire framework
How to become an elegant Hardware Engineer?
JS filter / replace sensitive characters
Vinka推出高抗干扰VK36N系列触摸IC:VK36N1D,VK36N2P,VK36N3B,VK36N4I 使用便利
New infrastructure of enterprise data in the era of digital transformation | love Analysis Report
[cloud native] continuous integration and deployment (Jenkins)
(Zset) how is the underlying layer of redis stored with a hop table
2022蓝帽杯初赛wp
冒泡排序-看着一篇就够啦
W3C 推出去中心化标识符作为 Web 标准
Bubble sort - just read one
ECS remote monitoring
[untitled]
再获殊荣 | OpenSCA获选中国软博会“全球十大开源软件产品”
死锁、饥饿、死循环之间的区别
ICML 2022 | 稀疏双下降:网络剪枝也能加剧模型过拟合?
【深入浅出向】从自信息到熵、从相对熵到交叉熵,nn.CrossEntropyLoss, 交叉熵损失函数与softmax,多标签分类
Éléments de base de la validation des haricots - 04