Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
703e012a
Commit
703e012a
authored
Apr 05, 2014
by
Ievgen Khvedchenia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare KAZE and AKAZE sources for integration
parent
7a594354
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
129 deletions
+103
-129
AKAZE.cpp
modules/features2d/src/akaze/AKAZE.cpp
+20
-36
AKAZE.h
modules/features2d/src/akaze/AKAZE.h
+3
-8
config.h
modules/features2d/src/akaze/config.h
+23
-23
KAZE.cpp
modules/features2d/src/kaze/KAZE.cpp
+30
-30
KAZE.h
modules/features2d/src/kaze/KAZE.h
+3
-8
config.h
modules/features2d/src/kaze/config.h
+24
-24
No files found.
modules/features2d/src/akaze/AKAZE.cpp
View file @
703e012a
...
@@ -33,7 +33,7 @@ using namespace cv;
...
@@ -33,7 +33,7 @@ using namespace cv;
* @param options AKAZE configuration options
* @param options AKAZE configuration options
* @note This constructor allocates memory for the nonlinear scale space
* @note This constructor allocates memory for the nonlinear scale space
*/
*/
AKAZE
::
AKAZE
(
const
AKAZEOptions
&
options
)
{
AKAZE
Features
::
AKAZEFeatures
(
const
AKAZEOptions
&
options
)
{
soffset_
=
options
.
soffset
;
soffset_
=
options
.
soffset
;
factor_size_
=
DEFAULT_FACTOR_SIZE
;
factor_size_
=
DEFAULT_FACTOR_SIZE
;
...
@@ -75,7 +75,7 @@ AKAZE::AKAZE(const AKAZEOptions& options) {
...
@@ -75,7 +75,7 @@ AKAZE::AKAZE(const AKAZEOptions& options) {
/**
/**
* @brief AKAZE destructor
* @brief AKAZE destructor
*/
*/
AKAZE
::~
AKAZE
(
void
)
{
AKAZE
Features
::~
AKAZEFeatures
(
void
)
{
evolution_
.
clear
();
evolution_
.
clear
();
}
}
...
@@ -86,7 +86,7 @@ AKAZE::~AKAZE(void) {
...
@@ -86,7 +86,7 @@ AKAZE::~AKAZE(void) {
/**
/**
* @brief This method allocates the memory for the nonlinear diffusion evolution
* @brief This method allocates the memory for the nonlinear diffusion evolution
*/
*/
void
AKAZE
::
Allocate_Memory_Evolution
(
void
)
{
void
AKAZE
Features
::
Allocate_Memory_Evolution
(
void
)
{
float
rfactor
=
0.0
;
float
rfactor
=
0.0
;
int
level_height
=
0
,
level_width
=
0
;
int
level_height
=
0
,
level_width
=
0
;
...
@@ -145,7 +145,7 @@ void AKAZE::Allocate_Memory_Evolution(void) {
...
@@ -145,7 +145,7 @@ void AKAZE::Allocate_Memory_Evolution(void) {
* @param img Input image for which the nonlinear scale space needs to be created
* @param img Input image for which the nonlinear scale space needs to be created
* @return 0 if the nonlinear scale space was created successfully, -1 otherwise
* @return 0 if the nonlinear scale space was created successfully, -1 otherwise
*/
*/
int
AKAZE
::
Create_Nonlinear_Scale_Space
(
const
cv
::
Mat
&
img
)
{
int
AKAZE
Features
::
Create_Nonlinear_Scale_Space
(
const
cv
::
Mat
&
img
)
{
double
t1
=
0.0
,
t2
=
0.0
;
double
t1
=
0.0
,
t2
=
0.0
;
...
@@ -222,7 +222,7 @@ int AKAZE::Create_Nonlinear_Scale_Space(const cv::Mat &img) {
...
@@ -222,7 +222,7 @@ int AKAZE::Create_Nonlinear_Scale_Space(const cv::Mat &img) {
* @brief This method selects interesting keypoints through the nonlinear scale space
* @brief This method selects interesting keypoints through the nonlinear scale space
* @param kpts Vector of detected keypoints
* @param kpts Vector of detected keypoints
*/
*/
void
AKAZE
::
Feature_Detection
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
void
AKAZE
Features
::
Feature_Detection
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
double
t1
=
0.0
,
t2
=
0.0
;
double
t1
=
0.0
,
t2
=
0.0
;
...
@@ -242,7 +242,7 @@ void AKAZE::Feature_Detection(std::vector<cv::KeyPoint>& kpts) {
...
@@ -242,7 +242,7 @@ void AKAZE::Feature_Detection(std::vector<cv::KeyPoint>& kpts) {
/**
/**
* @brief This method computes the multiscale derivatives for the nonlinear scale space
* @brief This method computes the multiscale derivatives for the nonlinear scale space
*/
*/
void
AKAZE
::
Compute_Multiscale_Derivatives
(
void
)
{
void
AKAZE
Features
::
Compute_Multiscale_Derivatives
(
void
)
{
double
t1
=
0.0
,
t2
=
0.0
;
double
t1
=
0.0
,
t2
=
0.0
;
...
@@ -279,7 +279,7 @@ void AKAZE::Compute_Multiscale_Derivatives(void) {
...
@@ -279,7 +279,7 @@ void AKAZE::Compute_Multiscale_Derivatives(void) {
* @brief This method computes the feature detector response for the nonlinear scale space
* @brief This method computes the feature detector response for the nonlinear scale space
* @note We use the Hessian determinant as the feature detector response
* @note We use the Hessian determinant as the feature detector response
*/
*/
void
AKAZE
::
Compute_Determinant_Hessian_Response
(
void
)
{
void
AKAZE
Features
::
Compute_Determinant_Hessian_Response
(
void
)
{
// Firstly compute the multiscale derivatives
// Firstly compute the multiscale derivatives
Compute_Multiscale_Derivatives
();
Compute_Multiscale_Derivatives
();
...
@@ -307,7 +307,7 @@ void AKAZE::Compute_Determinant_Hessian_Response(void) {
...
@@ -307,7 +307,7 @@ void AKAZE::Compute_Determinant_Hessian_Response(void) {
* @brief This method finds extrema in the nonlinear scale space
* @brief This method finds extrema in the nonlinear scale space
* @param kpts Vector of detected keypoints
* @param kpts Vector of detected keypoints
*/
*/
void
AKAZE
::
Find_Scale_Space_Extrema
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
void
AKAZE
Features
::
Find_Scale_Space_Extrema
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
double
t1
=
0.0
,
t2
=
0.0
;
double
t1
=
0.0
,
t2
=
0.0
;
float
value
=
0.0
;
float
value
=
0.0
;
...
@@ -418,7 +418,7 @@ void AKAZE::Find_Scale_Space_Extrema(std::vector<cv::KeyPoint>& kpts) {
...
@@ -418,7 +418,7 @@ void AKAZE::Find_Scale_Space_Extrema(std::vector<cv::KeyPoint>& kpts) {
* @brief This method performs subpixel refinement of the detected keypoints
* @brief This method performs subpixel refinement of the detected keypoints
* @param kpts Vector of detected keypoints
* @param kpts Vector of detected keypoints
*/
*/
void
AKAZE
::
Do_Subpixel_Refinement
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
void
AKAZE
Features
::
Do_Subpixel_Refinement
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
double
t1
=
0.0
,
t2
=
0.0
;
double
t1
=
0.0
,
t2
=
0.0
;
float
Dx
=
0.0
,
Dy
=
0.0
,
ratio
=
0.0
;
float
Dx
=
0.0
,
Dy
=
0.0
,
ratio
=
0.0
;
...
@@ -493,7 +493,7 @@ void AKAZE::Do_Subpixel_Refinement(std::vector<cv::KeyPoint>& kpts) {
...
@@ -493,7 +493,7 @@ void AKAZE::Do_Subpixel_Refinement(std::vector<cv::KeyPoint>& kpts) {
* @param kpts Vector of keypoints
* @param kpts Vector of keypoints
* @param mdist Maximum distance in pixels
* @param mdist Maximum distance in pixels
*/
*/
void
AKAZE
::
Feature_Suppression_Distance
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
float
mdist
)
{
void
AKAZE
Features
::
Feature_Suppression_Distance
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
float
mdist
)
{
vector
<
KeyPoint
>
aux
;
vector
<
KeyPoint
>
aux
;
vector
<
int
>
to_delete
;
vector
<
int
>
to_delete
;
...
@@ -545,7 +545,7 @@ void AKAZE::Feature_Suppression_Distance(std::vector<cv::KeyPoint>& kpts, float
...
@@ -545,7 +545,7 @@ void AKAZE::Feature_Suppression_Distance(std::vector<cv::KeyPoint>& kpts, float
* @param kpts Vector of detected keypoints
* @param kpts Vector of detected keypoints
* @param desc Matrix to store the descriptors
* @param desc Matrix to store the descriptors
*/
*/
void
AKAZE
::
Compute_Descriptors
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
cv
::
Mat
&
desc
)
{
void
AKAZE
Features
::
Compute_Descriptors
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
cv
::
Mat
&
desc
)
{
double
t1
=
0.0
,
t2
=
0.0
;
double
t1
=
0.0
,
t2
=
0.0
;
...
@@ -653,7 +653,7 @@ void AKAZE::Compute_Descriptors(std::vector<cv::KeyPoint>& kpts, cv::Mat& desc)
...
@@ -653,7 +653,7 @@ void AKAZE::Compute_Descriptors(std::vector<cv::KeyPoint>& kpts, cv::Mat& desc)
* @note The orientation is computed using a similar approach as described in the
* @note The orientation is computed using a similar approach as described in the
* original SURF method. See Bay et al., Speeded Up Robust Features, ECCV 2006
* original SURF method. See Bay et al., Speeded Up Robust Features, ECCV 2006
*/
*/
void
AKAZE
::
Compute_Main_Orientation_SURF
(
cv
::
KeyPoint
&
kpt
)
{
void
AKAZE
Features
::
Compute_Main_Orientation_SURF
(
cv
::
KeyPoint
&
kpt
)
{
int
ix
=
0
,
iy
=
0
,
idx
=
0
,
s
=
0
,
level
=
0
;
int
ix
=
0
,
iy
=
0
,
idx
=
0
,
s
=
0
,
level
=
0
;
float
xf
=
0.0
,
yf
=
0.0
,
gweight
=
0.0
,
ratio
=
0.0
;
float
xf
=
0.0
,
yf
=
0.0
,
gweight
=
0.0
,
ratio
=
0.0
;
...
@@ -728,7 +728,7 @@ void AKAZE::Compute_Main_Orientation_SURF(cv::KeyPoint& kpt) {
...
@@ -728,7 +728,7 @@ void AKAZE::Compute_Main_Orientation_SURF(cv::KeyPoint& kpt) {
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Speeded Up Robust Features, ECCV, 2006
* Speeded Up Robust Features, ECCV, 2006
*/
*/
void
AKAZE
::
Get_SURF_Descriptor_Upright_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
AKAZE
Features
::
Get_SURF_Descriptor_Upright_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -819,7 +819,7 @@ void AKAZE::Get_SURF_Descriptor_Upright_64(const cv::KeyPoint& kpt, float *desc)
...
@@ -819,7 +819,7 @@ void AKAZE::Get_SURF_Descriptor_Upright_64(const cv::KeyPoint& kpt, float *desc)
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Speeded Up Robust Features, ECCV, 2006
* Speeded Up Robust Features, ECCV, 2006
*/
*/
void
AKAZE
::
Get_SURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
AKAZE
Features
::
Get_SURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -918,7 +918,7 @@ void AKAZE::Get_SURF_Descriptor_64(const cv::KeyPoint& kpt, float *desc) {
...
@@ -918,7 +918,7 @@ void AKAZE::Get_SURF_Descriptor_64(const cv::KeyPoint& kpt, float *desc) {
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* ECCV 2008
* ECCV 2008
*/
*/
void
AKAZE
::
Get_MSURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
AKAZE
Features
::
Get_MSURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
...
@@ -1041,7 +1041,7 @@ void AKAZE::Get_MSURF_Upright_Descriptor_64(const cv::KeyPoint& kpt, float *desc
...
@@ -1041,7 +1041,7 @@ void AKAZE::Get_MSURF_Upright_Descriptor_64(const cv::KeyPoint& kpt, float *desc
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* ECCV 2008
* ECCV 2008
*/
*/
void
AKAZE
::
Get_MSURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
AKAZE
Features
::
Get_MSURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
...
@@ -1165,7 +1165,7 @@ void AKAZE::Get_MSURF_Descriptor_64(const cv::KeyPoint& kpt, float *desc) {
...
@@ -1165,7 +1165,7 @@ void AKAZE::Get_MSURF_Descriptor_64(const cv::KeyPoint& kpt, float *desc) {
* @param kpt Input keypoint
* @param kpt Input keypoint
* @param desc Descriptor vector
* @param desc Descriptor vector
*/
*/
void
AKAZE
::
Get_Upright_MLDB_Full_Descriptor
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
void
AKAZE
Features
::
Get_Upright_MLDB_Full_Descriptor
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
float
di
=
0.0
,
dx
=
0.0
,
dy
=
0.0
;
float
di
=
0.0
,
dx
=
0.0
,
dy
=
0.0
;
float
ri
=
0.0
,
rx
=
0.0
,
ry
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
ri
=
0.0
,
rx
=
0.0
,
ry
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -1378,7 +1378,7 @@ void AKAZE::Get_Upright_MLDB_Full_Descriptor(const cv::KeyPoint& kpt, unsigned c
...
@@ -1378,7 +1378,7 @@ void AKAZE::Get_Upright_MLDB_Full_Descriptor(const cv::KeyPoint& kpt, unsigned c
* @param kpt Input keypoint
* @param kpt Input keypoint
* @param desc Descriptor vector
* @param desc Descriptor vector
*/
*/
void
AKAZE
::
Get_MLDB_Full_Descriptor
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
void
AKAZE
Features
::
Get_MLDB_Full_Descriptor
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
float
di
=
0.0
,
dx
=
0.0
,
dy
=
0.0
,
ratio
=
0.0
;
float
di
=
0.0
,
dx
=
0.0
,
dy
=
0.0
,
ratio
=
0.0
;
float
ri
=
0.0
,
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
ri
=
0.0
,
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -1680,7 +1680,7 @@ void AKAZE::Get_MLDB_Full_Descriptor(const cv::KeyPoint& kpt, unsigned char *des
...
@@ -1680,7 +1680,7 @@ void AKAZE::Get_MLDB_Full_Descriptor(const cv::KeyPoint& kpt, unsigned char *des
* @param kpt Input keypoint
* @param kpt Input keypoint
* @param desc Descriptor vector
* @param desc Descriptor vector
*/
*/
void
AKAZE
::
Get_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
void
AKAZE
Features
::
Get_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
float
di
,
dx
,
dy
;
float
di
,
dx
,
dy
;
float
rx
,
ry
;
float
rx
,
ry
;
...
@@ -1772,7 +1772,7 @@ void AKAZE::Get_MLDB_Descriptor_Subset(const cv::KeyPoint& kpt, unsigned char *d
...
@@ -1772,7 +1772,7 @@ void AKAZE::Get_MLDB_Descriptor_Subset(const cv::KeyPoint& kpt, unsigned char *d
* @param kpt Input keypoint
* @param kpt Input keypoint
* @param desc Descriptor vector
* @param desc Descriptor vector
*/
*/
void
AKAZE
::
Get_Upright_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
void
AKAZE
Features
::
Get_Upright_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
)
{
float
di
=
0.0
f
,
dx
=
0.0
f
,
dy
=
0.0
f
;
float
di
=
0.0
f
,
dx
=
0.0
f
,
dy
=
0.0
f
;
float
rx
=
0.0
f
,
ry
=
0.0
f
;
float
rx
=
0.0
f
,
ry
=
0.0
f
;
...
@@ -1851,22 +1851,6 @@ void AKAZE::Get_Upright_MLDB_Descriptor_Subset(const cv::KeyPoint& kpt, unsigned
...
@@ -1851,22 +1851,6 @@ void AKAZE::Get_Upright_MLDB_Descriptor_Subset(const cv::KeyPoint& kpt, unsigned
//*************************************************************************************
//*************************************************************************************
//*************************************************************************************
//*************************************************************************************
/**
* @brief This method displays the computation times
*/
void
AKAZE
::
Show_Computation_Times
(
void
)
{
cout
<<
"(*) Time Scale Space: "
<<
tscale_
<<
endl
;
cout
<<
"(*) Time Detector: "
<<
tdetector_
<<
endl
;
cout
<<
" - Time Derivatives: "
<<
tderivatives_
<<
endl
;
cout
<<
" - Time Extrema: "
<<
textrema_
<<
endl
;
cout
<<
" - Time Subpixel: "
<<
tsubpixel_
<<
endl
;
cout
<<
"(*) Time Descriptor: "
<<
tdescriptor_
<<
endl
;
}
//*************************************************************************************
//*************************************************************************************
/**
/**
* @brief This function computes a (quasi-random) list of bits to be taken
* @brief This function computes a (quasi-random) list of bits to be taken
* from the full descriptor. To speed the extraction, the function creates
* from the full descriptor. To speed the extraction, the function creates
...
...
modules/features2d/src/akaze/AKAZE.h
View file @
703e012a
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
//*************************************************************************************
//*************************************************************************************
// AKAZE Class Declaration
// AKAZE Class Declaration
class
AKAZE
{
class
AKAZE
Features
{
private
:
private
:
...
@@ -72,10 +72,10 @@ private:
...
@@ -72,10 +72,10 @@ private:
public
:
public
:
// Constructor
// Constructor
AKAZE
(
const
AKAZEOptions
&
options
);
AKAZE
Features
(
const
AKAZEOptions
&
options
);
// Destructor
// Destructor
~
AKAZE
(
void
);
~
AKAZE
Features
(
void
);
// Setters
// Setters
void
Set_Octave_Max
(
const
int
&
omax
)
{
void
Set_Octave_Max
(
const
int
&
omax
)
{
...
@@ -144,11 +144,6 @@ public:
...
@@ -144,11 +144,6 @@ public:
void
Get_MLDB_Full_Descriptor
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
);
void
Get_MLDB_Full_Descriptor
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
);
void
Get_Upright_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
);
void
Get_Upright_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
);
void
Get_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
);
void
Get_MLDB_Descriptor_Subset
(
const
cv
::
KeyPoint
&
kpt
,
unsigned
char
*
desc
);
// Methods for saving some results and showing computation times
void
Save_Scale_Space
(
void
);
void
Save_Detector_Responses
(
void
);
void
Show_Computation_Times
(
void
);
};
};
//*************************************************************************************
//*************************************************************************************
...
...
modules/features2d/src/akaze/config.h
View file @
703e012a
#ifndef _
CONFIG_H
_
#ifndef _
_OPENCV_FEATURES_2D_AKAZE_CONFIG_HPP_
_
#define _
CONFIG_H
_
#define _
_OPENCV_FEATURES_2D_AKAZE_CONFIG_HPP_
_
// STL
// STL
#include <string>
#include <string>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#endif
#endif
// 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
const
float
gauss25
[
7
][
7
]
=
{
static
const
float
gauss25
[
7
][
7
]
=
{
{
0
.
025464
81
f
,
0
.
023506
98
f
,
0
.
01
849125
f
,
0
.
0123
9505
f
,
0
.
0070
8017
f
,
0
.
0034462
9
f
,
0
.
00142
946
f
},
{
0
.
025464
81
f
,
0
.
023506
98
f
,
0
.
01
849125
f
,
0
.
0123
9505
f
,
0
.
0070
8017
f
,
0
.
0034462
9
f
,
0
.
00142
946
f
},
{
0
.
023506
98
f
,
0
.
0216
9968
f
,
0
.
01706
957
f
,
0
.
0114420
8
f
,
0
.
006535
82
f
,
0
.
0031
8132
f
,
0
.
00131
956
f
},
{
0
.
023506
98
f
,
0
.
0216
9968
f
,
0
.
01706
957
f
,
0
.
0114420
8
f
,
0
.
006535
82
f
,
0
.
0031
8132
f
,
0
.
00131
956
f
},
{
0
.
01
849125
f
,
0
.
01706
957
f
,
0
.
01342740
f
,
0
.
00
900066
f
,
0
.
00514126
f
,
0
.
00250252
f
,
0
.
00103
800
f
},
{
0
.
01
849125
f
,
0
.
01706
957
f
,
0
.
01342740
f
,
0
.
00
900066
f
,
0
.
00514126
f
,
0
.
00250252
f
,
0
.
00103
800
f
},
...
@@ -29,24 +29,24 @@ const float gauss25[7][7] = {
...
@@ -29,24 +29,24 @@ const float gauss25[7][7] = {
// Scale Space parameters
// Scale Space parameters
const
float
DEFAULT_SCALE_OFFSET
=
1
.
60
f
;
// Base scale offset (sigma units)
static
const
float
DEFAULT_SCALE_OFFSET
=
1
.
60
f
;
// Base scale offset (sigma units)
const
float
DEFAULT_FACTOR_SIZE
=
1
.
5
f
;
// Factor for the multiscale derivatives
static
const
float
DEFAULT_FACTOR_SIZE
=
1
.
5
f
;
// Factor for the multiscale derivatives
const
int
DEFAULT_OCTAVE_MIN
=
0
;
// Initial octave level (-1 means that the size of the input image is duplicated)
static
const
int
DEFAULT_OCTAVE_MIN
=
0
;
// Initial octave level (-1 means that the size of the input image is duplicated)
const
int
DEFAULT_OCTAVE_MAX
=
4
;
// Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)
static
const
int
DEFAULT_OCTAVE_MAX
=
4
;
// Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)
const
int
DEFAULT_NSUBLEVELS
=
4
;
// Default number of sublevels per scale level
static
const
int
DEFAULT_NSUBLEVELS
=
4
;
// Default number of sublevels per scale level
const
int
DEFAULT_DIFFUSIVITY_TYPE
=
1
;
static
const
int
DEFAULT_DIFFUSIVITY_TYPE
=
1
;
const
float
KCONTRAST_PERCENTILE
=
0
.
7
f
;
static
const
float
KCONTRAST_PERCENTILE
=
0
.
7
f
;
const
int
KCONTRAST_NBINS
=
300
;
static
const
int
KCONTRAST_NBINS
=
300
;
const
float
DEFAULT_SIGMA_SMOOTHING_DERIVATIVES
=
1
.
0
f
;
static
const
float
DEFAULT_SIGMA_SMOOTHING_DERIVATIVES
=
1
.
0
f
;
const
float
DEFAULT_KCONTRAST
=
.
01
f
;
static
const
float
DEFAULT_KCONTRAST
=
.
01
f
;
// Detector Parameters
// Detector Parameters
const
float
DEFAULT_DETECTOR_THRESHOLD
=
0
.
001
f
;
// Detector response threshold to accept point
static
const
float
DEFAULT_DETECTOR_THRESHOLD
=
0
.
001
f
;
// Detector response threshold to accept point
const
float
DEFAULT_MIN_DETECTOR_THRESHOLD
=
0
.
00001
f
;
// Minimum Detector response threshold to accept point
static
const
float
DEFAULT_MIN_DETECTOR_THRESHOLD
=
0
.
00001
f
;
// Minimum Detector response threshold to accept point
const
int
DEFAULT_LDB_DESCRIPTOR_SIZE
=
0
;
// Use 0 for the full descriptor, or the number of bits
static
const
int
DEFAULT_LDB_DESCRIPTOR_SIZE
=
0
;
// Use 0 for the full descriptor, or the number of bits
const
int
DEFAULT_LDB_PATTERN_SIZE
=
10
;
// Actual patch size is 2*pattern_size*point.scale;
static
const
int
DEFAULT_LDB_PATTERN_SIZE
=
10
;
// Actual patch size is 2*pattern_size*point.scale;
const
int
DEFAULT_LDB_CHANNELS
=
3
;
static
const
int
DEFAULT_LDB_CHANNELS
=
3
;
// Descriptor Parameters
// Descriptor Parameters
enum
DESCRIPTOR_TYPE
enum
DESCRIPTOR_TYPE
...
@@ -59,13 +59,13 @@ enum DESCRIPTOR_TYPE
...
@@ -59,13 +59,13 @@ enum DESCRIPTOR_TYPE
MLDB
=
5
MLDB
=
5
};
};
const
int
DEFAULT_DESCRIPTOR
=
MLDB
;
static
const
int
DEFAULT_DESCRIPTOR
=
MLDB
;
// Some debugging options
// Some debugging options
const
bool
DEFAULT_SAVE_SCALE_SPACE
=
false
;
// For saving the scale space images
static
const
bool
DEFAULT_SAVE_SCALE_SPACE
=
false
;
// For saving the scale space images
const
bool
DEFAULT_VERBOSITY
=
false
;
// Verbosity level (0->no verbosity)
static
const
bool
DEFAULT_VERBOSITY
=
false
;
// Verbosity level (0->no verbosity)
const
bool
DEFAULT_SHOW_RESULTS
=
true
;
// For showing the output image with the detected features plus some ratios
static
const
bool
DEFAULT_SHOW_RESULTS
=
true
;
// For showing the output image with the detected features plus some ratios
const
bool
DEFAULT_SAVE_KEYPOINTS
=
false
;
// For saving the list of keypoints
static
const
bool
DEFAULT_SAVE_KEYPOINTS
=
false
;
// For saving the list of keypoints
// Options structure
// Options structure
struct
AKAZEOptions
struct
AKAZEOptions
...
...
modules/features2d/src/kaze/KAZE.cpp
View file @
703e012a
...
@@ -35,7 +35,7 @@ using namespace cv;
...
@@ -35,7 +35,7 @@ using namespace cv;
* @param options KAZE configuration options
* @param options KAZE configuration options
* @note The constructor allocates memory for the nonlinear scale space
* @note The constructor allocates memory for the nonlinear scale space
*/
*/
KAZE
::
KAZE
(
KAZEOptions
&
options
)
{
KAZE
Features
::
KAZEFeatures
(
KAZEOptions
&
options
)
{
soffset_
=
options
.
soffset
;
soffset_
=
options
.
soffset
;
sderivatives_
=
options
.
sderivatives
;
sderivatives_
=
options
.
sderivatives
;
...
@@ -71,7 +71,7 @@ KAZE::KAZE(KAZEOptions& options) {
...
@@ -71,7 +71,7 @@ KAZE::KAZE(KAZEOptions& options) {
/**
/**
* @brief KAZE destructor
* @brief KAZE destructor
*/
*/
KAZE
::~
KAZE
(
void
)
{
KAZE
Features
::~
KAZEFeatures
(
void
)
{
evolution_
.
clear
();
evolution_
.
clear
();
}
}
...
@@ -82,7 +82,7 @@ KAZE::~KAZE(void) {
...
@@ -82,7 +82,7 @@ KAZE::~KAZE(void) {
/**
/**
* @brief This method allocates the memory for the nonlinear diffusion evolution
* @brief This method allocates the memory for the nonlinear diffusion evolution
*/
*/
void
KAZE
::
Allocate_Memory_Evolution
(
void
)
{
void
KAZE
Features
::
Allocate_Memory_Evolution
(
void
)
{
// Allocate the dimension of the matrices for the evolution
// Allocate the dimension of the matrices for the evolution
for
(
int
i
=
0
;
i
<=
omax_
-
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<=
omax_
-
1
;
i
++
)
{
...
@@ -145,7 +145,7 @@ void KAZE::Allocate_Memory_Evolution(void) {
...
@@ -145,7 +145,7 @@ void KAZE::Allocate_Memory_Evolution(void) {
* @param img Input image for which the nonlinear scale space needs to be created
* @param img Input image for which the nonlinear scale space needs to be created
* @return 0 if the nonlinear scale space was created successfully. -1 otherwise
* @return 0 if the nonlinear scale space was created successfully. -1 otherwise
*/
*/
int
KAZE
::
Create_Nonlinear_Scale_Space
(
const
cv
::
Mat
&
img
)
{
int
KAZE
Features
::
Create_Nonlinear_Scale_Space
(
const
cv
::
Mat
&
img
)
{
double
t2
=
0.0
,
t1
=
0.0
;
double
t2
=
0.0
,
t1
=
0.0
;
...
@@ -226,7 +226,7 @@ int KAZE::Create_Nonlinear_Scale_Space(const cv::Mat &img) {
...
@@ -226,7 +226,7 @@ int KAZE::Create_Nonlinear_Scale_Space(const cv::Mat &img) {
* @param img Input image
* @param img Input image
* @param kpercentile Percentile of the gradient histogram
* @param kpercentile Percentile of the gradient histogram
*/
*/
void
KAZE
::
Compute_KContrast
(
const
cv
::
Mat
&
img
,
const
float
&
kpercentile
)
{
void
KAZE
Features
::
Compute_KContrast
(
const
cv
::
Mat
&
img
,
const
float
&
kpercentile
)
{
if
(
verbosity_
==
true
)
{
if
(
verbosity_
==
true
)
{
cout
<<
"Computing Kcontrast factor."
<<
endl
;
cout
<<
"Computing Kcontrast factor."
<<
endl
;
...
@@ -248,7 +248,7 @@ void KAZE::Compute_KContrast(const cv::Mat &img, const float &kpercentile) {
...
@@ -248,7 +248,7 @@ void KAZE::Compute_KContrast(const cv::Mat &img, const float &kpercentile) {
/**
/**
* @brief This method computes the multiscale derivatives for the nonlinear scale space
* @brief This method computes the multiscale derivatives for the nonlinear scale space
*/
*/
void
KAZE
::
Compute_Multiscale_Derivatives
(
void
)
void
KAZE
Features
::
Compute_Multiscale_Derivatives
(
void
)
{
{
double
t2
=
0.0
,
t1
=
0.0
;
double
t2
=
0.0
,
t1
=
0.0
;
t1
=
getTickCount
();
t1
=
getTickCount
();
...
@@ -288,7 +288,7 @@ void KAZE::Compute_Multiscale_Derivatives(void)
...
@@ -288,7 +288,7 @@ void KAZE::Compute_Multiscale_Derivatives(void)
* @brief This method computes the feature detector response for the nonlinear scale space
* @brief This method computes the feature detector response for the nonlinear scale space
* @note We use the Hessian determinant as feature detector
* @note We use the Hessian determinant as feature detector
*/
*/
void
KAZE
::
Compute_Detector_Response
(
void
)
{
void
KAZE
Features
::
Compute_Detector_Response
(
void
)
{
double
t2
=
0.0
,
t1
=
0.0
;
double
t2
=
0.0
,
t1
=
0.0
;
float
lxx
=
0.0
,
lxy
=
0.0
,
lyy
=
0.0
;
float
lxx
=
0.0
,
lxy
=
0.0
,
lyy
=
0.0
;
...
@@ -326,7 +326,7 @@ void KAZE::Compute_Detector_Response(void) {
...
@@ -326,7 +326,7 @@ void KAZE::Compute_Detector_Response(void) {
* @brief This method selects interesting keypoints through the nonlinear scale space
* @brief This method selects interesting keypoints through the nonlinear scale space
* @param kpts Vector of keypoints
* @param kpts Vector of keypoints
*/
*/
void
KAZE
::
Feature_Detection
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
void
KAZE
Features
::
Feature_Detection
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
double
t2
=
0.0
,
t1
=
0.0
;
double
t2
=
0.0
,
t1
=
0.0
;
t1
=
getTickCount
();
t1
=
getTickCount
();
...
@@ -353,7 +353,7 @@ void KAZE::Feature_Detection(std::vector<cv::KeyPoint>& kpts) {
...
@@ -353,7 +353,7 @@ void KAZE::Feature_Detection(std::vector<cv::KeyPoint>& kpts) {
* @param kpts Vector of keypoints
* @param kpts Vector of keypoints
* @note We compute features for each of the nonlinear scale space level in a different processing thread
* @note We compute features for each of the nonlinear scale space level in a different processing thread
*/
*/
void
KAZE
::
Determinant_Hessian_Parallel
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
void
KAZE
Features
::
Determinant_Hessian_Parallel
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
{
int
level
=
0
;
int
level
=
0
;
float
dist
=
0.0
,
smax
=
3.0
;
float
dist
=
0.0
,
smax
=
3.0
;
...
@@ -444,7 +444,7 @@ void KAZE::Determinant_Hessian_Parallel(std::vector<cv::KeyPoint>& kpts) {
...
@@ -444,7 +444,7 @@ void KAZE::Determinant_Hessian_Parallel(std::vector<cv::KeyPoint>& kpts) {
* at a given nonlinear scale level
* at a given nonlinear scale level
* @param level Index in the nonlinear scale space evolution
* @param level Index in the nonlinear scale space evolution
*/
*/
void
KAZE
::
Find_Extremum_Threading
(
const
int
&
level
)
{
void
KAZE
Features
::
Find_Extremum_Threading
(
const
int
&
level
)
{
float
value
=
0.0
;
float
value
=
0.0
;
bool
is_extremum
=
false
;
bool
is_extremum
=
false
;
...
@@ -497,7 +497,7 @@ void KAZE::Find_Extremum_Threading(const int& level) {
...
@@ -497,7 +497,7 @@ void KAZE::Find_Extremum_Threading(const int& level) {
* @brief This method performs subpixel refinement of the detected keypoints
* @brief This method performs subpixel refinement of the detected keypoints
* @param kpts Vector of detected keypoints
* @param kpts Vector of detected keypoints
*/
*/
void
KAZE
::
Do_Subpixel_Refinement
(
std
::
vector
<
cv
::
KeyPoint
>
&
kpts
)
{
void
KAZE
Features
::
Do_Subpixel_Refinement
(
std
::
vector
<
cv
::
KeyPoint
>
&
kpts
)
{
int
step
=
1
;
int
step
=
1
;
int
x
=
0
,
y
=
0
;
int
x
=
0
,
y
=
0
;
...
@@ -603,7 +603,7 @@ void KAZE::Do_Subpixel_Refinement(std::vector<cv::KeyPoint> &kpts) {
...
@@ -603,7 +603,7 @@ void KAZE::Do_Subpixel_Refinement(std::vector<cv::KeyPoint> &kpts) {
* @param kpts Vector of keypoints
* @param kpts Vector of keypoints
* @param mdist Maximum distance in pixels
* @param mdist Maximum distance in pixels
*/
*/
void
KAZE
::
Feature_Suppression_Distance
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
const
float
&
mdist
)
{
void
KAZE
Features
::
Feature_Suppression_Distance
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
const
float
&
mdist
)
{
vector
<
KeyPoint
>
aux
;
vector
<
KeyPoint
>
aux
;
vector
<
int
>
to_delete
;
vector
<
int
>
to_delete
;
...
@@ -659,7 +659,7 @@ void KAZE::Feature_Suppression_Distance(std::vector<cv::KeyPoint>& kpts, const f
...
@@ -659,7 +659,7 @@ void KAZE::Feature_Suppression_Distance(std::vector<cv::KeyPoint>& kpts, const f
* @param kpts Vector of keypoints
* @param kpts Vector of keypoints
* @param desc Matrix with the feature descriptors
* @param desc Matrix with the feature descriptors
*/
*/
void
KAZE
::
Feature_Description
(
std
::
vector
<
cv
::
KeyPoint
>
&
kpts
,
cv
::
Mat
&
desc
)
{
void
KAZE
Features
::
Feature_Description
(
std
::
vector
<
cv
::
KeyPoint
>
&
kpts
,
cv
::
Mat
&
desc
)
{
double
t2
=
0.0
,
t1
=
0.0
;
double
t2
=
0.0
,
t1
=
0.0
;
t1
=
getTickCount
();
t1
=
getTickCount
();
...
@@ -807,7 +807,7 @@ void KAZE::Feature_Description(std::vector<cv::KeyPoint> &kpts, cv::Mat &desc) {
...
@@ -807,7 +807,7 @@ void KAZE::Feature_Description(std::vector<cv::KeyPoint> &kpts, cv::Mat &desc) {
* @note The orientation is computed using a similar approach as described in the
* @note The orientation is computed using a similar approach as described in the
* original SURF method. See Bay et al., Speeded Up Robust Features, ECCV 2006
* original SURF method. See Bay et al., Speeded Up Robust Features, ECCV 2006
*/
*/
void
KAZE
::
Compute_Main_Orientation_SURF
(
cv
::
KeyPoint
&
kpt
)
void
KAZE
Features
::
Compute_Main_Orientation_SURF
(
cv
::
KeyPoint
&
kpt
)
{
{
int
ix
=
0
,
iy
=
0
,
idx
=
0
,
s
=
0
,
level
=
0
;
int
ix
=
0
,
iy
=
0
,
idx
=
0
,
s
=
0
,
level
=
0
;
float
xf
=
0.0
,
yf
=
0.0
,
gweight
=
0.0
;
float
xf
=
0.0
,
yf
=
0.0
,
gweight
=
0.0
;
...
@@ -888,7 +888,7 @@ void KAZE::Compute_Main_Orientation_SURF(cv::KeyPoint &kpt)
...
@@ -888,7 +888,7 @@ void KAZE::Compute_Main_Orientation_SURF(cv::KeyPoint &kpt)
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Speeded Up Robust Features, ECCV, 2006
* Speeded Up Robust Features, ECCV, 2006
*/
*/
void
KAZE
::
Get_SURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_SURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
sample_x
=
0.0
,
sample_y
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
sample_x
=
0.0
,
sample_y
=
0.0
;
...
@@ -987,7 +987,7 @@ void KAZE::Get_SURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
...
@@ -987,7 +987,7 @@ void KAZE::Get_SURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Speeded Up Robust Features, ECCV, 2006
* Speeded Up Robust Features, ECCV, 2006
*/
*/
void
KAZE
::
Get_SURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
KAZE
Features
::
Get_SURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -1094,7 +1094,7 @@ void KAZE::Get_SURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc) {
...
@@ -1094,7 +1094,7 @@ void KAZE::Get_SURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc) {
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* ECCV 2008
* ECCV 2008
*/
*/
void
KAZE
::
Get_MSURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_MSURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
...
@@ -1226,7 +1226,7 @@ void KAZE::Get_MSURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
...
@@ -1226,7 +1226,7 @@ void KAZE::Get_MSURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* ECCV 2008
* ECCV 2008
*/
*/
void
KAZE
::
Get_MSURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_MSURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
,
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
...
@@ -1359,7 +1359,7 @@ void KAZE::Get_MSURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
...
@@ -1359,7 +1359,7 @@ void KAZE::Get_MSURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
*/
*/
void
KAZE
::
Get_GSURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_GSURF_Upright_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -1494,7 +1494,7 @@ void KAZE::Get_GSURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
...
@@ -1494,7 +1494,7 @@ void KAZE::Get_GSURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
*/
*/
void
KAZE
::
Get_GSURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_GSURF_Descriptor_64
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
dx
=
0.0
,
dy
=
0.0
,
mdx
=
0.0
,
mdy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
...
@@ -1633,7 +1633,7 @@ void KAZE::Get_GSURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
...
@@ -1633,7 +1633,7 @@ void KAZE::Get_GSURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Speeded Up Robust Features, ECCV, 2006
* Speeded Up Robust Features, ECCV, 2006
*/
*/
void
KAZE
::
Get_SURF_Upright_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_SURF_Upright_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
sample_x
=
0.0
,
sample_y
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
sample_x
=
0.0
,
sample_y
=
0.0
;
float
fx
=
0.0
,
fy
=
0.0
,
res1
=
0.0
,
res2
=
0.0
,
res3
=
0.0
,
res4
=
0.0
;
float
fx
=
0.0
,
fy
=
0.0
,
res1
=
0.0
,
res2
=
0.0
,
res3
=
0.0
,
res4
=
0.0
;
...
@@ -1752,7 +1752,7 @@ void KAZE::Get_SURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, float *desc)
...
@@ -1752,7 +1752,7 @@ void KAZE::Get_SURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, float *desc)
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Gaussian weighting is performed. The descriptor is inspired from Bay et al.,
* Speeded Up Robust Features, ECCV, 2006
* Speeded Up Robust Features, ECCV, 2006
*/
*/
void
KAZE
::
Get_SURF_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_SURF_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
sample_x
=
0.0
,
sample_y
=
0.0
,
co
=
0.0
,
si
=
0.0
,
angle
=
0.0
;
float
sample_x
=
0.0
,
sample_y
=
0.0
,
co
=
0.0
,
si
=
0.0
,
angle
=
0.0
;
...
@@ -1880,7 +1880,7 @@ void KAZE::Get_SURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc)
...
@@ -1880,7 +1880,7 @@ void KAZE::Get_SURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc)
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* ECCV 2008
* ECCV 2008
*/
*/
void
KAZE
::
Get_MSURF_Upright_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
KAZE
Features
::
Get_MSURF_Upright_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
...
@@ -2036,7 +2036,7 @@ void KAZE::Get_MSURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, float *desc
...
@@ -2036,7 +2036,7 @@ void KAZE::Get_MSURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, float *desc
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
* ECCV 2008
* ECCV 2008
*/
*/
void
KAZE
::
Get_MSURF_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
KAZE
Features
::
Get_MSURF_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
gauss_s1
=
0.0
,
gauss_s2
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rrx
=
0.0
,
rry
=
0.0
,
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
ys
=
0.0
,
xs
=
0.0
;
...
@@ -2197,7 +2197,7 @@ void KAZE::Get_MSURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc) {
...
@@ -2197,7 +2197,7 @@ void KAZE::Get_MSURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc) {
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
*/
*/
void
KAZE
::
Get_GSURF_Upright_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
void
KAZE
Features
::
Get_GSURF_Upright_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
{
float
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
sample_x
=
0.0
,
sample_y
=
0.0
;
float
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
,
sample_x
=
0.0
,
sample_y
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
,
modg
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
,
modg
=
0.0
;
...
@@ -2350,7 +2350,7 @@ void KAZE::Get_GSURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, float *desc
...
@@ -2350,7 +2350,7 @@ void KAZE::Get_GSURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, float *desc
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* G-SURF descriptor as described in Pablo F. Alcantarilla, Luis M. Bergasa and
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
* Andrew J. Davison, Gauge-SURF Descriptors, Image and Vision Computing 31(1), 2013
*/
*/
void
KAZE
::
Get_GSURF_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
void
KAZE
Features
::
Get_GSURF_Descriptor_128
(
const
cv
::
KeyPoint
&
kpt
,
float
*
desc
)
{
float
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
len
=
0.0
,
xf
=
0.0
,
yf
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
;
float
rx
=
0.0
,
ry
=
0.0
,
rxx
=
0.0
,
rxy
=
0.0
,
ryy
=
0.0
;
...
@@ -2509,7 +2509,7 @@ void KAZE::Get_GSURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc) {
...
@@ -2509,7 +2509,7 @@ void KAZE::Get_GSURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc) {
* If c is a matrix of the same size as Ld, the diffusion will be nonlinear
* If c is a matrix of the same size as Ld, the diffusion will be nonlinear
* The stepsize can be arbitrarilly large
* The stepsize can be arbitrarilly large
*/
*/
void
KAZE
::
AOS_Step_Scalar
(
cv
::
Mat
&
Ld
,
const
cv
::
Mat
&
Ldprev
,
const
cv
::
Mat
&
c
,
const
float
&
stepsize
)
{
void
KAZE
Features
::
AOS_Step_Scalar
(
cv
::
Mat
&
Ld
,
const
cv
::
Mat
&
Ldprev
,
const
cv
::
Mat
&
c
,
const
float
&
stepsize
)
{
#ifdef _OPENMP
#ifdef _OPENMP
#pragma omp sections
#pragma omp sections
...
@@ -2540,7 +2540,7 @@ void KAZE::AOS_Step_Scalar(cv::Mat &Ld, const cv::Mat &Ldprev, const cv::Mat &c,
...
@@ -2540,7 +2540,7 @@ void KAZE::AOS_Step_Scalar(cv::Mat &Ld, const cv::Mat &Ldprev, const cv::Mat &c,
* @param c Conductivity image
* @param c Conductivity image
* @param stepsize Stepsize for the nonlinear diffusion evolution
* @param stepsize Stepsize for the nonlinear diffusion evolution
*/
*/
void
KAZE
::
AOS_Rows
(
const
cv
::
Mat
&
Ldprev
,
const
cv
::
Mat
&
c
,
const
float
&
stepsize
)
{
void
KAZE
Features
::
AOS_Rows
(
const
cv
::
Mat
&
Ldprev
,
const
cv
::
Mat
&
c
,
const
float
&
stepsize
)
{
// Operate on rows
// Operate on rows
for
(
int
i
=
0
;
i
<
qr_
.
rows
;
i
++
)
{
for
(
int
i
=
0
;
i
<
qr_
.
rows
;
i
++
)
{
...
@@ -2581,7 +2581,7 @@ void KAZE::AOS_Rows(const cv::Mat &Ldprev, const cv::Mat &c, const float& stepsi
...
@@ -2581,7 +2581,7 @@ void KAZE::AOS_Rows(const cv::Mat &Ldprev, const cv::Mat &c, const float& stepsi
* @param c Conductivity image
* @param c Conductivity image
* @param stepsize Stepsize for the nonlinear diffusion evolution
* @param stepsize Stepsize for the nonlinear diffusion evolution
*/
*/
void
KAZE
::
AOS_Columns
(
const
cv
::
Mat
&
Ldprev
,
const
cv
::
Mat
&
c
,
const
float
&
stepsize
)
{
void
KAZE
Features
::
AOS_Columns
(
const
cv
::
Mat
&
Ldprev
,
const
cv
::
Mat
&
c
,
const
float
&
stepsize
)
{
// Operate on columns
// Operate on columns
for
(
int
j
=
0
;
j
<
qc_
.
cols
;
j
++
)
{
for
(
int
j
=
0
;
j
<
qc_
.
cols
;
j
++
)
{
...
@@ -2624,7 +2624,7 @@ void KAZE::AOS_Columns(const cv::Mat &Ldprev, const cv::Mat &c, const float& ste
...
@@ -2624,7 +2624,7 @@ void KAZE::AOS_Columns(const cv::Mat &Ldprev, const cv::Mat &c, const float& ste
* @brief This method does the Thomas algorithm for solving a tridiagonal linear system
* @brief This method does the Thomas algorithm for solving a tridiagonal linear system
* @note The matrix A must be strictly diagonally dominant for a stable solution
* @note The matrix A must be strictly diagonally dominant for a stable solution
*/
*/
void
KAZE
::
Thomas
(
const
cv
::
Mat
&
a
,
const
cv
::
Mat
&
b
,
const
cv
::
Mat
&
Ld
,
cv
::
Mat
&
x
)
{
void
KAZE
Features
::
Thomas
(
const
cv
::
Mat
&
a
,
const
cv
::
Mat
&
b
,
const
cv
::
Mat
&
Ld
,
cv
::
Mat
&
x
)
{
// Auxiliary variables
// Auxiliary variables
int
n
=
a
.
rows
;
int
n
=
a
.
rows
;
...
...
modules/features2d/src/kaze/KAZE.h
100755 → 100644
View file @
703e012a
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
//*************************************************************************************
//*************************************************************************************
// KAZE Class Declaration
// KAZE Class Declaration
class
KAZE
{
class
KAZE
Features
{
private
:
private
:
...
@@ -69,10 +69,10 @@ private:
...
@@ -69,10 +69,10 @@ private:
public
:
public
:
// Constructor
// Constructor
KAZE
(
KAZEOptions
&
options
);
KAZE
Features
(
KAZEOptions
&
options
);
// Destructor
// Destructor
~
KAZE
(
void
);
~
KAZE
Features
(
void
);
// Public methods for KAZE interface
// Public methods for KAZE interface
void
Allocate_Memory_Evolution
(
void
);
void
Allocate_Memory_Evolution
(
void
);
...
@@ -80,11 +80,6 @@ public:
...
@@ -80,11 +80,6 @@ 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
);
// Methods for saving the scale space set of images and detector responses
void
Save_Nonlinear_Scale_Space
(
void
);
void
Save_Detector_Responses
(
void
);
void
Save_Flow_Responses
(
void
);
private
:
private
:
// Feature Detection Methods
// Feature Detection Methods
...
...
modules/features2d/src/kaze/config.h
View file @
703e012a
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
* @author Pablo F. Alcantarilla
* @author Pablo F. Alcantarilla
*/
*/
#ifndef _
CONFIG_H
_
#ifndef _
_OPENCV_FEATURES_2D_KAZE_CONFIG_HPP_
_
#define _
CONFIG_H
_
#define _
_OPENCV_FEATURES_2D_KAZE_CONFIG_HPP_
_
//******************************************************************************
//******************************************************************************
//******************************************************************************
//******************************************************************************
...
@@ -38,30 +38,30 @@
...
@@ -38,30 +38,30 @@
#define NMAX_CHAR 400
#define NMAX_CHAR 400
// Some default options
// Some default options
const
float
DEFAULT_SCALE_OFFSET
=
1
.
60
;
// Base scale offset (sigma units)
static
const
float
DEFAULT_SCALE_OFFSET
=
1
.
60
;
// Base scale offset (sigma units)
const
float
DEFAULT_OCTAVE_MAX
=
4
.
0
;
// Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)
static
const
float
DEFAULT_OCTAVE_MAX
=
4
.
0
;
// Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)
const
int
DEFAULT_NSUBLEVELS
=
4
;
// Default number of sublevels per scale level
static
const
int
DEFAULT_NSUBLEVELS
=
4
;
// Default number of sublevels per scale level
const
float
DEFAULT_DETECTOR_THRESHOLD
=
0
.
001
;
// Detector response threshold to accept point
static
const
float
DEFAULT_DETECTOR_THRESHOLD
=
0
.
001
;
// Detector response threshold to accept point
const
float
DEFAULT_MIN_DETECTOR_THRESHOLD
=
0
.
00001
;
// Minimum Detector response threshold to accept point
static
const
float
DEFAULT_MIN_DETECTOR_THRESHOLD
=
0
.
00001
;
// Minimum Detector response threshold to accept point
const
int
DEFAULT_DESCRIPTOR_MODE
=
1
;
// Descriptor Mode 0->SURF, 1->M-SURF
static
const
int
DEFAULT_DESCRIPTOR_MODE
=
1
;
// Descriptor Mode 0->SURF, 1->M-SURF
const
bool
DEFAULT_USE_FED
=
true
;
// 0->AOS, 1->FED
static
const
bool
DEFAULT_USE_FED
=
true
;
// 0->AOS, 1->FED
const
bool
DEFAULT_UPRIGHT
=
false
;
// Upright descriptors, not invariant to rotation
static
const
bool
DEFAULT_UPRIGHT
=
false
;
// Upright descriptors, not invariant to rotation
const
bool
DEFAULT_EXTENDED
=
false
;
// Extended descriptor, dimension 128
static
const
bool
DEFAULT_EXTENDED
=
false
;
// Extended descriptor, dimension 128
const
bool
DEFAULT_SAVE_SCALE_SPACE
=
false
;
// For saving the scale space images
static
const
bool
DEFAULT_SAVE_SCALE_SPACE
=
false
;
// For saving the scale space images
const
bool
DEFAULT_VERBOSITY
=
false
;
// Verbosity level (0->no verbosity)
static
const
bool
DEFAULT_VERBOSITY
=
false
;
// Verbosity level (0->no verbosity)
const
bool
DEFAULT_SHOW_RESULTS
=
true
;
// For showing the output image with the detected features plus some ratios
static
const
bool
DEFAULT_SHOW_RESULTS
=
true
;
// For showing the output image with the detected features plus some ratios
const
bool
DEFAULT_SAVE_KEYPOINTS
=
false
;
// For saving the list of keypoints
static
const
bool
DEFAULT_SAVE_KEYPOINTS
=
false
;
// For saving the list of keypoints
// Some important configuration variables
// Some important configuration variables
const
float
DEFAULT_SIGMA_SMOOTHING_DERIVATIVES
=
1
.
0
;
static
const
float
DEFAULT_SIGMA_SMOOTHING_DERIVATIVES
=
1
.
0
;
const
float
DEFAULT_KCONTRAST
=
.
01
;
static
const
float
DEFAULT_KCONTRAST
=
.
01
;
const
float
KCONTRAST_PERCENTILE
=
0
.
7
;
static
const
float
KCONTRAST_PERCENTILE
=
0
.
7
;
const
int
KCONTRAST_NBINS
=
300
;
static
const
int
KCONTRAST_NBINS
=
300
;
const
bool
COMPUTE_KCONTRAST
=
true
;
static
const
bool
COMPUTE_KCONTRAST
=
true
;
const
int
DEFAULT_DIFFUSIVITY_TYPE
=
1
;
// 0 -> PM G1, 1 -> PM G2, 2 -> Weickert
static
const
int
DEFAULT_DIFFUSIVITY_TYPE
=
1
;
// 0 -> PM G1, 1 -> PM G2, 2 -> Weickert
const
bool
USE_CLIPPING_NORMALIZATION
=
false
;
static
const
bool
USE_CLIPPING_NORMALIZATION
=
false
;
const
float
CLIPPING_NORMALIZATION_RATIO
=
1
.
6
;
static
const
float
CLIPPING_NORMALIZATION_RATIO
=
1
.
6
;
const
int
CLIPPING_NORMALIZATION_NITER
=
5
;
static
const
int
CLIPPING_NORMALIZATION_NITER
=
5
;
//*************************************************************************************
//*************************************************************************************
//*************************************************************************************
//*************************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment