【发布时间】:2015-07-05 22:37:49
【问题描述】:
我尝试使用 Emgu-CV 捕获视频,但出现错误。我的代码如下:
Timer My_Time = new Timer();
int FPS = 30;
public Form1()
{
InitializeComponent();
//Frame Rate
My_Timer.Interval = 1000 / FPS;
My_Timer.Tick += new EventHandler(My_Timer_Tick);
My_Timer.Start();
_capture = new Capture("test.avi");
}
private void My_Timer_Tick(object sender, EventArgs e)
{
imageBox.Image = _capture.QueryFrame();
}
错误发生在
_capture = new Capture("test.avi");
谢谢。
详情
【问题讨论】:
-
您可以发布异常详细信息以供审核吗?
-
@MichaelDiFelice,我在上面添加了详细信息。
-
对不起,应该更清楚,您可以将 StackTrace 添加到问题详细信息中吗?很难看到,但它看起来好像在 CreateFileCapture(string filename) 上失败了。文件是否存在?也许这是 Emgu CV 中的一个已知问题。
-
刚刚发现这篇博客文章讨论了这个问题:emgu.com/forum/viewtopic.php?f=2&t=1523 似乎这个错误在 OpenCV 2.2 中。也许尝试从 SVN 存储库获取最新的并再次尝试?
-
除非你必须这样做。使用最新版本的 OpenCV。
标签: c# visual-studio opencv emgucv