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
75742fcd
Commit
75742fcd
authored
Jun 19, 2014
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2843 from berak:f_export_bow_24
parents
c99ce0f4
3500c940
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+20
-17
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
75742fcd
...
...
@@ -1528,17 +1528,17 @@ CV_EXPORTS void evaluateGenericDescriptorMatcher( const Mat& img1, const Mat& im
/*
* Abstract base class for training of a 'bag of visual words' vocabulary from a set of descriptors
*/
class
CV_EXPORTS
BOWTrainer
class
CV_EXPORTS
_W
BOWTrainer
{
public
:
BOWTrainer
();
virtual
~
BOWTrainer
();
void
add
(
const
Mat
&
descriptors
);
const
vector
<
Mat
>&
getDescriptors
()
const
;
int
descripotorsCount
()
const
;
CV_WRAP
void
add
(
const
Mat
&
descriptors
);
CV_WRAP
const
vector
<
Mat
>&
getDescriptors
()
const
;
CV_WRAP
int
descripotorsCount
()
const
;
virtual
void
clear
();
CV_WRAP
virtual
void
clear
();
/*
* Train visual words vocabulary, that is cluster training descriptors and
...
...
@@ -1547,8 +1547,8 @@ public:
*
* descriptors Training descriptors computed on images keypoints.
*/
virtual
Mat
cluster
()
const
=
0
;
virtual
Mat
cluster
(
const
Mat
&
descriptors
)
const
=
0
;
CV_WRAP
virtual
Mat
cluster
()
const
=
0
;
CV_WRAP
virtual
Mat
cluster
(
const
Mat
&
descriptors
)
const
=
0
;
protected
:
vector
<
Mat
>
descriptors
;
...
...
@@ -1558,16 +1558,16 @@ protected:
/*
* This is BOWTrainer using cv::kmeans to get vocabulary.
*/
class
CV_EXPORTS
BOWKMeansTrainer
:
public
BOWTrainer
class
CV_EXPORTS
_W
BOWKMeansTrainer
:
public
BOWTrainer
{
public
:
BOWKMeansTrainer
(
int
clusterCount
,
const
TermCriteria
&
termcrit
=
TermCriteria
(),
CV_WRAP
BOWKMeansTrainer
(
int
clusterCount
,
const
TermCriteria
&
termcrit
=
TermCriteria
(),
int
attempts
=
3
,
int
flags
=
KMEANS_PP_CENTERS
);
virtual
~
BOWKMeansTrainer
();
// Returns trained vocabulary (i.e. cluster centers).
virtual
Mat
cluster
()
const
;
virtual
Mat
cluster
(
const
Mat
&
descriptors
)
const
;
CV_WRAP
virtual
Mat
cluster
()
const
;
CV_WRAP
virtual
Mat
cluster
(
const
Mat
&
descriptors
)
const
;
protected
:
...
...
@@ -1580,21 +1580,24 @@ protected:
/*
* Class to compute image descriptor using bag of visual words.
*/
class
CV_EXPORTS
BOWImgDescriptorExtractor
class
CV_EXPORTS
_W
BOWImgDescriptorExtractor
{
public
:
BOWImgDescriptorExtractor
(
const
Ptr
<
DescriptorExtractor
>&
dextractor
,
CV_WRAP
BOWImgDescriptorExtractor
(
const
Ptr
<
DescriptorExtractor
>&
dextractor
,
const
Ptr
<
DescriptorMatcher
>&
dmatcher
);
virtual
~
BOWImgDescriptorExtractor
();
void
setVocabulary
(
const
Mat
&
vocabulary
);
const
Mat
&
getVocabulary
()
const
;
CV_WRAP
void
setVocabulary
(
const
Mat
&
vocabulary
);
CV_WRAP
const
Mat
&
getVocabulary
()
const
;
void
compute
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
Mat
&
imgDescriptor
,
vector
<
vector
<
int
>
>*
pointIdxsOfClusters
=
0
,
Mat
*
descriptors
=
0
);
// compute() is not constant because DescriptorMatcher::match is not constant
int
descriptorSize
()
const
;
int
descriptorType
()
const
;
CV_WRAP_AS
(
compute
)
void
compute2
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
CV_OUT
Mat
&
imgDescriptor
)
{
compute
(
image
,
keypoints
,
imgDescriptor
);
}
CV_WRAP
int
descriptorSize
()
const
;
CV_WRAP
int
descriptorType
()
const
;
protected
:
Mat
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