zoukankan      html  css  js  c++  java
  • Emgu cv3.0.0 图像收集

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;

    using Emgu.CV;
    using Emgu.CV.Structure;
    using Emgu.Util;
    using System.Threading;

    namespace EmguTest1117_6
    {
      public partial class Form1 : Form
      {
        private Capture capt;
        public Form1()
        {
          InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
          try
          {
            if (capt == null)
              capt = new Capture();
          }
          catch (NullReferenceException excpt)
          {
            MessageBox.Show(excpt.Message);
          }
          if (capt != null)
          {
            button1.Enabled = false;
            button2.Enabled = true;
            Application.Idle += new EventHandler(imageBox1_Click);
          }
        }

        private void button2_Click(object sender, EventArgs e)
        {
          if (capt != null)
          {
            button1.Enabled = true;
            button2.Enabled = false;
            Application.Idle -= new EventHandler(imageBox1_Click);
          }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
          this.button1.Enabled = true;
          this.button2.Enabled = false;
        }

        private void imageBox1_Click(object sender, EventArgs e)
        {
          //Image<Bgr, Byte> frame = capt.QueryFrame();
          //Image<Bgr, Byte> frame = capt.QueryFrame();
          Mat mat = capt.QueryFrame();
          //imageBox1.Image = frame;
          imageBox1.Image = mat;
        }
      }
    }

  • 相关阅读:
    设置linux session 编码
    在masterpage中添加对usercontrol的引用
    首页的sitecontent地址
    iis的路径
    设置repeater每行多少个的方法
    updatepannel的使用
    取caml查询结果的前多少行
    设置视频自动播放
    网站集与网站
    notepad++ 死机 找到没保存的文件
  • 原文地址:https://www.cnblogs.com/herd/p/7851089.html
Copyright © 2011-2022 走看看