【发布时间】:2013-06-06 04:23:37
【问题描述】:
我有一个奇怪的问题,我无法使用 CVCaptureFromFile 打开 asf 视频,其路径是使用 CFileDialog 返回的。
有趣的部分是 CVCaptureFromFile 在调用 CFileDialog 后对硬编码路径不起作用(返回 Null)。
CFileDialog dlg(true);
int Response = dlg.DoModal();
if(Response == 1)
OpenFileName = dlg.GetPathName();
capture = cvCreateFileCapture("c:\\123.asf");
//returning null but working normally if I comment **dlg.DoModal();**
编辑 1: 它非常适合加载图像。
【问题讨论】:
-
放置断点并检查字符串。
-
它是正确的。我查过了。
标签: visual-c++ opencv