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
dc74ce20
Commit
dc74ce20
authored
Sep 12, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenCV friendly xml format for soft cascade
parent
c04725b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+16
-12
softcascade.cpp
modules/objdetect/src/softcascade.cpp
+0
-0
test_softcascade.cpp
modules/objdetect/test/test_softcascade.cpp
+2
-3
No files found.
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
dc74ce20
...
...
@@ -493,32 +493,36 @@ protected:
class
CV_EXPORTS
SoftCascade
{
public
:
//! empty cascade will be created.
//!
An
empty cascade will be created.
SoftCascade
();
//! cascade will be loaded from file "filename"
//! Cascade will be created from file for scales from minScale to maxScale.
//! Param filename is a path to xml-serialized cascade.
//! 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
string
&
filename
,
const
float
minScale
=
0.4
f
,
const
float
maxScale
=
5.
f
);
//! cascade will be loaded from file "filename". The previous cascade will be destroyed.
//! Param filename is a path to xml-serialized cascade.
//! 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
load
(
const
string
&
filename
,
const
float
minScale
=
0.4
f
,
const
float
maxScale
=
5.
f
);
virtual
~
SoftCascade
();
//! return vector of bounding boxes. Each box contains detected object
//! return vector of bounding boxes. Each box contains
one
detected object
virtual
void
detectMultiScale
(
const
Mat
&
image
,
const
std
::
vector
<
cv
::
Rect
>&
rois
,
std
::
vector
<
cv
::
Rect
>&
objects
,
int
step
=
4
,
int
rejectfactor
=
1
);
protected
:
virtual
void
detectForOctave
(
int
octave
);
// virtual bool detectSingleScale( const Mat& image, int stripCount, Size processingRectSize,
// int stripSize, int yStep, double factor, vector<Rect>& candidates,
// vector<int>& rejectLevels, vector<double>& levelWeights, bool outputRejectLevels=false);
enum
{
BOOST
=
0
};
enum
{
FRAME_WIDTH
=
640
,
FRAME_HEIGHT
=
480
,
TOTAL_SCALES
=
55
,
CLASSIFIERS
=
5
,
ORIG_OBJECT_WIDTH
=
64
,
FRAME_WIDTH
=
640
,
FRAME_HEIGHT
=
480
,
TOTAL_SCALES
=
55
,
CLASSIFIERS
=
5
,
ORIG_OBJECT_WIDTH
=
64
,
ORIG_OBJECT_HEIGHT
=
128
};
...
...
modules/objdetect/src/softcascade.cpp
View file @
dc74ce20
This diff is collapsed.
Click to expand it.
modules/objdetect/test/test_softcascade.cpp
View file @
dc74ce20
...
...
@@ -43,16 +43,15 @@
TEST
(
SoftCascade
,
readCascade
)
{
std
::
string
xml
=
"/home/kellan
/icf-template.xml"
;
std
::
string
xml
=
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"cascadeandhog
/icf-template.xml"
;
cv
::
SoftCascade
cascade
;
ASSERT_TRUE
(
cascade
.
load
(
xml
));
}
TEST
(
SoftCascade
,
D
etect
)
TEST
(
SoftCascade
,
d
etect
)
{
std
::
string
xml
=
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"cascadeandhog/softcascade.xml"
;
std
::
cout
<<
"PATH: "
<<
xml
<<
std
::
endl
;
cv
::
SoftCascade
cascade
;
ASSERT_TRUE
(
cascade
.
load
(
xml
));
...
...
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