Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
PlayVideo.c
Upload User: whhzxy
Upload Date: 2022-01-20
Package Size: 7k
Code Size: 1k
Category:
OpenCV
Development Platform:
C/C++
- #include <stdio.h>
- #include "highgui.h"
- #include "cv.h"
- #include "cxcore.h"
- int main(int argc,char** argv){
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- //需要先在此声明,否则无法使用;
- CvCapture* capture = NULL;
- IplImage* frame = NULL;
- char c;
- cvNamedWindow("saga", CV_WINDOW_AUTOSIZE);
- //cvCaptureFromFile,打开AVI文件,需要在控制台输入文件路径;
- //cvCreateFileCapture,作用好像也是一样的;
- //capture = cvCaptureFromFile(argv[1]);
- //avi, mpg, wmv, MOV 都行,中文名也可以,没有声音。
- capture = cvCreateFileCapture("D:\saga\P1060809.MOV");
- while(1){
- frame = cvQueryFrame(capture);
- if(!frame) break;
- cvShowImage("saga",frame);
- c = cvWaitKey(33);
- if(c == 27) break; //ESC退出
- }
- cvReleaseCapture(&capture);
- cvDestroyWindow("saga");
- return -1;
- }