~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/modules/features2d/src/kaze/KAZEFeatures.h

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/**
 
3
 * @file KAZE.h
 
4
 * @brief Main program for detecting and computing descriptors in a nonlinear
 
5
 * scale space
 
6
 * @date Jan 21, 2012
 
7
 * @author Pablo F. Alcantarilla
 
8
 */
 
9
 
 
10
#ifndef __OPENCV_FEATURES_2D_KAZE_FEATURES_H__
 
11
#define __OPENCV_FEATURES_2D_KAZE_FEATURES_H__
 
12
 
 
13
/* ************************************************************************* */
 
14
// Includes
 
15
#include "KAZEConfig.h"
 
16
#include "nldiffusion_functions.h"
 
17
#include "fed.h"
 
18
#include "TEvolution.h"
 
19
 
 
20
namespace cv
 
21
{
 
22
 
 
23
/* ************************************************************************* */
 
24
// KAZE Class Declaration
 
25
class KAZEFeatures
 
26
{
 
27
private:
 
28
 
 
29
    /// Parameters of the Nonlinear diffusion class
 
30
    KAZEOptions options_;               ///< Configuration options for KAZE
 
31
    std::vector<TEvolution> evolution_;    ///< Vector of nonlinear diffusion evolution
 
32
 
 
33
    /// Vector of keypoint vectors for finding extrema in multiple threads
 
34
    std::vector<std::vector<cv::KeyPoint> > kpts_par_;
 
35
 
 
36
    /// FED parameters
 
37
    int ncycles_;                  ///< Number of cycles
 
38
    bool reordering_;              ///< Flag for reordering time steps
 
39
    std::vector<std::vector<float > > tsteps_;  ///< Vector of FED dynamic time steps
 
40
    std::vector<int> nsteps_;      ///< Vector of number of steps per cycle
 
41
 
 
42
public:
 
43
 
 
44
    /// Constructor
 
45
    KAZEFeatures(KAZEOptions& options);
 
46
 
 
47
    /// Public methods for KAZE interface
 
48
    void Allocate_Memory_Evolution(void);
 
49
    int Create_Nonlinear_Scale_Space(const cv::Mat& img);
 
50
    void Feature_Detection(std::vector<cv::KeyPoint>& kpts);
 
51
    void Feature_Description(std::vector<cv::KeyPoint>& kpts, cv::Mat& desc);
 
52
    static void Compute_Main_Orientation(cv::KeyPoint& kpt, const std::vector<TEvolution>& evolution_, const KAZEOptions& options);
 
53
 
 
54
    /// Feature Detection Methods
 
55
    void Compute_KContrast(const cv::Mat& img, const float& kper);
 
56
    void Compute_Multiscale_Derivatives(void);
 
57
    void Compute_Detector_Response(void);
 
58
    void Determinant_Hessian(std::vector<cv::KeyPoint>& kpts);
 
59
    void Do_Subpixel_Refinement(std::vector<cv::KeyPoint>& kpts);
 
60
};
 
61
 
 
62
}
 
63
 
 
64
#endif