gpt4 book ai didi

visual-studio-2010 - videoread.exe中0x7548812f(KernelBase.dll)的首次机会异常:Microsoft C++异常:内存位置0x002cf898处的cv::Exception

转载 作者:行者123 更新时间:2023-12-02 17:48:48 25 4
gpt4 key购买 nike

我在Windows 7 32位操作系统中将opencv 2.4.10与Visual Studio 2010一起使用...

由于我是该 Realm 的新手,所以我首先尝试显示图像...效果很好...但是当我显示视频时,出现了此异常...并且下面提供了代码...谢谢...

  #include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
int main(int argc, char** argv)
{
string filename = "C:/Users/Public/Videos/Sample Videos/Wildlife.wmv";
VideoCapture capture(filename);
Mat frame;
if( !capture.isOpened() )
throw "Error when reading steam_avi";
namedWindow( "w", 1);
for( ; ; )
{
capture >> frame;
imshow("w", frame);
waitKey(20);
}
waitKey(0);
}

最佳答案

尝试添加try { ... } catch(cv:Exception const& e){}子句,以查看问题的e.what()

关于visual-studio-2010 - videoread.exe中0x7548812f(KernelBase.dll)的首次机会异常:Microsoft C++异常:内存位置0x002cf898处的cv::Exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28478396/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com