Mercurial Hosting > traffic-intelligence
annotate include/cvutils.hpp @ 127:d19d6e63dd77
simple feature tracking and drawing working
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 17 Aug 2011 01:25:13 -0400 |
parents | 336926453b28 |
children | 536510f60854 |
rev | line source |
---|---|
9 | 1 #ifndef CVUTILS_HPP |
2 #define CVUTILS_HPP | |
3 | |
126
336926453b28
added conversion function from keypoint vector to point vector and cleaned headers
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
70
diff
changeset
|
4 #include "opencv2/core/core.hpp" |
336926453b28
added conversion function from keypoint vector to point vector and cleaned headers
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
70
diff
changeset
|
5 #include "opencv2/features2d/features2d.hpp" |
9 | 6 |
12
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
7 class CvCapture; |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
8 |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
9 /// constant that indicates if the image should be flipped |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
10 |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
11 //static const int flipImage = CV_CVTIMG_FLIP; |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
12 |
127
d19d6e63dd77
simple feature tracking and drawing working
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
126
diff
changeset
|
13 void keyPoints2Points(const std::vector<cv::KeyPoint>& kpts, std::vector<cv::Point2f>& pts); |
126
336926453b28
added conversion function from keypoint vector to point vector and cleaned headers
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
70
diff
changeset
|
14 |
12
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
15 /** Allocates a new IplImage. */ |
9 | 16 IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels); |
17 | |
18 IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels); | |
19 | |
12
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
20 /** Goes to the target frame number, by querying frame, |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
21 supposing the video input is currently at current frame number. |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
22 Returns the frame number that was reached.*/ |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
23 int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum); |
11
e77e2fd69b02
modularized code (not compiling)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
24 |
9 | 25 #endif |