Skip to content

Commit 133622e

Browse files
committed
can now use opencv 3.0
1 parent 4cd5041 commit 133622e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CMT.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ void CMT::initialize(const Mat im_gray, const Rect rect)
1919
Point2f center = Point2f(rect.x + rect.width/2.0, rect.y + rect.height/2.0);
2020

2121
//Initialize detector and descriptor
22+
#if CV_MAJOR_VERSION > 2
23+
detector = cv::FastFeatureDetector::create();
24+
descriptor = cv::BRISK::create();
25+
#else
2226
detector = FeatureDetector::create(str_detector);
2327
descriptor = DescriptorExtractor::create(str_descriptor);
28+
#endif
2429

2530
//Get initial keypoints in whole image and compute their descriptors
2631
vector<KeyPoint> keypoints;

gui.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include "gui.h"
22

33
#include <opencv2/highgui/highgui.hpp>
4+
#if CV_MAJOR_VERSION > 2
5+
# include <opencv2/imgproc.hpp>
6+
#endif
47

58
using cv::setMouseCallback;
69
using cv::Point;

0 commit comments

Comments
 (0)