Play AVI video using OpenCV 2.2
来源:互联网 发布:客户管理系统Java 编辑:程序博客网 时间:2024/06/05 15:48
1. OS: Win7
IDE: VS2010
2. Include Directories: ....../OpenCV2.2/include
....../OpenCV2.2/include/opencv
Library Directories: ....../OpenCV2.2/lib
Additional Dependencies: opencv_core220d.lib, opencv_highgui220d.lib
3. Code:
#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
int _tmain(int argc, _TCHAR* argv[])
{
// Create a window for showing AVI video (title, 0/CV_WINDOW_AUTOSIZE)
cvNamedWindow("Show AVI", CV_WINDOW_AUTOSIZE);
// Read AVI file (including status information)
CvCapture * capture = cvCreateFileCapture("Your AVI video path");
IplImage * frame;
while(1){
// Load next frame into Main Memory
frame = cvQueryFrame(capture);
if(!frame){
// Video Over
break;
}
// Show a frame in window
cvShowImage("Show AVI", frame);
// Wait n msecs
char c = cvWaitKey(330);
if(c == 27){
// ESC Quit
break;
}
}
// Release CvCapture
cvReleaseCapture(&capture);
// Destory window
cvDestroyWindow("Show AVI");
return 0;
}
- Play AVI video using OpenCV 2.2
- Learning OpenCV: read AVI video file
- play video in Qt using GStreamer xvimagesink
- Play/pause HTML 5 video using JQuery
- Using Gstreamer to Play Video Files
- Learning OpenCV: cvCreateVideoWriter to save AVI video file
- Avi-Audio Video Interleave
- Track AVI Video
- Capture video from USB by using OpenCV videoInput
- Using opencv to process the video stream from camera
- Video Capture and play
- Timer & play video
- HTML5 video play
- HTML5 video play
- OpenCV读取AVI文件
- OpenCV读取AVI文件
- OpenCV读取AVI文件
- OpenCV读取AVI文件
- 谈下自己了解的云计算
- 快过年了
- C++内存分配秘籍—new,malloc,GlobalAlloc详解
- sas学习前景
- JPA复合主键使用
- Play AVI video using OpenCV 2.2
- 深入C++的new
- CString、char*之间的相互转换
- Activity切换效果(overridePendingTransition)
- 1指令 --/bin/sh 解决/etc/rc.local内脚本代码不运行
- Ant TSTAMP
- RichFaces 3.3.3 和 JSF 2.0
- 深入理解SP、LR和PC
- arm-none-linux-gnueabi-gcc: VERSION": No such file or directory