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
16dd09cc
Commit
16dd09cc
authored
Oct 25, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move scale related parameters to SoftCascade constructor
parent
017d970b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+10
-7
softcascade.cpp
modules/objdetect/src/softcascade.cpp
+5
-4
test_softcascade.cpp
modules/objdetect/test/test_softcascade.cpp
+2
-0
No files found.
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
16dd09cc
...
...
@@ -510,19 +510,18 @@ public:
};
//! An empty cascade will be created.
SoftCascade
();
//! Param minScale is a minimum scale relative to the original size of the image on which cascade will be applyed.
//! Param minScale is a maximum scale relative to the original size of the image on which cascade will be applyed.
//! Param scales is a number of scales from minScale to maxScale.
SoftCascade
(
const
float
minScale
=
0.4
f
,
const
float
maxScale
=
5.
f
,
const
int
scales
=
55
);
//! Cascade will be created for scales from minScale to maxScale.
//! Param fs is a serialized sacsade.
//! Param minScale is a minimum scale relative to the original size of the image on which cascade will be applyed.
//! Param minScale is a maximum scale relative to the original size of the image on which cascade will be applyed.
SoftCascade
(
const
cv
::
FileStorage
&
fs
,
const
float
minScale
=
0.4
f
,
const
float
maxScale
=
5.
f
);
SoftCascade
(
const
cv
::
FileStorage
&
fs
);
//! cascade will be loaded. The previous cascade will be destroyed.
//! Param fs is a serialized sacsade.
//! Param minScale is a minimum scale relative to the original size of the image on which cascade will be applyed.
//! Param minScale is a maximum scale relative to the original size of the image on which cascade will be applyed.
bool
read
(
const
cv
::
FileStorage
&
fs
,
const
float
minScale
=
0.4
f
,
const
float
maxScale
=
5.
f
);
bool
read
(
const
cv
::
FileStorage
&
fs
);
virtual
~
SoftCascade
();
...
...
@@ -545,6 +544,10 @@ protected:
private
:
struct
Filds
;
Filds
*
filds
;
float
minScale
;
float
maxScale
;
int
scales
;
};
class
CV_EXPORTS
IntegralChannels
...
...
modules/objdetect/src/softcascade.cpp
View file @
16dd09cc
...
...
@@ -497,18 +497,19 @@ struct cv::SoftCascade::Filds
}
};
cv
::
SoftCascade
::
SoftCascade
()
:
filds
(
0
)
{}
cv
::
SoftCascade
::
SoftCascade
(
const
float
mins
,
const
float
maxs
,
const
int
nsc
)
:
filds
(
0
),
minScale
(
mins
),
maxScale
(
maxs
),
scales
(
nsc
)
{}
cv
::
SoftCascade
::
SoftCascade
(
const
cv
::
FileStorage
&
fs
,
const
float
minScale
,
const
float
maxScale
)
:
filds
(
0
)
cv
::
SoftCascade
::
SoftCascade
(
const
cv
::
FileStorage
&
fs
)
:
filds
(
0
)
{
read
(
fs
,
minScale
,
maxScale
);
read
(
fs
);
}
cv
::
SoftCascade
::~
SoftCascade
()
{
delete
filds
;
}
bool
cv
::
SoftCascade
::
read
(
const
cv
::
FileStorage
&
fs
,
const
float
minScale
,
const
float
maxScale
)
bool
cv
::
SoftCascade
::
read
(
const
cv
::
FileStorage
&
fs
)
{
if
(
!
fs
.
isOpened
())
return
false
;
...
...
modules/objdetect/test/test_softcascade.cpp
View file @
16dd09cc
...
...
@@ -92,4 +92,5 @@ TEST(SoftCascade, detect)
total
++
;
}
std
::
cout
<<
"detected: "
<<
(
int
)
objects
.
size
()
<<
std
::
endl
;
ASSERT_EQ
((
int
)
objects
.
size
(),
1501
);
}
\ No newline at end of file
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