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
7ba7abb1
Commit
7ba7abb1
authored
Sep 19, 2018
by
Hamdi Sahloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed unnamed enum to CvFeatureParams.FeatureType
parent
b6ece95d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
feature.hpp
modules/tracking/include/opencv2/tracking/feature.hpp
+4
-3
feature.cpp
modules/tracking/src/feature.cpp
+2
-2
No files found.
modules/tracking/include/opencv2/tracking/feature.hpp
View file @
7ba7abb1
...
...
@@ -137,17 +137,18 @@ class CvParams
class
CvFeatureParams
:
public
CvParams
{
public
:
enum
enum
FeatureType
{
HAAR
=
0
,
LBP
=
1
,
HOG
=
2
};
CvFeatureParams
();
virtual
void
init
(
const
CvFeatureParams
&
fp
);
virtual
void
write
(
FileStorage
&
fs
)
const
CV_OVERRIDE
;
virtual
bool
read
(
const
FileNode
&
node
)
CV_OVERRIDE
;
static
Ptr
<
CvFeatureParams
>
create
(
int
featureType
);
static
Ptr
<
CvFeatureParams
>
create
(
CvFeatureParams
::
FeatureType
featureType
);
int
maxCatCount
;
// 0 in case of numerical features
int
featSize
;
// 1 in case of simple features (HAAR, LBP) and N_BINS(9)*N_CELLS(4) in case of Dalal's HOG features
int
numFeatures
;
...
...
@@ -163,7 +164,7 @@ class CvFeatureEvaluator
virtual
void
setImage
(
const
Mat
&
img
,
uchar
clsLabel
,
int
idx
);
virtual
void
writeFeatures
(
FileStorage
&
fs
,
const
Mat
&
featureMap
)
const
=
0
;
virtual
float
operator
()(
int
featureIdx
,
int
sampleIdx
)
=
0
;
static
Ptr
<
CvFeatureEvaluator
>
create
(
int
type
);
static
Ptr
<
CvFeatureEvaluator
>
create
(
CvFeatureParams
::
FeatureType
type
);
int
getNumFeatures
()
const
{
...
...
modules/tracking/src/feature.cpp
View file @
7ba7abb1
...
...
@@ -100,7 +100,7 @@ bool CvFeatureParams::read( const FileNode &node )
return
(
maxCatCount
>=
0
&&
featSize
>=
1
);
}
Ptr
<
CvFeatureParams
>
CvFeatureParams
::
create
(
int
featureType
)
Ptr
<
CvFeatureParams
>
CvFeatureParams
::
create
(
FeatureType
featureType
)
{
return
featureType
==
HAAR
?
Ptr
<
CvFeatureParams
>
(
new
CvHaarFeatureParams
)
:
featureType
==
LBP
?
Ptr
<
CvFeatureParams
>
(
new
CvLBPFeatureParams
)
:
featureType
==
HOG
?
Ptr
<
CvFeatureParams
>
(
new
CvHOGFeatureParams
)
:
Ptr
<
CvFeatureParams
>
();
...
...
@@ -128,7 +128,7 @@ void CvFeatureEvaluator::setImage( const Mat &img, uchar clsLabel, int idx )
cls
.
ptr
<
float
>
(
idx
)[
0
]
=
clsLabel
;
}
Ptr
<
CvFeatureEvaluator
>
CvFeatureEvaluator
::
create
(
int
type
)
Ptr
<
CvFeatureEvaluator
>
CvFeatureEvaluator
::
create
(
CvFeatureParams
::
FeatureType
type
)
{
return
type
==
CvFeatureParams
::
HAAR
?
Ptr
<
CvFeatureEvaluator
>
(
new
CvHaarEvaluator
)
:
type
==
CvFeatureParams
::
LBP
?
Ptr
<
CvFeatureEvaluator
>
(
new
CvLBPEvaluator
)
:
...
...
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