Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
2d85137e
Commit
2d85137e
authored
May 17, 2015
by
cbalint13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes, reorganize, fix memleaks, more API tests.
parent
0c32bce3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
9 deletions
+69
-9
xfeatures2d.hpp
modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
+64
-4
perf_daisy.cpp
modules/xfeatures2d/perf/perf_daisy.cpp
+3
-3
daisy.cpp
modules/xfeatures2d/src/daisy.cpp
+0
-0
test_rotation_and_scale_invariance.cpp
...s/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
+2
-2
No files found.
modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
View file @
2d85137e
...
...
@@ -150,7 +150,6 @@ public:
@param q_radius amount of radial range division quantity
@param q_theta amount of angular range division quantity
@param q_hist amount of gradient orientations range division quantity
@param mode choose computation mode of descriptors where
DAISY::ONLY_KEYS means to compute descriptors only for keypoints in the list (default) and
DAISY::COMP_FULL will compute descriptors for all pixels in the given image
@param norm choose descriptors normalization type, where
...
...
@@ -168,12 +167,73 @@ class CV_EXPORTS DAISY : public DescriptorExtractor
public
:
enum
{
ONLY_KEYS
=
0
,
COMP_FULL
=
1
,
NRM_NONE
=
100
,
NRM_PARTIAL
=
101
,
NRM_FULL
=
102
,
NRM_SIFT
=
103
,
};
static
Ptr
<
DAISY
>
create
(
float
radius
=
15
,
int
q_radius
=
3
,
int
q_theta
=
8
,
int
q_hist
=
8
,
int
mode
=
DAISY
::
ONLY_KEYS
,
int
norm
=
DAISY
::
NRM_NONE
,
InputArray
H
=
noArray
()
,
bool
interpolation
=
true
,
bool
use_orientation
=
false
);
int
q_hist
=
8
,
int
norm
=
DAISY
::
NRM_NONE
,
InputArray
H
=
noArray
(),
bool
interpolation
=
true
,
bool
use_orientation
=
false
);
/** @overload
* @param image image to extract descriptors
* @param keypoints of interest within image
* @param descriptors resulted descriptors array
*/
virtual
void
compute
(
InputArray
image
,
std
::
vector
<
KeyPoint
>&
keypoints
,
OutputArray
descriptors
)
=
0
;
/** @overload
* @param image image to extract descriptors
* @param roi region of interest within image
* @param descriptors resulted descriptors array for roi image pixels
*/
virtual
void
compute
(
InputArray
image
,
Rect
roi
,
OutputArray
descriptors
)
=
0
;
/**@overload
* @param image image to extract descriptors
* @param descriptors resulted descriptors array for all image pixels
*/
virtual
void
compute
(
InputArray
image
,
OutputArray
descriptors
)
=
0
;
/**
* @param y position y on image
* @param x position x on image
* @param ori orientation on image (0->360)
* @param descriptor supplied array for descriptor storage
*/
virtual
void
get_descriptor
(
double
y
,
double
x
,
int
orientation
,
float
*
descriptor
)
const
=
0
;
/**
* @param y position y on image
* @param x position x on image
* @param ori orientation on image (0->360)
* @param H homography matrix for warped grid
* @param descriptor supplied array for descriptor storage
* @param get_descriptor true if descriptor was computed
*/
virtual
bool
get_descriptor
(
double
y
,
double
x
,
int
orientation
,
double
*
H
,
float
*
descriptor
)
const
=
0
;
/**
* @param y position y on image
* @param x position x on image
* @param ori orientation on image (0->360)
* @param descriptor supplied array for descriptor storage
*/
virtual
void
get_unnormalized_descriptor
(
double
y
,
double
x
,
int
orientation
,
float
*
descriptor
)
const
=
0
;
/**
* @param y position y on image
* @param x position x on image
* @param ori orientation on image (0->360)
* @param H homography matrix for warped grid
* @param descriptor supplied array for descriptor storage
* @param get_unnormalized_descriptor true if descriptor was computed
*/
virtual
bool
get_unnormalized_descriptor
(
double
y
,
double
x
,
int
orientation
,
double
*
H
,
float
*
descriptor
)
const
=
0
;
/**
* @param image set image as working
*/
virtual
void
set_image
(
InputArray
image
)
=
0
;
};
...
...
modules/xfeatures2d/perf/perf_daisy.cpp
View file @
2d85137e
...
...
@@ -22,12 +22,12 @@ PERF_TEST_P(daisy, extract, testing::Values(DAISY_IMAGES))
Mat
mask
;
declare
.
in
(
frame
).
time
(
90
);
// use DAISY in COMP_FULL mode (every pixel, dense baseline mode)
Ptr
<
DAISY
>
descriptor
=
DAISY
::
create
(
15
,
3
,
8
,
8
,
DAISY
::
COMP_FULL
,
DAISY
::
NRM_NONE
,
noArray
(),
true
,
false
);
Ptr
<
DAISY
>
descriptor
=
DAISY
::
create
();
vector
<
KeyPoint
>
points
;
vector
<
float
>
descriptors
;
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
points
,
descriptors
);
// compute all daisies in image
TEST_CYCLE
()
descriptor
->
compute
(
frame
,
descriptors
);
SANITY_CHECK
(
descriptors
,
1e-4
);
}
modules/xfeatures2d/src/daisy.cpp
View file @
2d85137e
This diff is collapsed.
Click to expand it.
modules/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
View file @
2d85137e
...
...
@@ -654,7 +654,7 @@ TEST(Features2d_RotationInvariance_Descriptor_SIFT, regression)
TEST
(
Features2d_RotationInvariance_Descriptor_DAISY
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
BRISK
::
create
(),
DAISY
::
create
(
15
,
3
,
8
,
8
,
DAISY
::
ONLY_KEYS
,
DAISY
::
NRM_NONE
,
noArray
(),
true
,
true
),
DAISY
::
create
(
15
,
3
,
8
,
8
,
DAISY
::
NRM_NONE
,
noArray
(),
true
,
true
),
NORM_L1
,
0.79
f
);
test
.
safe_run
();
...
...
@@ -721,7 +721,7 @@ TEST(Features2d_RotationInvariance2_Detector_SURF, regression)
TEST
(
Features2d_ScaleInvariance_Descriptor_DAISY
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
BRISK
::
create
(),
DAISY
::
create
(
15
,
3
,
8
,
8
,
DAISY
::
ONLY_KEYS
,
DAISY
::
NRM_NONE
,
noArray
(),
true
,
true
),
DAISY
::
create
(
15
,
3
,
8
,
8
,
DAISY
::
NRM_NONE
,
noArray
(),
true
,
true
),
NORM_L1
,
0.075
f
);
test
.
safe_run
();
...
...
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