OpenCV video process
2016-07-14 22:08
211 查看
show.cpp/* * File name :show.cpp * Author :kangkangliang * File desc :use video frame * Mail :liangkangkang@paag.com * Create time :2015-10-08 *//*! * headfile */#include #include #include #include #include #include #include
#include #include #include #include #include #include #include #include #include using namespace std;using namespace cv;/*! * main function */intmain(int argc,char **argv){ VideoCapture capture(argv[1]); /// error deal with if( !capture.isOpened()
) { cout << "appear error " << endl; return -1; } Mat frame,edges;// double fps = static_cast(capture.get(CV_CAP_PROP_FPS));// cout << "the video fps is " << fps << endl; for(;;) { capture >> frame; cvtColor( frame,edges,CV_BGR2GRAY ); GaussianBlur( edges,edges,Size(7,7),1.5,1.5);
Canny( edges,edges,0,30,3 ); imshow("edges",edges); /// wait user press any key to quit if( waitKey(30) >= 0 ) { break; } } return 0;}make.sh########################################## File name :make.sh# Author :liangkangkang# File desc :# Mail :liangkangkang@paag.com#
Create time :2015-09-06##########################################!/usr/bin/bash#obj = `echo $1 | cut -d '.' -f1`#g++ -Wall -std=c++0x $1 -o $objg++ -g -Wall -std=c++0x $1 `pkg-config --cflags --libs opencv` -o `echo $1 | cut -d '.' -f1`#./`echo $1 | cut -d
'.' -f1`usage:1.sh make.sh show.cpp2../show xxx.avi
#include #include #include #include #include #include #include #include #include using namespace std;using namespace cv;/*! * main function */intmain(int argc,char **argv){ VideoCapture capture(argv[1]); /// error deal with if( !capture.isOpened()
) { cout << "appear error " << endl; return -1; } Mat frame,edges;// double fps = static_cast(capture.get(CV_CAP_PROP_FPS));// cout << "the video fps is " << fps << endl; for(;;) { capture >> frame; cvtColor( frame,edges,CV_BGR2GRAY ); GaussianBlur( edges,edges,Size(7,7),1.5,1.5);
Canny( edges,edges,0,30,3 ); imshow("edges",edges); /// wait user press any key to quit if( waitKey(30) >= 0 ) { break; } } return 0;}make.sh########################################## File name :make.sh# Author :liangkangkang# File desc :# Mail :liangkangkang@paag.com#
Create time :2015-09-06##########################################!/usr/bin/bash#obj = `echo $1 | cut -d '.' -f1`#g++ -Wall -std=c++0x $1 -o $objg++ -g -Wall -std=c++0x $1 `pkg-config --cflags --libs opencv` -o `echo $1 | cut -d '.' -f1`#./`echo $1 | cut -d
'.' -f1`usage:1.sh make.sh show.cpp2../show xxx.avi
相关文章推荐
- 买视频送图书-五月活动
- DVI 视频接口图文解析
- C#实现语音视频录制-附demo源码
- 编写C++程序使DirectShow进行视频捕捉
- AnyChat的视频会议程序实例详解
- C#调用mmpeg进行各种视频转换的类实例
- C#获取视频某一帧的缩略图的方法
- 基于jQuery的网页影音播放器jPlayer的基本使用教程
- 显示youtube视频缩略图和Vimeo视频缩略图代码分享
- python中使用OpenCV进行人脸检测的例子
- opencv 做人脸识别 opencv 人脸匹配分析
- 使用opencv拉伸图像扩大分辨率示例
- PHP使用ffmpeg给视频增加字幕显示的方法
- PHP实现将视频转成MP4并获取视频预览图的方法
- C++实现优酷土豆去视频广告的方法
- PHP简单获取视频预览图的方法
- asp.net 页面中添加普通视频的几种方式介绍
- php截取视频指定帧为图片
- Mac OS下为Android Studio编译FFmpeg解码库的详细教程
- Android Studio中配置OpenCV库开发环境的教程