【问题标题】:Take Snapshot using webcam and EmguCV in c# in console application在控制台应用程序中使用 c# 中的网络摄像头和 EmguCV 拍摄快照
【发布时间】:2017-07-12 05:25:45
【问题描述】:

我需要一个简单但完整的示例,用于在控制台应用程序中从 Logitech USB 网络摄像头捕获快照,但我找不到。

下一条指令无效。

private Capture _capture = null; //Camera

捕获定义在哪里?在 Emgu.CV.World 中并非如此。

我使用的是 EmguCV 3.2.0 版本。

http://www.emgu.com/wiki/index.php?title=Camera_Capture

提前谢谢你。

The error is the attached image

【问题讨论】:

    标签: c# emgucv


    【解决方案1】:

    您是否阅读了整篇文章?在这里实例化:

     private void SetupCapture(int Camera_Identifier)
        {
            //update the selected device
            CameraDevice = Camera_Identifier;
    
           //Dispose of Capture if it was created before
            if (_capture != null) _capture.Dispose();
            try
            {
                //Set up capture device
                _capture = new Capture(CameraDevice);
                _capture.ImageGrabbed += ProcessFrame;
            }
            catch (NullReferenceException excpt)
            {
                MessageBox.Show(excpt.Message);
            }
        }
    

    希望这会有所帮助。

    道格

    【讨论】:

    • 问题在于对 Capture 类的使用。需要什么使用?
    • 对不起,我不明白这个问题。
    • V3.2中没有Capture类,叫做VideoCapture。尝试使用 VideoCapture 类。我相信你必须做出调整,因为我不确定这个类的功能是否像 Capture 类那样。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-25
    • 1970-01-01
    • 2010-11-07
    • 2015-10-14
    相关资源
    最近更新 更多