-
Notifications
You must be signed in to change notification settings - Fork 6
/
ORB.h
40 lines (31 loc) · 983 Bytes
/
ORB.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <string>
using namespace std;
const double pi = 3.1415926; // pi
typedef vector<bool> DescType; // type of descriptor, 256 bools
class ORB
{
public:
/**
* compute the angle for ORB descriptor
* @param [in] image input image
* @param [in|out] detected keypoints
*/
void computeAngle(const cv::Mat& image, vector<cv::KeyPoint>& keypoints);
/**
* compute ORB descriptor
* @param [in] image the input image
* @param [in] keypoints detected keypoints
* @param [out] desc descriptor
*/
void computeORBDesc(const cv::Mat& image, vector<cv::KeyPoint>& keypoints, vector<DescType>& desc);
/**
* brute-force match two sets of descriptors
* @param desc1 the first descriptor
* @param desc2 the second descriptor
* @param matches matches of two images
*/
void bfMatch(const vector<DescType>& desc1, const vector<DescType>& desc2, vector<cv::DMatch>& matches);
};