1
我想用网络摄像头捕捉图像。我使用WebCam_Capture.dll
。我在窗体中添加一个WebCamCapture
控件。如何使用网络摄像头捕获图像?
当形式负载:
private void Form1_Load(object sender, EventArgs e)
{
this.WebCamCapture.TimeToCapture_milliseconds = 1;
WebCamCapture.Start(0);
}
和ImageCaptured事件:
private void WebCamCapture_ImageCaptured(object source,
WebCam_Capture.WebcamEventArgs e)
{
this.pictureBox1.Image = e.WebCamImage;
}
但是当我跑,我得到错误:
An error ocurred while capturing the video image. The video capture will now be terminated.
Object reference not set to an instance of an object.
谢谢,但是当我使用这段代码它捕捉图像一次,但不捕获另一个时间:( – Niloo
openCV是使用非常简单,你可以看到它是捕捉摄像头的示例 – Kisame