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
d7c86bbc
Commit
d7c86bbc
authored
Nov 08, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor change of BOW
parent
2cd9fbb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+1
-1
bagofwords.cpp
modules/features2d/src/bagofwords.cpp
+2
-2
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
d7c86bbc
...
...
@@ -2468,7 +2468,7 @@ public:
void
setVocabulary
(
const
Mat
&
vocabulary
);
const
Mat
&
getVocabulary
()
const
{
return
vocabulary
;
}
void
compute
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
Mat
&
imgDescriptor
,
vector
<
vector
<
int
>
>*
pointIdxsOfClusters
=
0
);
//not constant because DescriptorMatcher::match is not constant
vector
<
vector
<
int
>
>*
pointIdxsOfClusters
=
0
,
Mat
*
descriptors
=
0
);
//not constant because DescriptorMatcher::match is not constant
int
descriptorSize
()
const
{
return
vocabulary
.
empty
()
?
0
:
vocabulary
.
rows
;
}
int
descriptorType
()
const
{
return
CV_32FC1
;
}
...
...
modules/features2d/src/bagofwords.cpp
View file @
d7c86bbc
...
...
@@ -112,7 +112,7 @@ void BOWImgDescriptorExtractor::setVocabulary( const Mat& _vocabulary )
}
void
BOWImgDescriptorExtractor
::
compute
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
Mat
&
imgDescriptor
,
vector
<
vector
<
int
>
>*
pointIdxsOfClusters
)
vector
<
vector
<
int
>
>*
pointIdxsOfClusters
,
Mat
*
_descriptors
)
{
imgDescriptor
.
release
();
...
...
@@ -122,7 +122,7 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& key
int
clusterCount
=
descriptorSize
();
// = vocabulary.rows
// Compute descriptors for the image.
Mat
descriptors
;
Mat
descriptors
=
_descriptors
?
*
_descriptors
:
Mat
()
;
dextractor
->
compute
(
image
,
keypoints
,
descriptors
);
// Match keypoint descriptors to cluster center (to vocabulary)
...
...
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