OpenCv学习笔记(五):使用VideoCapture类函数实现视频的播放
2012-06-10 20:54
363 查看
opencv早就实现了对视频的处理,需要指出的是opencv对视频的处理比matlab实现视频处理不知要快了多少倍。为了交流学习,我都把代码写的特别短,就不做详细解释了。需要说明的是VideoCapture函数:
#include "stdafx.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
#include <vector>
using namespace cv;
int main( int argc, char** argv )
{
Mat frame;
cvNamedWindow("myVideoPlayer");
VideoCapture cp("d:/Bucket_list.avi");
while(1)
{
cp>>frame;
imshow("myVideoPlayer",frame);
waitKey(30);
}
waitKey(0);
return 0;
}
#include "stdafx.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
#include <vector>
using namespace cv;
int main( int argc, char** argv )
{
Mat frame;
cvNamedWindow("myVideoPlayer");
VideoCapture cp("d:/Bucket_list.avi");
while(1)
{
cp>>frame;
imshow("myVideoPlayer",frame);
waitKey(30);
}
waitKey(0);
return 0;
}
相关文章推荐
- [置顶] Android开发实战使用(VR技术实现360°全景视频播放功能)
- C#如何使用DirectX实现视频播放
- 使用.NET实现视频播放
- 安卓使用MediaPlayer实现播放内存卡内的视频
- Ionic3学习笔记(十四)使用 videogular2 实现视频播放以及遇到的一些问题
- 使用DirectX实现视频播放_技术
- 使用CkPlayer网页播放器实现视频播放
- Visual C#使用DirectX实现视频播放
- WPF技术触屏上的应用系列(三): 视频播放器的使用及视频播放、播放、暂停、可拖动播放进度效果实现
- android使用Vitamio实现视频播放大小屏流畅切换
- Visual C#使用DirectX实现视频播放
- Javacv使用ffmpeg实现音视频同步播放
- 使用.NET实现视频播放
- iOS开发之AVPlayer的精彩使用--->网易新闻视频播放界面的另类实现
- Visual C#使用DirectX实现视频播放
- 使用Vitamin实现视频播放
- android--(surfaceView实现视频播放、9.path工具使用)
- 使用Vitamio开源项目在Android实现播放网络视频
- 基于EasyNVR+EasyDSS H5视频直播二次开发实现业务需求:直接使用播放页面
- WindowManager实现悬浮框并且使用VideoView播放视频