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
cc0a94c5
Commit
cc0a94c5
authored
Apr 28, 2014
by
Ievgen Khvedchenia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "conditional expression constant" warning
parent
2162aab0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
22 deletions
+27
-22
akaze.cpp
modules/features2d/src/akaze.cpp
+5
-4
kaze.cpp
modules/features2d/src/kaze.cpp
+5
-4
KAZE.cpp
modules/features2d/src/kaze/KAZE.cpp
+16
-14
KAZE.h
modules/features2d/src/kaze/KAZE.h
+1
-0
No files found.
modules/features2d/src/akaze.cpp
View file @
cc0a94c5
...
...
@@ -150,8 +150,8 @@ namespace cv
impl
.
Compute_Descriptors
(
keypoints
,
desc
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
())
&&
"Descriptor size does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
()))
&&
"Descriptor type does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
()));
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
())));
}
void
AKAZE
::
detectImpl
(
InputArray
image
,
std
::
vector
<
KeyPoint
>&
keypoints
,
InputArray
mask
)
const
...
...
@@ -196,7 +196,7 @@ namespace cv
impl
.
Create_Nonlinear_Scale_Space
(
img1_32
);
impl
.
Compute_Descriptors
(
keypoints
,
desc
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
())
&&
"Descriptor size does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
()))
&&
"Descriptor type does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
()));
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
())));
}
}
\ No newline at end of file
modules/features2d/src/kaze.cpp
View file @
cc0a94c5
...
...
@@ -119,8 +119,8 @@ namespace cv
impl
.
Feature_Description
(
keypoints
,
desc
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
())
&&
"Descriptor size does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
()))
&&
"Descriptor type does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
()));
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
())));
}
void
KAZE
::
detectImpl
(
InputArray
image
,
std
::
vector
<
KeyPoint
>&
keypoints
,
InputArray
mask
)
const
...
...
@@ -167,7 +167,7 @@ namespace cv
impl
.
Create_Nonlinear_Scale_Space
(
img1_32
);
impl
.
Feature_Description
(
keypoints
,
desc
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
())
&&
"Descriptor size does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
()))
&&
"Descriptor type does not match expected"
);
CV_Assert
((
!
desc
.
rows
||
desc
.
cols
==
descriptorSize
()));
CV_Assert
((
!
desc
.
rows
||
(
desc
.
type
()
&
descriptorType
())));
}
}
\ No newline at end of file
modules/features2d/src/kaze/KAZE.cpp
View file @
cc0a94c5
...
...
@@ -51,6 +51,8 @@ KAZEFeatures::KAZEFeatures(KAZEOptions& options) {
use_fed_
=
options
.
use_fed
;
use_upright_
=
options
.
upright
;
use_extended_
=
options
.
extended
;
use_normalization
=
USE_CLIPPING_NORMALIZATION
;
kcontrast_
=
DEFAULT_KCONTRAST
;
ncycles_
=
0
;
reordering_
=
true
;
...
...
@@ -232,9 +234,9 @@ void KAZEFeatures::Compute_KContrast(const cv::Mat &img, const float &kpercentil
// cout << "Computing Kcontrast factor." << endl;
//}
if
(
COMPUTE_KCONTRAST
)
{
//
if (COMPUTE_KCONTRAST) {
kcontrast_
=
compute_k_percentile
(
img
,
kpercentile
,
sderivatives_
,
KCONTRAST_NBINS
,
0
,
0
);
}
//
}
//if (verbosity_ == true) {
// cout << "kcontrast = " << kcontrast_ << endl;
...
...
@@ -972,7 +974,7 @@ void KAZEFeatures::Get_SURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, float
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -1079,7 +1081,7 @@ void KAZEFeatures::Get_SURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -1211,7 +1213,7 @@ void KAZEFeatures::Get_MSURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, floa
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -1344,7 +1346,7 @@ void KAZEFeatures::Get_MSURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -1479,7 +1481,7 @@ void KAZEFeatures::Get_GSURF_Upright_Descriptor_64(const cv::KeyPoint &kpt, floa
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -1617,7 +1619,7 @@ void KAZEFeatures::Get_GSURF_Descriptor_64(const cv::KeyPoint &kpt, float *desc)
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
...
...
@@ -1737,7 +1739,7 @@ void KAZEFeatures::Get_SURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, floa
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -1865,7 +1867,7 @@ void KAZEFeatures::Get_SURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc)
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -2021,7 +2023,7 @@ void KAZEFeatures::Get_MSURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, flo
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -2182,7 +2184,7 @@ void KAZEFeatures::Get_MSURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -2335,7 +2337,7 @@ void KAZEFeatures::Get_GSURF_Upright_Descriptor_128(const cv::KeyPoint &kpt, flo
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
@@ -2493,7 +2495,7 @@ void KAZEFeatures::Get_GSURF_Descriptor_128(const cv::KeyPoint &kpt, float *desc
desc
[
i
]
/=
len
;
}
if
(
USE_CLIPPING_NORMALIZATION
==
true
)
{
if
(
use_normalization
==
true
)
{
clippingDescriptor
(
desc
,
dsize
,
CLIPPING_NORMALIZATION_NITER
,
CLIPPING_NORMALIZATION_RATIO
);
}
}
...
...
modules/features2d/src/kaze/KAZE.h
View file @
cc0a94c5
...
...
@@ -43,6 +43,7 @@ private:
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
std
::
vector
<
std
::
vector
<
cv
::
KeyPoint
>
>
kpts_par_
;
...
...
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