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
069d51d2
Commit
069d51d2
authored
Dec 13, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7836 from sovrasov:akaze_fix_detect_only_mode
parents
1473f032
4a3da1c4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
akaze.cpp
modules/features2d/src/akaze.cpp
+2
-0
AKAZEFeatures.cpp
modules/features2d/src/kaze/AKAZEFeatures.cpp
+11
-0
AKAZEFeatures.h
modules/features2d/src/kaze/AKAZEFeatures.h
+1
-0
test_detectors_regression.cpp
modules/features2d/test/test_detectors_regression.cpp
+20
-0
No files found.
modules/features2d/src/akaze.cpp
View file @
069d51d2
...
@@ -200,6 +200,8 @@ namespace cv
...
@@ -200,6 +200,8 @@ namespace cv
if
(
!
useProvidedKeypoints
)
if
(
!
useProvidedKeypoints
)
{
{
impl
.
Feature_Detection
(
keypoints
);
impl
.
Feature_Detection
(
keypoints
);
if
(
!
descriptors
.
needed
()
)
impl
.
Compute_Keypoints_Orientation
(
keypoints
);
}
}
if
(
!
mask
.
empty
())
if
(
!
mask
.
empty
())
...
...
modules/features2d/src/kaze/AKAZEFeatures.cpp
View file @
069d51d2
...
@@ -844,6 +844,17 @@ void AKAZEFeatures::Compute_Main_Orientation(KeyPoint& kpt, const std::vector<TE
...
@@ -844,6 +844,17 @@ void AKAZEFeatures::Compute_Main_Orientation(KeyPoint& kpt, const std::vector<TE
}
}
}
}
/* ************************************************************************* */
/**
* @brief This method computes the main orientation for a given keypoints
* @param kpts Input keypoints
*/
void
AKAZEFeatures
::
Compute_Keypoints_Orientation
(
std
::
vector
<
KeyPoint
>&
kpts
)
const
{
for
(
size_t
i
=
0
;
i
<
kpts
.
size
();
i
++
)
Compute_Main_Orientation
(
kpts
[
i
],
evolution_
);
}
/* ************************************************************************* */
/* ************************************************************************* */
/**
/**
* @brief This method computes the upright descriptor (not rotation invariant) of
* @brief This method computes the upright descriptor (not rotation invariant) of
...
...
modules/features2d/src/kaze/AKAZEFeatures.h
View file @
069d51d2
...
@@ -54,6 +54,7 @@ public:
...
@@ -54,6 +54,7 @@ public:
/// Feature description methods
/// Feature description methods
void
Compute_Descriptors
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
cv
::
Mat
&
desc
);
void
Compute_Descriptors
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
,
cv
::
Mat
&
desc
);
static
void
Compute_Main_Orientation
(
cv
::
KeyPoint
&
kpt
,
const
std
::
vector
<
TEvolution
>&
evolution_
);
static
void
Compute_Main_Orientation
(
cv
::
KeyPoint
&
kpt
,
const
std
::
vector
<
TEvolution
>&
evolution_
);
void
Compute_Keypoints_Orientation
(
std
::
vector
<
cv
::
KeyPoint
>&
kpts
)
const
;
};
};
/* ************************************************************************* */
/* ************************************************************************* */
...
...
modules/features2d/test/test_detectors_regression.cpp
View file @
069d51d2
...
@@ -301,3 +301,23 @@ TEST( Features2d_Detector_AKAZE, regression )
...
@@ -301,3 +301,23 @@ TEST( Features2d_Detector_AKAZE, regression )
CV_FeatureDetectorTest
test
(
"detector-akaze"
,
AKAZE
::
create
()
);
CV_FeatureDetectorTest
test
(
"detector-akaze"
,
AKAZE
::
create
()
);
test
.
safe_run
();
test
.
safe_run
();
}
}
TEST
(
Features2d_Detector_AKAZE
,
detect_and_compute_split
)
{
Mat
testImg
(
100
,
100
,
CV_8U
);
RNG
rng
(
101
);
rng
.
fill
(
testImg
,
RNG
::
UNIFORM
,
Scalar
(
0
),
Scalar
(
255
),
true
);
Ptr
<
Feature2D
>
ext
=
AKAZE
::
create
(
AKAZE
::
DESCRIPTOR_MLDB
,
0
,
3
,
0.001
f
,
1
,
1
,
KAZE
::
DIFF_PM_G2
);
vector
<
KeyPoint
>
detAndCompKps
;
Mat
desc
;
ext
->
detectAndCompute
(
testImg
,
noArray
(),
detAndCompKps
,
desc
);
vector
<
KeyPoint
>
detKps
;
ext
->
detect
(
testImg
,
detKps
);
ASSERT_EQ
(
detKps
.
size
(),
detAndCompKps
.
size
());
for
(
size_t
i
=
0
;
i
<
detKps
.
size
();
i
++
)
ASSERT_EQ
(
detKps
[
i
].
hash
(),
detAndCompKps
[
i
].
hash
());
}
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