vs2010 opencv 不能播放视频?

问题描述

vs2010 opencv 不能播放视频?

这是书上的代码,编译能通过,就是视频不能播放?
也安装了XviD-1.1.3-27042008.
我用的是vs2010, opencv2.4.10
#include
#include
using namespace cv;
int main()
{
cv::VideoCapture capture("D:opencvbike.avi");
if(!capture.isOpened())
{
return 1;
}
double rate=capture.get(CV_CAP_PROP_FPS);
bool stop(false);
cv::Mat frame;
cv::namedWindow("Extracted Frame");
int delay=1000/rate;
while(!stop)
{
if(!capture.read(frame))
break;
cv::imshow("Extracted Frame",frame);
if(cv::waitKey(delay)>=0)
stop=true;
}
capture.release();
cv::waitKey(0);
system("pause");
return 0;

}

输出结果是
“opencv2.exe”: 已加载“D:opencvopencv2Debugopencv2.exe”,已加载符号。
“opencv2.exe”: 已加载“C:WindowsSysWOW64ntdll.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64kernel32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64KernelBase.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“D:Program Filesopencvbuildx86vc10binopencv_core2410d.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64msvcp100d.dll”,已加载符号。
“opencv2.exe”: 已加载“C:WindowsSysWOW64msvcr100d.dll”,已加载符号。
“opencv2.exe”: 已加载“D:Program Filesopencvbuildx86vc10binopencv_highgui2410d.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64user32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64gdi32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64lpk.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64usp10.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64msvcrt.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64advapi32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64sechost.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64rpcrt4.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64sspicli.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64cryptbase.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64ole32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64oleaut32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:Windowswinsxsx86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5comctl32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64avifil32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64winmm.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64msacm32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64msvfw32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64shell32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64shlwapi.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64avicap32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64version.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64imm32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64msctf.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64nvinit.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:Program Files (x86)NVIDIA Corporationcoprocmanagerdetoured.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:Program Files (x86)NVIDIA CorporationcoprocmanagerNvd3d9wrap.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64setupapi.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64cfgmgr32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64devobj.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:Program Files (x86)NVIDIA Corporationcoprocmanagernvdxgiwrap.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“D:Program Filesopencvbuildx86vc10binopencv_ffmpeg2410.dll”,未使用调试信息生成二进制文件。
“opencv2.exe”: 已加载“C:WindowsSysWOW64ws2_32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64nsi.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64uxtheme.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“D:jinshan_weishiksafeksfmon.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:ProgramDataTencentTSVulFwTSVulFW.DAT”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64psapi.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64clbcatq.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64apphelp.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64SogouPY.ime”,Cannot find or open the PDB file
“opencv2.exe”: 已卸载“C:WindowsSysWOW64SogouPY.ime”
“opencv2.exe”: 已加载“C:WindowsSysWOW64SogouPY.ime”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64msimg32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64oleacc.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64ntmarta.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64Wldap32.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64dwmapi.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“D:SogouInputComponentsPicFace1.0.0.1403PicFace.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“C:WindowsSysWOW64profapi.dll”,Cannot find or open the PDB file
“opencv2.exe”: 已加载“D:SogouInput7.9.0.7504Resource.dll”,未使用调试信息生成二进制文件。
线程 'Win32 线程' (0x14ec) 已退出,返回值为 0 (0x0)。
线程 'Win32 线程' (0x1770) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0xe34) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0xf88) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x10c) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x1664) 已退出,返回值为 -1073741510 (0xc000013a)。
程序“[5932] opencv2.exe: 本机”已退出,返回值为 -1073741510 (0xc000013a)。

解决方案

安装配置有问题,建议仔细检查

解决方案二:

遇到同样的问题,请问你解决了吗

解决方案三:

if(!capture.read(frame))
break;
if那一行加断点,到了之后按F10往下走,应该是这里直接break出去了,也就是获得图像帧的时候失败了

解决方案四:

学着调试程序,上网搜f10的用法,知道程序在那一块出的问题,然后对症下药

时间: 2024-10-23 16:54:51

vs2010 opencv 不能播放视频?的相关文章

视频处理-我用qt+opencv 录制了视频

