【问题标题】:EmguCV capture rtsp ip camera stream ffmpegEmguCV 捕获 rtsp ip 摄像头流 ffmpeg
【发布时间】:2017-11-27 03:47:39
【问题描述】:

我正在使用 IP 摄像头和 EmguCV 来检测某个区域内的人员。 使用Highgui 捕获源,一切正常。 但是对于使用 FFMPEG 格式的 Arlo 摄像头,我无法毫无例外地获取流。 这是我尝试过的代码:

if (capture == null)
        {
            try
            {
                capture = new Capture("rtsp://<IP>:8554/live"); 
                capture.ImageGrabbed += Capture_ImageGrabbed;
                capture.Grab();
                capture.Start();
            }


            catch (NullReferenceException exception)
            {
                MessageBox.Show(exception.Message);
            }
            catch (TypeInitializationException exc)
            {
                MessageBox.Show(
                   "Attention: You have to copy all the assemblies and native libraries from an official release of EmguCV to the directory of the demo." +
                   Environment.NewLine + Environment.NewLine + exc);
            }
}

这里是Capture_ImageGrabbed 未触发的事件。

private void Capture_ImageGrabbed(object sender, EventArgs e)
    {
        Mat image = new Mat();
        capture.Retrieve(image);
        picCAM.Image = image.Bitmap;
    }

非常感谢您的帮助!

【问题讨论】:

  • 有什么异常?你得到的图像格式是一样的吗?
  • 如我所说,也不例外。
  • 您使用的是什么版本的 EmguCV?
  • @Reynaldi:我当时用的是EmguCV的最新版本:3.3.0

标签: c# ffmpeg emgucv


【解决方案1】:

这可能很旧,但直到现在我也面临同样的问题,即使使用最新版本(即 3.3 版)。可能不是最好的解决方案,但经过反复试验,我所做的就是降级到 2.4.2 版本。你可以下载here

我最近也在github 提交了这个问题。这可能是一个错误。

【讨论】:

  • 我会试一试并告诉你结果。非常感谢您的帮助
猜你喜欢
  • 2016-12-17
  • 2016-12-22
  • 2015-05-26
  • 2018-01-23
  • 1970-01-01
  • 2011-07-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多