Mercurial Hosting > traffic-intelligence
annotate include/cvutils.hpp @ 15:3ead4bcd001c
cleaned optical flow
author | Nicolas Saunier <nico@confins.net> |
---|---|
date | Sun, 15 Nov 2009 01:04:10 -0500 |
parents | ff5403319cec |
children | a52653dca25d |
rev | line source |
---|---|
9 | 1 #ifndef CVUTILS_HPP |
2 #define CVUTILS_HPP | |
3 | |
4 #include "opencv/cxtypes.h" | |
5 | |
12
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
6 class CvCapture; |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
7 |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
8 /// constant that indicates if the image should be flipped |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
9 |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
10 //static const int flipImage = CV_CVTIMG_FLIP; |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
11 |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
12 /** Allocates a new IplImage. */ |
9 | 13 IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels); |
14 | |
15 IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels); | |
16 | |
12
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
17 /** Goes to the target frame number, by querying frame, |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
18 supposing the video input is currently at current frame number. |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
19 Returns the frame number that was reached.*/ |
ff5403319cec
optical flow demo working
Nicolas Saunier <nico@confins.net>
parents:
11
diff
changeset
|
20 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
|
21 |
9 | 22 #endif |