OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 8063|回复: 8

Emgu CV中读取摄像头

[复制链接]
发表于 2016-5-14 08:35:31 | 显示全部楼层 |阅读模式
刚接触c#的图像处理,什么都不懂。Emgu CV中读取摄像头视频并保存成图片的函数是什么?求分享
回复

使用道具 举报

发表于 2017-2-21 12:05:59 | 显示全部楼层
我也在学习这个 希望可以一起交流
回复 支持 反对

使用道具 举报

发表于 2017-4-20 17:29:41 | 显示全部楼层

我也在学习这个 希望可以一起交流
回复 支持 反对

使用道具 举报

发表于 2018-1-4 10:27:10 | 显示全部楼层


我也在学习这个 希望可以一起交流
回复 支持 反对

使用道具 举报

发表于 2018-1-4 11:00:42 | 显示全部楼层
本帖最后由 stq054188 于 2018-1-4 11:04 编辑

陆续将更新EmguCV学习视频,学习交流可以加这个群594192861

//显示打开图片
Mat srcImg = CvInvoke.Imread("1.jpg", LoadImageType.Color);
CvInvoke.Imshow("img", srcImg);
CvInvoke.WaitKey(0);
CvInvoke.DestroyAllWindows();


//打开摄像头显示
int c;
Mat frame = null;
Capture cap = new Capture(0);  //创建摄像头对象
/Capture cap = new Capture("2.avi");  //创建视频对象

while (true)
{
  frame = cap.QueryFrame(); //获取一帧画面
  if (frame.Data == null)
  {
     CvInvoke.Imshow("video", frame);
     c = CvInvoke.WaitKey(1);
     if (c == 27)  //按下"Esc"跳出
         break;
   }
}
   if (cap != null)  // Capture 对象释放
   {
      cap.Dispose();
    }
CvInvoke.DestroyAllWindows();



回复 支持 反对

使用道具 举报

发表于 2018-4-9 21:27:27 | 显示全部楼层
stq054188 发表于 2018-1-4 11:00
陆续将更新EmguCV学习视频,学习交流可以加这个群594192861

//显示打开图片

QQ群 搜索不到了.
回复 支持 反对

使用道具 举报

发表于 2018-8-25 15:26:30 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2018-9-5 21:44:24 | 显示全部楼层
以下是我用V3.4版本调试的,我也是新手。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Emgu.CV;
using Emgu.CV.Cvb;
using Emgu.CV.UI;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;

namespace ImageProcess
{
    public partial class FaceDetect : Form
    {
        Image<Bgr, Byte> current;
        VideoCapture webcam = new VideoCapture(0);
        private void button1_Click(object sender, EventArgs e)
        {
            Application.Idle += new EventHandler(processCamera);
        }

        private void processCamera(object sender, EventArgs e)
        {
            Mat current = webcam.QueryFrame();
            //Image<Bgr, Byte> frame = webcam.QueryFrame();
            Image<Bgr, Byte> img = current.ToImage<Bgr, Byte>();
           // currnet = current.Flip(Emgu.CV.CvEnum.FlipType.Horizontal);
            pictureBox1.Image = img.ToBitmap ();
        }
}
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-4-26 23:46 , Processed in 0.009525 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表