问题描述 我用qt+opencv 录制了视频 我用qt+opencv 录制了视频,问题一:录制了1分钟,视频中不到一分钟!用了定时器,ntimer= 1000/fps; 问题二,怎么录制音频? 谢谢 解决方案 OpenCV 录制视频QT OpenCV 播放视频Opencv + Qt 获取视频中任意一帧

如何利用opencv实现在视频中每隔固定的n像素列数取一副图像?

问题描述 如何利用opencv实现在视频中每隔固定的n像素列数取一副图像? 在视频中,视频向前播放,视频画面每隔固定的像素列数n后,取当前的画面.各位大神有没有思路? 解决方案 视频不是以帧的形式播放的吗?那怎么实现你这种方法哦.除非你的n个列数就是一幅图像列数

视频打不开-OPENCV:部分视频在win7 64位系统上打不开

问题描述 OPENCV:部分视频在win7 64位系统上打不开 如题,小弟在做opencv图像处理的时候发现,在win7 32位系统上可以读的视频,换到win7 64位系统的平台上,有的视频就读不出来了.不知道是什么问题造成的,视频是用Gopro hero3 相机拍摄的,视频格式MP4,求解答 解决方案 安装下暴风影音等软件,将解码器装上看看. 解决方案二: 我的电脑上现在装了很多播放器,暴风影音.迅雷影音,realplayer,万能播放器,狸窝转换器等,解码器应该比较全了 解决方案三: 程序是

c++-opencv 摄像头读取视频保存

问题描述 opencv 摄像头读取视频保存 namedWindow("E1",cv::WINDOW_AUTOSIZE); namedWindow("E2",cv::WINDOW_AUTOSIZE); VideoCapture capture(0); Size size((int)capture.get(CV_CAP_PROP_FRAME_WIDTH ),(int)capture.get(CV_CAP_PROP_FRAME_HEIGHT )); VideoWriter

Silverlight实用窍门系列:36.Silverlight中播放视频和打印文档【附带源码实例】

在silverlight实际项目中时常会需要播放视频和打印文档,在本节中我们将制作一个最简单的播放视频和打印文档的实例. 一.播放WMV视频 首先我们创建一个Silverlight应用程序SLShowVideo,然后放一个示例Wmv视频在SLShowVideo.web项目的根目录下面. 然后我们在Xaml文档中放入一个MediaElement控件,并写入以下代码: <MediaElement Height="377" HorizontalAlignment="Left&

OpenCV中读取视频/camera代码

发现OpenCV中读取视频或者usb camera的方法如此简单,下面是opencv2.31中实现的读取摄像头的代码: int main() { //打开视频文件 //cv::VideoCapture capture("bike.avi"); //0 open default camera cv::VideoCapture capture(0); //检查视频是否打开 if(!capture.isOpened()) return 1; // 得到帧率 double rate= capt

Android4.4 修改哪里能够让浏览器自动播放视频 autoplay

问题描述 Android4.4 修改哪里能够让浏览器自动播放视频 autoplay 10C google 在Android4.4 浏览器中禁用了 autoplay功能,需要点击一下播放按钮才可以.现在想用浏览器做户外显示终端.所以想实现打开网页就能播放视频的功能.请问有没有什么办法,在android源码中 打开autoplay功能 解决方案 试试WebView.getSettings().setMediaPlaybackRequiresUserGesture(false) (可参考 - http

object标签播放视频代码

问题描述 object标签播放视频代码 没什么网页开发基础,想自己在网页上播放下视频,mpg格式的. 麻烦问下用object标签播放视频获取 播放时间提示 Cannot read property 'durationString' of undefined 改怎么解决啊? 解决方案 你用的什么控件?是windows media player控件么?你的网页有没有启用加载它. 解决方案二: 视频播放代码视频播放小代码播放视频代码

surfaceview 循环播放视频用视频缩略图代替视频切换时的样式 怎么操作嗯

问题描述 surfaceview 循环播放视频用视频缩略图代替视频切换时的样式 怎么操作嗯 surfaceview 循环播放视频用视频缩略图代替视频切换时的样式 怎么操作嗯