Program Listing for File KAZEConfig.h

Return to documentation for file (aslam_cv2/aslam_cv_detector/include/kaze/KAZEConfig.h)

#pragma once

/* ************************************************************************* */
// OpenCV
#include <opencv2/core/core.hpp>

// OpenMP
#ifdef _OPENMP
#include <omp.h>
#define OMP_MAX_THREADS 16
#endif

/* ************************************************************************* */
enum DESCRIPTOR_TYPE {
  SURF_UPRIGHT = 0,
  SURF = 1,
  SURF_EXTENDED_UPRIGHT = 2,
  SURF_EXTENDED = 3,
  MSURF_UPRIGHT = 4,
  MSURF = 5,
  MSURF_EXTENDED_UPRIGHT = 6,
  MSURF_EXTENDED = 7,
  GSURF_UPRIGHT = 8,
  GSURF = 9,
  GSURF_EXTENDED_UPRIGHT = 10,
  GSURF_EXTENDED = 11
};

/* ************************************************************************* */
enum DIFFUSIVITY_TYPE {
  PM_G1 = 0,
  PM_G2 = 1,
  WEICKERT = 2,
  CHARBONNIER = 3
};

/* ************************************************************************* */
struct KAZEOptions {

  KAZEOptions() {
    soffset = 1.60;
    omax = 4;
    nsublevels = 4;
    dthreshold = 0.001;
    min_dthreshold = 0.000001f;
    use_fed = true;
    descriptor = MSURF;
    diffusivity = PM_G2;
    sderivatives = 1.0;
    kcontrast = 0.001f;
    kcontrast_percentile = 0.7f;
    kcontrast_nbins = 300;
    save_scale_space = false;
    save_keypoints = false;
    verbosity = false;
  }

  float soffset;
  int omax;
  int nsublevels;
  int img_width;
  int img_height;

  DIFFUSIVITY_TYPE diffusivity;
  float kcontrast;
  float kcontrast_percentile;
  size_t kcontrast_nbins;
  float sderivatives;
  float dthreshold;
  float min_dthreshold;

  bool use_fed;

  DESCRIPTOR_TYPE descriptor;

  bool save_scale_space;
  bool save_keypoints;
  bool verbosity;
};

/* ************************************************************************* */
struct TEvolution {
  cv::Mat Lx, Ly;
  cv::Mat Lxx, Lxy, Lyy;
  cv::Mat Lt;
  cv::Mat Lsmooth;
  cv::Mat Ldet;
  float etime;
  float esigma;
  int octave;
  int sublevel;
  int sigma_size;
};