FeatureTest.cpp
1 | #include <opencv2/core/core.hpp> |
---|---|
2 | #include <opencv2/features2d/features2d.hpp> |
3 | |
4 | using namespace std; |
5 | using namespace cv; |
6 | |
7 | int main(int argc, char * argv[]) |
8 | { |
9 | try
|
10 | { |
11 | const int briefBorderSize = 28; |
12 | |
13 | Mat testImg(1000, 1000, CV_8U); |
14 | randu(testImg, Scalar(0), Scalar(255)); |
15 | |
16 | vector<KeyPoint> keypoints; |
17 | keypoints.push_back( |
18 | KeyPoint((testImg.cols - 1) - briefBorderSize + 0.9f, |
19 | briefBorderSize, |
20 | 0.f));
|
21 | |
22 | Mat descriptors; |
23 | BriefDescriptorExtractor de; |
24 | de.compute(testImg, keypoints, descriptors); |
25 | } |
26 | catch(std::exception & e)
|
27 | { |
28 | return -1; |
29 | } |
30 | return 0; |
31 | } |