using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using OpenCVDotNet; namespace WindowsApplication6 { public partial class Form1 : Form { private CVCapture capture; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { capture = new CVCapture(0);// when debug i see signal light camera } private void timer1_Tick(object sender, EventArgs e) { using (CVImage nextFrame = capture.QueryFrame())// why nextFrame set null? { if (nextFrame == null) capture.Restart(); selectPictureBox1.Image = nextFrame.ToBitmap(); } } private void button1_Click(object sender, EventArgs e) { timer1.Enabled = !(timer1.Enabled); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)