blob: 1930eae4408491fa8db07bf67fcf90fc82c5112f [file] [log] [blame]
Yash Chainani5458dea2022-06-29 21:05:02 -07001#ifndef __OPENCV_FEATURES_2D_AKAZE2_HPP__
2#define __OPENCV_FEATURES_2D_AKAZE2_HPP__
3
4#include <opencv2/core.hpp>
5#include <opencv2/features2d.hpp>
6
7/*
8 This file is the excerpt from opencv/feature2d.hpp to provide the local AKAZE
9 class definition. In addition, the class name is changed from AKAZE to AKAZE2
10 to avoid possible confusion between this local variant and OpenCV's original
11 AKAZE class.
12*/
13
14namespace cv {
15
16//! @addtogroup features2d
17//! @{
18
19//! @addtogroup features2d_main
20//! @{
21
22/** @brief Class implementing the AKAZE keypoint detector and descriptor
23extractor, described in @cite ANB13 . :
24@note AKAZE descriptors can only be used with KAZE or AKAZE keypoints. Try to
25avoid using *extract* and *detect* instead of *operator()* due to performance
26reasons. .. [ANB13] Fast Explicit Diffusion for Accelerated Features in
27Nonlinear Scale Spaces. Pablo F. Alcantarilla, Jesús Nuevo and Adrien Bartoli.
28In British Machine Vision Conference (BMVC), Bristol, UK, September 2013.
29 */
30class CV_EXPORTS_W AKAZE2 : public Feature2D {
31 public:
32 // AKAZE descriptor type
33 enum {
34 DESCRIPTOR_KAZE_UPRIGHT =
35 2, ///< Upright descriptors, not invariant to rotation
36 DESCRIPTOR_KAZE = 3,
37 DESCRIPTOR_MLDB_UPRIGHT =
38 4, ///< Upright descriptors, not invariant to rotation
39 DESCRIPTOR_MLDB = 5
40 };
41
42 /** @brief The AKAZE constructor
43 @param descriptor_type Type of the extracted descriptor: DESCRIPTOR_KAZE,
44 DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT.
45 @param descriptor_size Size of the descriptor in bits. 0 -\> Full size
46 @param descriptor_channels Number of channels in the descriptor (1, 2, 3)
47 @param threshold Detector response threshold to accept point
48 @param nOctaves Maximum octave evolution of the image
49 @param nOctaveLayers Default number of sublevels per scale level
50 @param diffusivity Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or
51 DIFF_CHARBONNIER
52 */
53 CV_WRAP static Ptr<AKAZE2> create(
54 int descriptor_type = AKAZE::DESCRIPTOR_MLDB, int descriptor_size = 0,
55 int descriptor_channels = 3, float threshold = 0.001f, int nOctaves = 4,
56 int nOctaveLayers = 4, int diffusivity = KAZE::DIFF_PM_G2);
57
58 CV_WRAP virtual void setDescriptorType(int dtype) = 0;
59 CV_WRAP virtual int getDescriptorType() const = 0;
60
61 CV_WRAP virtual void setDescriptorSize(int dsize) = 0;
62 CV_WRAP virtual int getDescriptorSize() const = 0;
63
64 CV_WRAP virtual void setDescriptorChannels(int dch) = 0;
65 CV_WRAP virtual int getDescriptorChannels() const = 0;
66
67 CV_WRAP virtual void setThreshold(double threshold) = 0;
68 CV_WRAP virtual double getThreshold() const = 0;
69
70 CV_WRAP virtual void setNOctaves(int octaves) = 0;
71 CV_WRAP virtual int getNOctaves() const = 0;
72
73 CV_WRAP virtual void setNOctaveLayers(int octaveLayers) = 0;
74 CV_WRAP virtual int getNOctaveLayers() const = 0;
75
76 CV_WRAP virtual void setDiffusivity(int diff) = 0;
77 CV_WRAP virtual int getDiffusivity() const = 0;
78};
79
80//! @} features2d_main
81
82//! @} features2d
83
84} /* namespace cv */
85
86#endif