资源简介
学习OpenCV中文版书签版以及随书源码
代码片段和文件信息
// Example 10-1. Pyramid Lucas-Kanade optical flow code
//
/* *************** License:**************************
Oct. 3 2008
Right to use this code in any way you want without warrenty support or any guarentee of it working.
BOOK: It would be nice if you cited it:
Learning OpenCV: Computer Vision with the OpenCV Library
by Gary Bradski and Adrian Kaehler
Published by O‘Reilly Media October 3 2008
AVAILABLE AT:
http://www.amazon.com/Learning-OpenCV-Computer-Vision-Library/dp/0596516134
Or: http://oreilly.com/catalog/9780596516130/
ISBN-10: 0596516134 or: ISBN-13: 978-0596516130
OTHER OPENCV SITES:
* The source code is on sourceforge at:
http://sourceforge.net/projects/opencvlibrary/
* The OpenCV wiki page (As of Oct 1 2008 this is down for changing over servers but should come back):
http://opencvlibrary.sourceforge.net/
* An active user group is at:
http://tech.groups.yahoo.com/group/OpenCV/
* The minutes of weekly OpenCV development meetings are at:
http://pr.willowgarage.com/wiki/OpenCV
************************************************** */
#include
#include
#include
#include
const int MAX_CORNERS = 500;
int main(int argc char** argv) {
// Initialize load two images from the file system and
// allocate the images and other structures we will need for
// results.
//
IplImage* imgA = cvLoadImage(“OpticalFlow0.jpg“CV_LOAD_IMAGE_GRAYSCALE);
IplImage* imgB = cvLoadImage(“OpticalFlow1.jpg“CV_LOAD_IMAGE_GRAYSCALE);
CvSize img_sz = cvGetSize( imgA );
int win_size = 10;
IplImage* imgC = cvLoadImage(“OpticalFlow1.jpg“CV_LOAD_IMAGE_UNCHANGED);
// The first thing we need to do is get the features
// we want to track.
//
IplImage* eig_image = cvCreateImage( img_sz IPL_DEPTH_32F 1 );
IplImage* tmp_image = cvCreateImage( img_sz IPL_DEPTH_32F 1 );
int corner_count = MAX_CORNERS;
CvPoint2D32f* cornersA = new CvPoint2D32f[ MAX_CORNERS ];
cvGoodFeaturesToTrack(
imgA
eig_image
tmp_image
cornersA
&corner_count
0.01
5.0
0
3
0
0.04
);
cvFindCornerSubPix(
imgA
cornersA
corner_count
cvSize(win_sizewin_size)
cvSize(-1-1)
cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS200.03)
);
// Call the Lucas Kanade algorithm
//
char features_found[ MAX_CORNERS ];
float feature_errors[ MAX_CORNERS ];
CvSize pyr_sz = cvSize( imgA->width+8 imgB->height/3 );
IplImage* pyrA = cvCreateImage( pyr_sz IPL_DEPTH_32F 1 );
IplImage* pyrB = cvCreateImage( pyr_sz IPL_DEPTH_32F 1 );
CvPoint2D32f* cornersB = new CvPoint2D32f[ MAX_CORNERS ];
cvCalcOpticalFlowPyrLK(
imgA
imgB
pyrA
pyrB
cornersA
cornersB
corner_count
cvSize( win_sizewin_size )
5
features_found
feature_errors
cvTermCriteria( CV_TERMCRIT_ITER | CV_TERMCRIT_EPS 20 .3 )
0
);
/
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-07-03 21:38 学习OpenCV(中文标签版)以及随书源码\
目录 0 2014-07-03 21:38 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\
文件 6148 2008-10-07 15:10 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\.DS_Store
文件 189623 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\adrian.jpg
文件 373704 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\agaricus-lepiota.data
目录 0 2014-07-03 21:38 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\
文件 6148 2008-10-07 15:08 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\.DS_Store
文件 317775 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0214.jpg
文件 317832 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0214L.jpg
文件 325383 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0215.jpg
文件 325446 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0215L.jpg
文件 302958 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0217.jpg
文件 302321 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0217L.jpg
文件 296209 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0218.jpg
文件 295342 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0218L.jpg
文件 297508 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0219.jpg
文件 297073 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0219L.jpg
文件 348274 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0220.jpg
文件 348262 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\IMG_0220L.jpg
文件 33280 2009-12-30 19:24 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\birdseye\Thumbs.db
文件 5237 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\BlueCup.jpg
目录 0 2014-07-03 21:38 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\
文件 463757 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0191.jpg
文件 407260 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0192.jpg
文件 447239 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0193.jpg
文件 451479 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0194.jpg
文件 490611 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0195.jpg
文件 450338 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0196.jpg
文件 433052 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0197.jpg
文件 429153 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0198.jpg
文件 431073 2008-10-07 10:00 学习OpenCV(中文标签版)以及随书源码\LearningOpenCV_Code\calibration\IMG_0199.jpg
............此处省略150个文件信息
- 上一篇:运筹学导论第9版
- 下一篇:IWR1642学习文档
相关资源
- 易语言取微云数据V1源码易语言取微云
- 易语言Excel多表对应处理源码
- 易语言取word打开、另存为对话框窗口
- 易语言EXCEL另存为CSV文件源码
- delphi百度地图源码
- 易语言EMS快递查询源码
- 易语言快递查询源码
- 易语言查询79种快递源码
- 易语言搜搜mp3源码
- 易语言迅雷补丁源码
- 易语言高仿迅雷5安装包源码
- bootstrap demo 源码大全
- springboot整合RabbitMQ实现延时队列的两
- 关于Spring MVC项目maven中通过fileupload上
- 新一代Lora芯片sx126x的驱动源码
- 易语言版迅雷视频转换器源码
- 今日头条源码.zip
- CtrlAltQ全屏截图源码
- 易语言全屏截图源码
- 百度图片识别源码.rar
- 易语言穿越火线辅助程序源码
- WINDOWS内核安全编程 寒江独钓 光盘源
- 寒江独钓-Windows内核安全编程(完整版
- DevExpress 15.1.6 源码 全 百度云
- 很久以前的MUD游戏源码和mudos
- 易语言屏幕锁屏工具源码
- 易语言Beep应用例程源码
- 易语言API的用法之beep源码
- 易语言Beep卡农源码
- 易语言DLL函数查看器源码
评论
共有 条评论