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
b4275e19
Commit
b4275e19
authored
May 26, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added clear method to GenericDescriptorMatch
parent
9690cd39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+5
-0
descriptors.cpp
modules/features2d/src/descriptors.cpp
+11
-0
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
b4275e19
...
@@ -1559,6 +1559,9 @@ public:
...
@@ -1559,6 +1559,9 @@ public:
// Returns the keypoint by its global index
// Returns the keypoint by its global index
KeyPoint
getKeyPoint
(
int
index
)
const
;
KeyPoint
getKeyPoint
(
int
index
)
const
;
// Clears images, keypoints and startIndices
void
clear
();
vector
<
Mat
>
images
;
vector
<
Mat
>
images
;
vector
<
vector
<
KeyPoint
>
>
points
;
vector
<
vector
<
KeyPoint
>
>
points
;
...
@@ -1599,6 +1602,8 @@ public:
...
@@ -1599,6 +1602,8 @@ public:
// class_ids A vector to be filled with keypoint class_ids
// class_ids A vector to be filled with keypoint class_ids
virtual
void
match
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
points
,
vector
<
int
>&
indices
)
=
0
;
virtual
void
match
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
points
,
vector
<
int
>&
indices
)
=
0
;
// Clears keypoints storing in collection
virtual
void
clear
();
protected
:
protected
:
KeyPointCollection
collection
;
KeyPointCollection
collection
;
};
};
...
...
modules/features2d/src/descriptors.cpp
View file @
b4275e19
...
@@ -150,6 +150,13 @@ size_t KeyPointCollection::calcKeypointCount() const
...
@@ -150,6 +150,13 @@ size_t KeyPointCollection::calcKeypointCount() const
return
*
startIndices
.
rbegin
()
+
points
.
rbegin
()
->
size
();
return
*
startIndices
.
rbegin
()
+
points
.
rbegin
()
->
size
();
}
}
void
KeyPointCollection
::
clear
()
{
images
.
clear
();
points
.
clear
();
startIndices
.
clear
();
}
/*
/*
* GenericDescriptorMatch
* GenericDescriptorMatch
*/
*/
...
@@ -169,6 +176,10 @@ void GenericDescriptorMatch::classify( const Mat& image, vector<cv::KeyPoint>& p
...
@@ -169,6 +176,10 @@ void GenericDescriptorMatch::classify( const Mat& image, vector<cv::KeyPoint>& p
points
[
i
].
class_id
=
collection
.
getKeyPoint
(
keypointIndices
[
i
]).
class_id
;
points
[
i
].
class_id
=
collection
.
getKeyPoint
(
keypointIndices
[
i
]).
class_id
;
};
};
void
GenericDescriptorMatch
::
clear
()
{
collection
.
clear
();
}
/****************************************************************************************\
/****************************************************************************************\
* OneWayDescriptorMatch *
* OneWayDescriptorMatch *
\****************************************************************************************/
\****************************************************************************************/
...
...
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