SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
CVFeatureManager.h
Go to the documentation of this file.
1 /**
2  * \file CVFeatureManager.h
3  * \date Autumn 2016
4  * \authors Marcus Hudritsch
5  * \copyright http://opensource.org/licenses/GPL-3.0
6  * \remarks Please use clangformat to format the code. See more code style on
7  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
8 */
9 
10 #ifndef CVFEATUREMANAGER_H
11 #define CVFEATUREMANAGER_H
12 
13 #include <CVTypedefs.h>
14 
15 //-----------------------------------------------------------------------------
16 //! OpenCV feature type
18 {
19  FT_SIFT, //!<
20  FT_SURF, //!<
21  FT_ORB //!<
22 };
23 //-----------------------------------------------------------------------------
24 //! Feature detector-decriptor types
26 {
27 #ifndef __EMSCRIPTEN__
29 #endif
32 #ifndef __EMSCRIPTEN__
34 #endif
36 };
37 //-----------------------------------------------------------------------------
38 //! Wrapper class around OpenCV feature detector & describer
40 {
41 public:
44 
45  void detect(CVInputArray image,
46  CVVKeyPoint& keypoints,
47  CVInputArray mask = cv::noArray());
48 
49  void describe(CVInputArray image,
50  CVVKeyPoint& keypoints,
51  CVOutputArray descriptors);
52 
54  CVVKeyPoint& keypoints,
55  CVOutputArray descriptors,
56  CVInputArray mask = cv::noArray());
57 
58  void createDetectorDescriptor(CVDetectDescribeType detectDescribeType);
59 
60  void setDetectorDescriptor(CVDetectDescribeType detectDescribeType,
61  cv::Ptr<CVFeature2D> detector,
62  cv::Ptr<CVFeature2D> descriptor);
63  // Getter
65 
66 private:
67  CVDetectDescribeType _type; //!< Type of detector-descriptor pair
68  cv::Ptr<CVFeature2D> _detector; //!< CV smart pointer to the OpenCV feature detector
69  cv::Ptr<CVFeature2D> _descriptor; //!< CV smart pointer to the OpenCV descriptor extractor
70 };
71 //-----------------------------------------------------------------------------
72 #endif // CVFEATUREMANAGER_H
CVDetectDescribeType
Feature detector-decriptor types.
@ DDT_ORB_ORB
@ DDT_SURF_SURF
@ DDT_FAST_BRIEF
@ DDT_SIFT_SIFT
@ DDT_RAUL_RAUL
CVFeatureType
OpenCV feature type.
@ FT_SIFT
@ FT_ORB
@ FT_SURF
cv::InputArray CVInputArray
Definition: CVTypedefs.h:63
cv::OutputArray CVOutputArray
Definition: CVTypedefs.h:64
vector< cv::KeyPoint > CVVKeyPoint
Definition: CVTypedefs.h:88
Wrapper class around OpenCV feature detector & describer.
CVDetectDescribeType _type
Type of detector-descriptor pair.
CVDetectDescribeType type()
void describe(CVInputArray image, CVVKeyPoint &keypoints, CVOutputArray descriptors)
void setDetectorDescriptor(CVDetectDescribeType detectDescribeType, cv::Ptr< CVFeature2D > detector, cv::Ptr< CVFeature2D > descriptor)
Sets the detector and decriptor to the passed ones.
void createDetectorDescriptor(CVDetectDescribeType detectDescribeType)
Creates a detector and decriptor to the passed type.
cv::Ptr< CVFeature2D > _descriptor
CV smart pointer to the OpenCV descriptor extractor.
void detect(CVInputArray image, CVVKeyPoint &keypoints, CVInputArray mask=cv::noArray())
void detectAndDescribe(CVInputArray image, CVVKeyPoint &keypoints, CVOutputArray descriptors, CVInputArray mask=cv::noArray())
cv::Ptr< CVFeature2D > _detector
CV smart pointer to the OpenCV feature detector.