Commit 1a5fcd71 authored by Ievgen Khvedchenia's avatar Ievgen Khvedchenia

Refactor of KAZE and AKAZE:

1) Clean-up from the unused code
2) Remove of SURF extraction method
3) Enabled threading for KAZE extraction
4) Exposed new properties for runtime configuration
parent 220de140
...@@ -893,7 +893,15 @@ KAZE implementation ...@@ -893,7 +893,15 @@ KAZE implementation
class CV_EXPORTS_W KAZE : public Feature2D class CV_EXPORTS_W KAZE : public Feature2D
{ {
public: public:
CV_WRAP explicit KAZE(bool _extended = false);
/// AKAZE Descriptor Type
enum DESCRIPTOR_TYPE {
DESCRIPTOR_MSURF = 1,
DESCRIPTOR_GSURF = 2
};
CV_WRAP KAZE();
CV_WRAP explicit KAZE(DESCRIPTOR_TYPE type, bool _extended, bool _upright);
virtual ~KAZE(); virtual ~KAZE();
...@@ -917,7 +925,9 @@ protected: ...@@ -917,7 +925,9 @@ protected:
void detectImpl(InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask) const; void detectImpl(InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask) const;
void computeImpl(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) const; void computeImpl(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) const;
CV_PROP int descriptor;
CV_PROP bool extended; CV_PROP bool extended;
CV_PROP bool upright;
}; };
/*! /*!
...@@ -926,7 +936,16 @@ AKAZE implementation ...@@ -926,7 +936,16 @@ AKAZE implementation
class CV_EXPORTS_W AKAZE : public Feature2D class CV_EXPORTS_W AKAZE : public Feature2D
{ {
public: public:
CV_WRAP explicit AKAZE(int _descriptor = 5, int _descriptor_size = 0, int _descriptor_channels = 3); /// AKAZE Descriptor Type
enum DESCRIPTOR_TYPE {
DESCRIPTOR_KAZE_UPRIGHT = 2, ///< Upright descriptors, not invariant to rotation
DESCRIPTOR_KAZE = 3,
DESCRIPTOR_MLDB_UPRIGHT = 4, ///< Upright descriptors, not invariant to rotation
DESCRIPTOR_MLDB = 5
};
CV_WRAP AKAZE();
CV_WRAP explicit AKAZE(DESCRIPTOR_TYPE _descriptor, int _descriptor_size = 0, int _descriptor_channels = 3);
virtual ~AKAZE(); virtual ~AKAZE();
...@@ -951,8 +970,8 @@ protected: ...@@ -951,8 +970,8 @@ protected:
void computeImpl(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) const; void computeImpl(InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors) const;
void detectImpl(InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask = noArray()) const; void detectImpl(InputArray image, std::vector<KeyPoint>& keypoints, InputArray mask = noArray()) const;
CV_PROP int descriptor_channels;
CV_PROP int descriptor; CV_PROP int descriptor;
CV_PROP int descriptor_channels;
CV_PROP int descriptor_size; CV_PROP int descriptor_size;
}; };
......
...@@ -53,10 +53,16 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla13bmvc.pd ...@@ -53,10 +53,16 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla13bmvc.pd
namespace cv namespace cv
{ {
AKAZE::AKAZE()
: descriptor(DESCRIPTOR_MLDB)
, descriptor_channels(3)
, descriptor_size(0)
{
}
AKAZE::AKAZE(int _descriptor, int _descriptor_size, int _descriptor_channels) AKAZE::AKAZE(DESCRIPTOR_TYPE _descriptor, int _descriptor_size, int _descriptor_channels)
: descriptor_channels(_descriptor_channels) : descriptor(_descriptor)
, descriptor(_descriptor) , descriptor_channels(_descriptor_channels)
, descriptor_size(_descriptor_size) , descriptor_size(_descriptor_size)
{ {
...@@ -70,12 +76,14 @@ namespace cv ...@@ -70,12 +76,14 @@ namespace cv
// returns the descriptor size in bytes // returns the descriptor size in bytes
int AKAZE::descriptorSize() const int AKAZE::descriptorSize() const
{ {
if (descriptor < MLDB_UPRIGHT) switch (descriptor)
{ {
case cv::AKAZE::DESCRIPTOR_KAZE:
case cv::AKAZE::DESCRIPTOR_KAZE_UPRIGHT:
return 64; return 64;
}
else case cv::AKAZE::DESCRIPTOR_MLDB:
{ case cv::AKAZE::DESCRIPTOR_MLDB_UPRIGHT:
// We use the full length binary descriptor -> 486 bits // We use the full length binary descriptor -> 486 bits
if (descriptor_size == 0) if (descriptor_size == 0)
{ {
...@@ -87,32 +95,45 @@ namespace cv ...@@ -87,32 +95,45 @@ namespace cv
// We use the random bit selection length binary descriptor // We use the random bit selection length binary descriptor
return (int)ceil(descriptor_size / 8.); return (int)ceil(descriptor_size / 8.);
} }
default:
return -1;
} }
} }
// returns the descriptor type // returns the descriptor type
int AKAZE::descriptorType() const int AKAZE::descriptorType() const
{ {
if (descriptor < MLDB_UPRIGHT) switch (descriptor)
{ {
case cv::AKAZE::DESCRIPTOR_KAZE:
case cv::AKAZE::DESCRIPTOR_KAZE_UPRIGHT:
return CV_32F; return CV_32F;
}
else case cv::AKAZE::DESCRIPTOR_MLDB:
{ case cv::AKAZE::DESCRIPTOR_MLDB_UPRIGHT:
return CV_8U; return CV_8U;
default:
return -1;
} }
} }
// returns the default norm type // returns the default norm type
int AKAZE::defaultNorm() const int AKAZE::defaultNorm() const
{ {
if (descriptor < MLDB_UPRIGHT) switch (descriptor)
{
return NORM_L2;
}
else
{ {
return NORM_HAMMING; case cv::AKAZE::DESCRIPTOR_KAZE:
case cv::AKAZE::DESCRIPTOR_KAZE_UPRIGHT:
return cv::NORM_L2;
case cv::AKAZE::DESCRIPTOR_MLDB:
case cv::AKAZE::DESCRIPTOR_MLDB_UPRIGHT:
return cv::NORM_HAMMING;
default:
return -1;
} }
} }
...@@ -132,6 +153,9 @@ namespace cv ...@@ -132,6 +153,9 @@ namespace cv
cv::Mat& desc = descriptors.getMatRef(); cv::Mat& desc = descriptors.getMatRef();
AKAZEOptions options; AKAZEOptions options;
options.descriptor = static_cast<DESCRIPTOR_TYPE>(descriptor);
options.descriptor_channels = descriptor_channels;
options.descriptor_size = descriptor_size;
options.img_width = img.cols; options.img_width = img.cols;
options.img_height = img.rows; options.img_height = img.rows;
...@@ -164,6 +188,9 @@ namespace cv ...@@ -164,6 +188,9 @@ namespace cv
img.convertTo(img1_32, CV_32F, 1.0 / 255.0, 0); img.convertTo(img1_32, CV_32F, 1.0 / 255.0, 0);
AKAZEOptions options; AKAZEOptions options;
options.descriptor = static_cast<DESCRIPTOR_TYPE>(descriptor);
options.descriptor_channels = descriptor_channels;
options.descriptor_size = descriptor_size;
options.img_width = img.cols; options.img_width = img.cols;
options.img_height = img.rows; options.img_height = img.rows;
...@@ -189,6 +216,9 @@ namespace cv ...@@ -189,6 +216,9 @@ namespace cv
cv::Mat& desc = descriptors.getMatRef(); cv::Mat& desc = descriptors.getMatRef();
AKAZEOptions options; AKAZEOptions options;
options.descriptor = static_cast<DESCRIPTOR_TYPE>(descriptor);
options.descriptor_channels = descriptor_channels;
options.descriptor_size = descriptor_size;
options.img_width = img.cols; options.img_width = img.cols;
options.img_height = img.rows; options.img_height = img.rows;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
/* ************************************************************************* */ /* ************************************************************************* */
// OpenCV // OpenCV
#include "precomp.hpp" #include "precomp.hpp"
#include <opencv2/features2d.hpp>
/* ************************************************************************* */ /* ************************************************************************* */
/// Lookup table for 2d gaussian (sigma = 2.5) where (0,0) is top left and (6,6) is bottom right /// Lookup table for 2d gaussian (sigma = 2.5) where (0,0) is top left and (6,6) is bottom right
...@@ -24,28 +25,16 @@ const float gauss25[7][7] = { ...@@ -24,28 +25,16 @@ const float gauss25[7][7] = {
}; };
/* ************************************************************************* */ /* ************************************************************************* */
/// AKAZE Descriptor Type /// AKAZE configuration options structure
enum DESCRIPTOR_TYPE { struct AKAZEOptions {
SURF_UPRIGHT = 0, ///< Upright descriptors, not invariant to rotation
SURF = 1,
MSURF_UPRIGHT = 2, ///< Upright descriptors, not invariant to rotation
MSURF = 3,
MLDB_UPRIGHT = 4, ///< Upright descriptors, not invariant to rotation
MLDB = 5
};
/* ************************************************************************* */ /// AKAZE Diffusivities
/// AKAZE Diffusivities enum DIFFUSIVITY_TYPE {
enum DIFFUSIVITY_TYPE {
PM_G1 = 0, PM_G1 = 0,
PM_G2 = 1, PM_G2 = 1,
WEICKERT = 2, WEICKERT = 2,
CHARBONNIER = 3 CHARBONNIER = 3
}; };
/* ************************************************************************* */
/// AKAZE configuration options structure
struct AKAZEOptions {
AKAZEOptions() AKAZEOptions()
: omax(4) : omax(4)
...@@ -60,7 +49,7 @@ struct AKAZEOptions { ...@@ -60,7 +49,7 @@ struct AKAZEOptions {
, dthreshold(0.001f) , dthreshold(0.001f)
, min_dthreshold(0.00001f) , min_dthreshold(0.00001f)
, descriptor(MLDB) , descriptor(cv::AKAZE::DESCRIPTOR_MLDB)
, descriptor_size(0) , descriptor_size(0)
, descriptor_channels(3) , descriptor_channels(3)
, descriptor_pattern_size(10) , descriptor_pattern_size(10)
...@@ -83,7 +72,7 @@ struct AKAZEOptions { ...@@ -83,7 +72,7 @@ struct AKAZEOptions {
float dthreshold; ///< Detector response threshold to accept point float dthreshold; ///< Detector response threshold to accept point
float min_dthreshold; ///< Minimum detector threshold to accept a point float min_dthreshold; ///< Minimum detector threshold to accept a point
DESCRIPTOR_TYPE descriptor; ///< Type of descriptor cv::AKAZE::DESCRIPTOR_TYPE descriptor; ///< Type of descriptor
int descriptor_size; ///< Size of the descriptor in bits. 0->Full size int descriptor_size; ///< Size of the descriptor in bits. 0->Full size
int descriptor_channels; ///< Number of channels in the descriptor (1, 2, 3) int descriptor_channels; ///< Number of channels in the descriptor (1, 2, 3)
int descriptor_pattern_size; ///< Actual patch size is 2*pattern_size*point.scale int descriptor_pattern_size; ///< Actual patch size is 2*pattern_size*point.scale
......
...@@ -126,6 +126,8 @@ CV_INIT_ALGORITHM(GFTTDetector, "Feature2D.GFTT", ...@@ -126,6 +126,8 @@ CV_INIT_ALGORITHM(GFTTDetector, "Feature2D.GFTT",
/////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////
CV_INIT_ALGORITHM(KAZE, "Feature2D.KAZE", CV_INIT_ALGORITHM(KAZE, "Feature2D.KAZE",
obj.info()->addParam(obj, "descriptor", obj.descriptor);
obj.info()->addParam(obj, "upright", obj.upright);
obj.info()->addParam(obj, "extended", obj.extended)) obj.info()->addParam(obj, "extended", obj.extended))
/////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////
......
...@@ -52,11 +52,20 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12eccv.pd ...@@ -52,11 +52,20 @@ http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12eccv.pd
namespace cv namespace cv
{ {
KAZE::KAZE(bool _extended /* = false */) KAZE::KAZE()
: extended(_extended) : descriptor(DESCRIPTOR_MSURF)
, extended(false)
, upright(false)
{ {
} }
KAZE::KAZE(DESCRIPTOR_TYPE type, bool _extended, bool _upright)
: descriptor(type)
, extended(_extended)
, upright(_upright)
{
}
KAZE::~KAZE() KAZE::~KAZE()
{ {
...@@ -102,7 +111,9 @@ namespace cv ...@@ -102,7 +111,9 @@ namespace cv
KAZEOptions options; KAZEOptions options;
options.img_width = img.cols; options.img_width = img.cols;
options.img_height = img.rows; options.img_height = img.rows;
options.descriptor = static_cast<DESCRIPTOR_TYPE>(descriptor);
options.extended = extended; options.extended = extended;
options.upright = upright;
KAZEFeatures impl(options); KAZEFeatures impl(options);
impl.Create_Nonlinear_Scale_Space(img1_32); impl.Create_Nonlinear_Scale_Space(img1_32);
...@@ -135,7 +146,9 @@ namespace cv ...@@ -135,7 +146,9 @@ namespace cv
KAZEOptions options; KAZEOptions options;
options.img_width = img.cols; options.img_width = img.cols;
options.img_height = img.rows; options.img_height = img.rows;
options.descriptor = static_cast<DESCRIPTOR_TYPE>(descriptor);
options.extended = extended; options.extended = extended;
options.upright = upright;
KAZEFeatures impl(options); KAZEFeatures impl(options);
impl.Create_Nonlinear_Scale_Space(img1_32); impl.Create_Nonlinear_Scale_Space(img1_32);
...@@ -161,7 +174,9 @@ namespace cv ...@@ -161,7 +174,9 @@ namespace cv
KAZEOptions options; KAZEOptions options;
options.img_width = img.cols; options.img_width = img.cols;
options.img_height = img.rows; options.img_height = img.rows;
options.descriptor = static_cast<DESCRIPTOR_TYPE>(descriptor);
options.extended = extended; options.extended = extended;
options.upright = upright;
KAZEFeatures impl(options); KAZEFeatures impl(options);
impl.Create_Nonlinear_Scale_Space(img1_32); impl.Create_Nonlinear_Scale_Space(img1_32);
......
...@@ -5,74 +5,68 @@ ...@@ -5,74 +5,68 @@
* @author Pablo F. Alcantarilla * @author Pablo F. Alcantarilla
*/ */
#ifndef __OPENCV_FEATURES_2D_KAZE_CONFIG_HPP__ #pragma once
#define __OPENCV_FEATURES_2D_KAZE_CONFIG_HPP__
//******************************************************************************
//******************************************************************************
// OpenCV Includes // OpenCV Includes
#include "precomp.hpp" #include "precomp.hpp"
#include <opencv2/features2d.hpp>
//*************************************************************************************
//************************************************************************************* //*************************************************************************************
// Some defines struct KAZEOptions {
#define NMAX_CHAR 400
// Some default options enum DIFFUSIVITY_TYPE {
static const float DEFAULT_SCALE_OFFSET = 1.60f; // Base scale offset (sigma units) PM_G1 = 0,
static const float DEFAULT_OCTAVE_MAX = 4.0f; // Maximum octave evolution of the image 2^sigma (coarsest scale sigma units) PM_G2 = 1,
static const int DEFAULT_NSUBLEVELS = 4; // Default number of sublevels per scale level WEICKERT = 2
static const float DEFAULT_DETECTOR_THRESHOLD = 0.001f; // Detector response threshold to accept point };
static const float DEFAULT_MIN_DETECTOR_THRESHOLD = 0.00001f; // Minimum Detector response threshold to accept point
static const int DEFAULT_DESCRIPTOR_MODE = 1; // Descriptor Mode 0->SURF, 1->M-SURF
static const bool DEFAULT_USE_FED = true; // 0->AOS, 1->FED
static const bool DEFAULT_UPRIGHT = false; // Upright descriptors, not invariant to rotation
static const bool DEFAULT_EXTENDED = false; // Extended descriptor, dimension 128
// Some important configuration variables KAZEOptions()
static const float DEFAULT_SIGMA_SMOOTHING_DERIVATIVES = 1.0f; : descriptor(cv::KAZE::DESCRIPTOR_MSURF)
static const float DEFAULT_KCONTRAST = 0.01f; , diffusivity(PM_G2)
static const float KCONTRAST_PERCENTILE = 0.7f;
static const int KCONTRAST_NBINS = 300;
static const bool COMPUTE_KCONTRAST = true;
static const int DEFAULT_DIFFUSIVITY_TYPE = 1; // 0 -> PM G1, 1 -> PM G2, 2 -> Weickert
static const bool USE_CLIPPING_NORMALIZATION = false;
static const float CLIPPING_NORMALIZATION_RATIO = 1.6f;
static const int CLIPPING_NORMALIZATION_NITER = 5;
//************************************************************************************* , soffset(1.60f)
//************************************************************************************* , omax(4)
, nsublevels(4)
, img_width(0)
, img_height(0)
, sderivatives(1.0f)
, dthreshold(0.001f)
, kcontrast(0.01f)
, kcontrast_percentille(0.7f)
, kcontrast_bins(300)
struct KAZEOptions { , use_fed(true)
, upright(false)
, extended(false)
KAZEOptions() { , use_clipping_normalilzation(false)
// Load the default options , clipping_normalization_ratio(1.6f)
soffset = DEFAULT_SCALE_OFFSET; , clipping_normalization_niter(5)
omax = static_cast<int>(DEFAULT_OCTAVE_MAX); {
nsublevels = DEFAULT_NSUBLEVELS;
dthreshold = DEFAULT_DETECTOR_THRESHOLD;
use_fed = DEFAULT_USE_FED;
upright = DEFAULT_UPRIGHT;
extended = DEFAULT_EXTENDED;
descriptor = DEFAULT_DESCRIPTOR_MODE;
diffusivity = DEFAULT_DIFFUSIVITY_TYPE;
sderivatives = DEFAULT_SIGMA_SMOOTHING_DERIVATIVES;
} }
cv::KAZE::DESCRIPTOR_TYPE descriptor;
DIFFUSIVITY_TYPE diffusivity;
float soffset; float soffset;
int omax; int omax;
int nsublevels; int nsublevels;
int img_width; int img_width;
int img_height; int img_height;
int diffusivity;
float sderivatives; float sderivatives;
float dthreshold; float dthreshold;
float kcontrast;
float kcontrast_percentille;
int kcontrast_bins;
bool use_fed; bool use_fed;
bool upright; bool upright;
bool extended; bool extended;
int descriptor;
bool use_clipping_normalilzation;
float clipping_normalization_ratio;
int clipping_normalization_niter;
}; };
struct TEvolution { struct TEvolution {
...@@ -89,8 +83,3 @@ struct TEvolution { ...@@ -89,8 +83,3 @@ struct TEvolution {
float sublevel; // Image sublevel in each octave float sublevel; // Image sublevel in each octave
int sigma_size; // Integer esigma. For computing the feature detector responses int sigma_size; // Integer esigma. For computing the feature detector responses
}; };
//*************************************************************************************
//*************************************************************************************
#endif
\ No newline at end of file
...@@ -26,22 +26,10 @@ class KAZEFeatures { ...@@ -26,22 +26,10 @@ class KAZEFeatures {
private: private:
KAZEOptions options;
// Parameters of the Nonlinear diffusion class // Parameters of the Nonlinear diffusion class
float soffset_; // Base scale offset
float sderivatives_; // Standard deviation of the Gaussian for the nonlinear diff. derivatives
int omax_; // Maximum octave level
int nsublevels_; // Number of sublevels per octave level
int img_width_; // Width of the original image
int img_height_; // Height of the original image
std::vector<TEvolution> evolution_; // Vector of nonlinear diffusion evolution std::vector<TEvolution> evolution_; // Vector of nonlinear diffusion evolution
float kcontrast_; // The contrast parameter for the scalar nonlinear diffusion
float dthreshold_; // Feature detector threshold response
int diffusivity_; // Diffusivity type, 0->PM G1, 1->PM G2, 2-> Weickert
int descriptor_mode_; // Descriptor mode
bool use_fed_; // Set to true in case we want to use FED for the nonlinear diffusion filtering. Set false for using AOS
bool use_upright_; // Set to true in case we want to use the upright version of the descriptors
bool use_extended_; // Set to true in case we want to use the extended version of the descriptors
bool use_normalization;
// Vector of keypoint vectors for finding extrema in multiple threads // Vector of keypoint vectors for finding extrema in multiple threads
std::vector<std::vector<cv::KeyPoint> > kpts_par_; std::vector<std::vector<cv::KeyPoint> > kpts_par_;
...@@ -52,15 +40,6 @@ private: ...@@ -52,15 +40,6 @@ private:
std::vector<std::vector<float > > tsteps_; // Vector of FED dynamic time steps std::vector<std::vector<float > > tsteps_; // Vector of FED dynamic time steps
std::vector<int> nsteps_; // Vector of number of steps per cycle std::vector<int> nsteps_; // Vector of number of steps per cycle
// Computation times variables in ms
//double tkcontrast_; // Kcontrast factor computation
//double tnlscale_; // Nonlinear Scale space generation
//double tdetector_; // Feature detector
//double tmderivatives_; // Multiscale derivatives computation
//double tdresponse_; // Detector response computation
//double tdescriptor_; // Feature descriptor
//double tsubpixel_; // Subpixel refinement
// Some auxiliary variables used in the AOS step // Some auxiliary variables used in the AOS step
cv::Mat Ltx_, Lty_, px_, py_, ax_, ay_, bx_, by_, qr_, qc_; cv::Mat Ltx_, Lty_, px_, py_, ax_, ay_, bx_, by_, qr_, qc_;
...@@ -75,6 +54,8 @@ public: ...@@ -75,6 +54,8 @@ public:
void Feature_Detection(std::vector<cv::KeyPoint>& kpts); void Feature_Detection(std::vector<cv::KeyPoint>& kpts);
void Feature_Description(std::vector<cv::KeyPoint>& kpts, cv::Mat& desc); void Feature_Description(std::vector<cv::KeyPoint>& kpts, cv::Mat& desc);
static void Compute_Main_Orientation(cv::KeyPoint& kpt, const std::vector<TEvolution>& evolution_, const KAZEOptions& options);
private: private:
// Feature Detection Methods // Feature Detection Methods
...@@ -91,32 +72,6 @@ private: ...@@ -91,32 +72,6 @@ private:
void AOS_Columns(const cv::Mat &Ldprev, const cv::Mat &c, const float& stepsize); void AOS_Columns(const cv::Mat &Ldprev, const cv::Mat &c, const float& stepsize);
void Thomas(const cv::Mat &a, const cv::Mat &b, const cv::Mat &Ld, cv::Mat &x); void Thomas(const cv::Mat &a, const cv::Mat &b, const cv::Mat &Ld, cv::Mat &x);
// Feature Description methods
void Compute_Main_Orientation_SURF(cv::KeyPoint& kpt);
// Descriptor Mode -> 0 SURF 64
void Get_SURF_Upright_Descriptor_64(const cv::KeyPoint& kpt, float* desc);
void Get_SURF_Descriptor_64(const cv::KeyPoint& kpt, float* desc);
// Descriptor Mode -> 0 SURF 128
void Get_SURF_Upright_Descriptor_128(const cv::KeyPoint& kpt, float* desc);
void Get_SURF_Descriptor_128(const cv::KeyPoint& kpt, float* desc);
// Descriptor Mode -> 1 M-SURF 64
void Get_MSURF_Upright_Descriptor_64(const cv::KeyPoint& kpt, float* desc);
void Get_MSURF_Descriptor_64(const cv::KeyPoint& kpt, float* desc);
// Descriptor Mode -> 1 M-SURF 128
void Get_MSURF_Upright_Descriptor_128(const cv::KeyPoint& kpt, float* desc);
void Get_MSURF_Descriptor_128(const cv::KeyPoint& kpt, float *desc);
// Descriptor Mode -> 2 G-SURF 64
void Get_GSURF_Upright_Descriptor_64(const cv::KeyPoint& kpt, float* desc);
void Get_GSURF_Descriptor_64(const cv::KeyPoint& kpt, float *desc);
// Descriptor Mode -> 2 G-SURF 128
void Get_GSURF_Upright_Descriptor_128(const cv::KeyPoint& kpt, float* desc);
void Get_GSURF_Descriptor_128(const cv::KeyPoint& kpt, float* desc);
}; };
//************************************************************************************* //*************************************************************************************
......
...@@ -169,12 +169,18 @@ TEST(Features2d_Detector_Keypoints_Dense, validation) ...@@ -169,12 +169,18 @@ TEST(Features2d_Detector_Keypoints_Dense, validation)
TEST(Features2d_Detector_Keypoints_KAZE, validation) TEST(Features2d_Detector_Keypoints_KAZE, validation)
{ {
CV_FeatureDetectorKeypointsTest test(Algorithm::create<FeatureDetector>("Feature2D.KAZE")); CV_FeatureDetectorKeypointsTest test_gsurf(cv::Ptr<FeatureDetector>(new cv::KAZE(cv::KAZE::DESCRIPTOR_GSURF, false, false)));
test.safe_run(); test_gsurf.safe_run();
CV_FeatureDetectorKeypointsTest test_msurf(cv::Ptr<FeatureDetector>(new cv::KAZE(cv::KAZE::DESCRIPTOR_MSURF, false, false)));
test_msurf.safe_run();
} }
TEST(Features2d_Detector_Keypoints_AKAZE, validation) TEST(Features2d_Detector_Keypoints_AKAZE, validation)
{ {
CV_FeatureDetectorKeypointsTest test(Algorithm::create<FeatureDetector>("Feature2D.AKAZE")); CV_FeatureDetectorKeypointsTest test_kaze(cv::Ptr<FeatureDetector>(new cv::AKAZE(cv::AKAZE::DESCRIPTOR_KAZE)));
test.safe_run(); test_kaze.safe_run();
CV_FeatureDetectorKeypointsTest test_mldb(cv::Ptr<FeatureDetector>(new cv::AKAZE(cv::AKAZE::DESCRIPTOR_MLDB)));
test_mldb.safe_run();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment