Mercurial Hosting > traffic-intelligence
comparison c/cvutils.cpp @ 802:d3e8dd9f3ca4 dev
current dev for drone stabilization
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 31 May 2016 17:59:35 -0400 |
parents | 1e3c7fe21a38 |
children | f7cf43b5ad3b |
comparison
equal
deleted
inserted
replaced
800:2cade72d75ad | 802:d3e8dd9f3ca4 |
---|---|
47 | 47 |
48 for (unsigned int i=0; i<kpts.size(); i++) | 48 for (unsigned int i=0; i<kpts.size(); i++) |
49 pts.push_back(kpts[i].pt); | 49 pts.push_back(kpts[i].pt); |
50 } | 50 } |
51 | 51 |
52 // IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels) { return ::allocateImage(cvSize(width, height), depth, channels);} | |
53 | |
54 // IplImage* allocateImage(const CvSize& size, const int& depth, const int& channels) { | |
55 // IplImage* image = cvCreateImage(size, depth, channels); | |
56 | |
57 // if (!image) { | |
58 // cerr << "Error: Couldn't allocate image. Out of memory?\n" << endl; | |
59 // exit(-1); | |
60 // } | |
61 | |
62 // return image; | |
63 // } | |
64 | |
65 // int goToFrameNum(CvCapture* inputVideo, const int& currentFrameNum, const int& targetFrameNum) { | |
66 // int frameNum = currentFrameNum; | |
67 // if (currentFrameNum > targetFrameNum) { | |
68 // cerr << "Current frame number " << currentFrameNum << " is after the target frame number " << targetFrameNum << "." << endl; | |
69 // } else if (currentFrameNum < targetFrameNum) { | |
70 // IplImage* frame = cvQueryFrame(inputVideo); | |
71 // frameNum++; | |
72 // while (frame && frameNum<targetFrameNum) { | |
73 // frame = cvQueryFrame(inputVideo); | |
74 // frameNum++; | |
75 // } | |
76 // } | |
77 | |
78 // return frameNum; | |
79 // } | |
80 | |
81 const Scalar Colors::color[] = {Colors::red(), | 52 const Scalar Colors::color[] = {Colors::red(), |
82 Colors::green(), | 53 Colors::green(), |
83 Colors::blue(), | 54 Colors::blue(), |
84 Colors::cyan(), | 55 Colors::cyan(), |
85 Colors::magenta(), | 56 Colors::magenta(), |