NDEVR
API Documentation
ORBextractor.h
1#ifndef ORBEXTRACTOR_H
2#define ORBEXTRACTOR_H
3#include "Base/Headers/Vector.hpp"
4#include "Base/Headers/Buffer.hpp"
5#include "Base/Headers/Buffer.hpp"
6#include <list>
7#include <opencv2/opencv.hpp>
8
9
10namespace NDEVR
11{
12
15{
16public:
19 :bNoMore(false)
20 {}
21
29
30 PrimitiveAlignedBuffer<cv::KeyPoint, 32> vKeys;
31 cv::Point2i UL, UR, BL, BR;
32 bool bNoMore;
33};
34
41{
42public:
43
44 enum {HARRIS_SCORE=0, FAST_SCORE=1 };
45
53 ORBextractor(uint04 nfeatures, float scaleFactor
54 , uint04 nlevels, uint04 iniThFAST, uint04 minThFAST);
55
63 uint04 extract( cv::InputArray _image,
64 PrimitiveAlignedBuffer<cv::KeyPoint, 32>& _keypoints,
65 cv::OutputArray _descriptors, const Vector<2, uint04> vLappingArea);
66
70 uint04 levelCount() { return nlevels;}
71
75 fltp04 GetScaleFactor(){ return scaleFactor; }
76
80 const Buffer<float>& scaleFactors(){ return mvScaleFactor; }
81
85 const Buffer<float>& inverseScaleFactors() { return mvInvScaleFactor; }
86
90 const Buffer<float>& scaleSigmaSquares(){ return mvLevelSigma2; }
91
95 const Buffer<float>& inverseScaleSigmaSquares(){ return mvInvLevelSigma2; }
96
98
99protected:
100 void ComputePyramid(cv::Mat image);
101 void ComputeKeyPointsOctTree(Buffer<PrimitiveAlignedBuffer<cv::KeyPoint, 32>>& allKeypoints);
102 void DistributeOctTree(const PrimitiveAlignedBuffer<cv::KeyPoint, 32>& vToDistributeKeys, uint04 minX,
103 uint04 maxX, uint04 minY, uint04 maxY, uint04 nFeatures, PrimitiveAlignedBuffer<cv::KeyPoint, 32>& keypoint_buffer);
104
105 void ComputeKeyPointsOld(Buffer<PrimitiveAlignedBuffer<cv::KeyPoint, 32>>& allKeypoints);
106 //used for caching
108 PrimitiveAlignedBuffer<cv::KeyPoint, 32> m_vto_distribute_keys;
109 //must be std::vector for comms to opencv
110 std::vector<cv::KeyPoint> m_cell_keys;
111 //Data
112 Buffer<cv::Point> pattern;
113
114 uint04 nfeatures = 0;
115 fltp04 scaleFactor = 0.0f;
116 uint04 nlevels = 0;
117 uint04 iniThFAST = 0;
118 uint04 minThFAST = 0;
119
120 Buffer<uint04> mnFeaturesPerLevel;
121
122 Buffer<uint04> umax;
123
124 Buffer<float> mvScaleFactor;
125 Buffer<float> mvInvScaleFactor;
126 Buffer<float> mvLevelSigma2;
127 Buffer<float> mvInvLevelSigma2;
128};
129
130} //namespace ORB_SLAM
131
132#endif
133
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
ExtractorNode()
Default constructor.
cv::Point2i BR
Corner coordinates (upper-left, upper-right, bottom-left, bottom-right).
PrimitiveAlignedBuffer< cv::KeyPoint, 32 > vKeys
Keypoints contained in this node.
bool bNoMore
True if this node cannot be further divided.
void DivideNode(ExtractorNode &n1, ExtractorNode &n2, ExtractorNode &n3, ExtractorNode &n4)
Divides this node into four child nodes.
const Buffer< float > & inverseScaleSigmaSquares()
Returns the inverse sigma squared per pyramid level.
uint04 extract(cv::InputArray _image, PrimitiveAlignedBuffer< cv::KeyPoint, 32 > &_keypoints, cv::OutputArray _descriptors, const Vector< 2, uint04 > vLappingArea)
Extracts ORB features and descriptors from an image.
uint04 levelCount()
Returns the number of pyramid levels.
ORBextractor(uint04 nfeatures, float scaleFactor, uint04 nlevels, uint04 iniThFAST, uint04 minThFAST)
Constructs the ORB extractor.
const Buffer< float > & scaleFactors()
Returns the scale factor per pyramid level.
const Buffer< float > & scaleSigmaSquares()
Returns the sigma squared per pyramid level.
const Buffer< float > & inverseScaleFactors()
Returns the inverse scale factor per pyramid level.
Buffer< cv::Mat > mvImagePyramid
Image pyramid for multi-scale extraction.
fltp04 GetScaleFactor()
Returns the inter-level scale factor.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...