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