资源简介
Learning Open-CV 源码,开源分享本来就不应该收积分,所以我没有设置分数
代码片段和文件信息
// 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 2008-10-07 15:07 LearningOpenCV_Code\
文件 6148 2008-10-07 15:10 LearningOpenCV_Code\.DS_Store
目录 0 2008-10-07 15:11 __MACOSX\
目录 0 2008-10-07 15:11 __MACOSX\LearningOpenCV_Code\
文件 82 2008-10-07 15:10 __MACOSX\LearningOpenCV_Code\._.DS_Store
文件 189623 2008-10-07 10:00 LearningOpenCV_Code\adrian.jpg
文件 373704 2008-10-07 10:00 LearningOpenCV_Code\agaricus-lepiota.data
目录 0 2008-10-07 15:08 LearningOpenCV_Code\birdseye\
文件 6148 2008-10-07 15:08 LearningOpenCV_Code\birdseye\.DS_Store
目录 0 2008-10-07 15:11 __MACOSX\LearningOpenCV_Code\birdseye\
文件 82 2008-10-07 15:08 __MACOSX\LearningOpenCV_Code\birdseye\._.DS_Store
文件 317775 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0214.jpg
文件 317832 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0214L.jpg
文件 325383 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0215.jpg
文件 325446 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0215L.jpg
文件 302958 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0217.jpg
文件 302321 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0217L.jpg
文件 296209 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0218.jpg
文件 295342 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0218L.jpg
文件 297508 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0219.jpg
文件 297073 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0219L.jpg
文件 348274 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0220.jpg
文件 348262 2008-10-07 10:00 LearningOpenCV_Code\birdseye\IMG_0220L.jpg
文件 5237 2008-10-07 10:00 LearningOpenCV_Code\BlueCup.jpg
目录 0 2008-10-07 15:09 LearningOpenCV_Code\calibration\
文件 463757 2008-10-07 10:00 LearningOpenCV_Code\calibration\IMG_0191.jpg
文件 407260 2008-10-07 10:00 LearningOpenCV_Code\calibration\IMG_0192.jpg
文件 447239 2008-10-07 10:00 LearningOpenCV_Code\calibration\IMG_0193.jpg
文件 451479 2008-10-07 10:00 LearningOpenCV_Code\calibration\IMG_0194.jpg
文件 490611 2008-10-07 10:00 LearningOpenCV_Code\calibration\IMG_0195.jpg
文件 450338 2008-10-07 10:00 LearningOpenCV_Code\calibration\IMG_0196.jpg
............此处省略152个文件信息
相关资源
- perl语言学习书籍大全
- DeepLearning关于稀疏自编码器的资料
- 《终极算法:机器学习和人工智能如
- Neural Networks and Deep Learning
- hands-on machine learning with scikit-learn an
- The hundred-page machine learning book-Andriy
- The Hundred-Page Machine Learning
- 深度学习Deep Learning英文原版高清.pd
- Learning From Data plus 超清完整版 林轩田
- Deep Learning深度学习(Bengio等著)中英
- Real-WorldMachineLearning.pdf
- machinelearning中文版+英文版+课件ppt.r
- 《动手学深度学习》(Dive into Deep L
- Ian Goodfellow等人的Deep Learning 英文版含
- 深度学习 AI圣经 deep learning-张志华-
- Springer-Modern.Multivariate.Statistical.Techn
- Neural Network and Deep Learning高清中英文双
- Introduction-to-Statistical-Machine-Learning.p
- Deep Learning中文版
- Statistical Learning with Sparsity_The Lasso a
- LearningOpenCV中文版-于仕琪书源码.zip
- 深度学习基础(FundamentalsofDeepLearnin
- UnderstandingDeepLearninginOneDay.rar
- PRML pattern recognition and machine learning (
- 《生成式深度学习》Generative Deep Lea
- 吴恩达deeplearning课程作业及需要的的
- deeplearning.ai_notebook.zip
- 吴恩达老师deeplearning.ai-全部课件
- learning webrtc 中文版
- zw_PatternRecognitionAndMachineLearning.zip
评论
共有 条评论