Mercurial Hosting > traffic-intelligence
comparison include/cvutils.hpp @ 131:3a11dba30655
added colors
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 17 Aug 2011 19:03:11 -0400 |
parents | 536510f60854 |
children | 47329bd16cc0 |
comparison
equal
deleted
inserted
replaced
130:2a6e7a9a5c53 | 131:3a11dba30655 |
---|---|
5 #include "opencv2/features2d/features2d.hpp" | 5 #include "opencv2/features2d/features2d.hpp" |
6 | 6 |
7 class CvCapture; | 7 class CvCapture; |
8 | 8 |
9 /// constant that indicates if the image should be flipped | 9 /// constant that indicates if the image should be flipped |
10 | |
11 //static const int flipImage = CV_CVTIMG_FLIP; | 10 //static const int flipImage = CV_CVTIMG_FLIP; |
12 | 11 |
13 void keyPoints2Points(const std::vector<cv::KeyPoint>& kpts, std::vector<cv::Point2f>& pts, const bool& clearPts = true); | 12 void keyPoints2Points(const std::vector<cv::KeyPoint>& kpts, std::vector<cv::Point2f>& pts, const bool& clearPts = true); |
14 | 13 |
15 /** Allocates a new IplImage. */ | 14 /** Allocates a new IplImage. */ |
20 /** Goes to the target frame number, by querying frame, | 19 /** Goes to the target frame number, by querying frame, |
21 supposing the video input is currently at current frame number. | 20 supposing the video input is currently at current frame number. |
22 Returns the frame number that was reached.*/ | 21 Returns the frame number that was reached.*/ |
23 int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum); | 22 int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum); |
24 | 23 |
24 /// Pre-defined colors | |
25 class Colors { | |
26 public: | |
27 static const int nColors = 8; | |
28 static const cv::Scalar color[]; | |
29 | |
30 static cv::Scalar black(void); | |
31 static cv::Scalar red(void); | |
32 static cv::Scalar green(void); | |
33 static cv::Scalar blue(void); | |
34 static cv::Scalar white(void); | |
35 static cv::Scalar magenta(void); | |
36 static cv::Scalar cyan(void); | |
37 static cv::Scalar yellow(void); | |
38 | |
39 /** Maps integers to primary colors. */ | |
40 static cv::Scalar color3(const int& num); | |
41 static cv::Scalar color8(const int& num); | |
42 }; | |
43 | |
25 #endif | 44 #endif |