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
26af7d73
Commit
26af7d73
authored
Sep 25, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor logs
parent
b6081438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
73 deletions
+53
-73
softcascade.cpp
modules/objdetect/src/softcascade.cpp
+53
-73
No files found.
modules/objdetect/src/softcascade.cpp
View file @
26af7d73
...
@@ -47,8 +47,8 @@
...
@@ -47,8 +47,8 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
#include <iostream>
#include <iostream>
#include <string>
#include <cstdio>
#include <cstdio>
#include <stdarg.h>
namespace
{
namespace
{
...
@@ -61,6 +61,13 @@ char *itoa(long i, char* s, int /*dummy_radix*/)
...
@@ -61,6 +61,13 @@ char *itoa(long i, char* s, int /*dummy_radix*/)
// used for noisy printfs
// used for noisy printfs
// #define WITH_DEBUG_OUT
// #define WITH_DEBUG_OUT
#if defined WITH_DEBUG_OUT
# define dprintf(format, ...) \
do { printf(format, __VA_ARGS__); } while (0)
#else
# define dprintf(format, ...)
#endif
struct
Octave
struct
Octave
{
{
int
index
;
int
index
;
...
@@ -169,9 +176,6 @@ struct CascadeIntrinsics
...
@@ -169,9 +176,6 @@ struct CascadeIntrinsics
static
float
getFor
(
int
channel
,
float
scaling
)
static
float
getFor
(
int
channel
,
float
scaling
)
{
{
CV_Assert
(
channel
<
10
);
CV_Assert
(
channel
<
10
);
#if defined WITH_DEBUG_OUT
printf
(
"QQQQQQQQQQQQQQQq: %f %f
\n
"
,
scaling
,
fabs
(
scaling
-
1.
f
));
#endif
if
(
fabs
(
scaling
-
1.
f
)
<
FLT_EPSILON
)
if
(
fabs
(
scaling
-
1.
f
)
<
FLT_EPSILON
)
// if (scaling == 1.f)
// if (scaling == 1.f)
...
@@ -193,9 +197,7 @@ struct CascadeIntrinsics
...
@@ -193,9 +197,7 @@ struct CascadeIntrinsics
float
a
=
A
[(
int
)(
scaling
>=
1
)][(
int
)(
channel
>
6
)];
float
a
=
A
[(
int
)(
scaling
>=
1
)][(
int
)(
channel
>
6
)];
float
b
=
B
[(
int
)(
scaling
>=
1
)][(
int
)(
channel
>
6
)];
float
b
=
B
[(
int
)(
scaling
>=
1
)][(
int
)(
channel
>
6
)];
#if defined WITH_DEBUG_OUT
dprintf
(
"scaling: %f %f %f %f
\n
"
,
scaling
,
a
,
b
,
a
*
pow
(
scaling
,
b
));
printf
(
"!!! scaling: %f %f %f %f
\n
"
,
scaling
,
a
,
b
,
a
*
pow
(
scaling
,
b
));
#endif
return
a
*
pow
(
scaling
,
b
);
return
a
*
pow
(
scaling
,
b
);
}
}
};
};
...
@@ -269,6 +271,7 @@ struct Decimate {
...
@@ -269,6 +271,7 @@ struct Decimate {
};
};
// use previous stored integrals for regression testing
// #define USE_REFERENCE_VALUES
// #define USE_REFERENCE_VALUES
struct
ChannelStorage
struct
ChannelStorage
...
@@ -279,14 +282,14 @@ struct ChannelStorage
...
@@ -279,14 +282,14 @@ struct ChannelStorage
enum
{
HOG_BINS
=
6
,
HOG_LUV_BINS
=
10
};
enum
{
HOG_BINS
=
6
,
HOG_LUV_BINS
=
10
};
ChannelStorage
()
{}
ChannelStorage
()
{}
ChannelStorage
(
cv
::
Mat
&
colored
,
int
shr
)
:
shrinkage
(
shr
)
ChannelStorage
(
c
onst
c
v
::
Mat
&
colored
,
int
shr
)
:
shrinkage
(
shr
)
{
{
hog
.
clear
();
hog
.
clear
();
Decimate
<
uchar
>
decimate
(
shr
);
Decimate
<
uchar
>
decimate
(
shr
);
#if defined USE_REFERENCE_VALUES
#if defined USE_REFERENCE_VALUES
cv
::
FileStorage
imgs
(
"/home/kellan/testInts.xml"
,
cv
::
FileStorage
::
READ
);
char
buff
[
33
];
char
buff
[
33
];
cv
::
FileStorage
imgs
(
"/home/kellan/testInts.xml"
,
cv
::
FileStorage
::
READ
);
for
(
int
i
=
0
;
i
<
HOG_LUV_BINS
;
++
i
)
for
(
int
i
=
0
;
i
<
HOG_LUV_BINS
;
++
i
)
{
{
...
@@ -310,10 +313,10 @@ struct ChannelStorage
...
@@ -310,10 +313,10 @@ struct ChannelStorage
// shrink and integrate
// shrink and integrate
for
(
int
i
=
0
;
i
<
(
int
)
splited
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
splited
.
size
();
i
++
)
{
{
cv
::
Mat
shrunk
,
sum
;
cv
::
Mat
shrunk
,
sum
;
decimate
(
splited
[
i
],
shrunk
);
decimate
(
splited
[
i
],
shrunk
);
cv
::
integral
(
shrunk
,
sum
,
cv
::
noArray
(),
CV_32S
);
cv
::
integral
(
shrunk
,
sum
,
cv
::
noArray
(),
CV_32S
);
luvs
.
push_back
(
sum
);
luvs
.
push_back
(
sum
);
}
}
// convert to grey
// convert to grey
...
@@ -353,12 +356,12 @@ struct ChannelStorage
...
@@ -353,12 +356,12 @@ struct ChannelStorage
cv
::
integral
(
shrMag
,
mag
,
cv
::
noArray
(),
CV_32S
);
cv
::
integral
(
shrMag
,
mag
,
cv
::
noArray
(),
CV_32S
);
// create hog channels
// create hog channels
angle
/=
60
;
angle
/=
60
.
f
;
std
::
vector
<
cv
::
Mat
>
hist
;
std
::
vector
<
cv
::
Mat
>
hist
;
for
(
int
bin
=
0
;
bin
<
6
;
++
bin
)
for
(
int
bin
=
0
;
bin
<
HOG_BINS
;
++
bin
)
{
{
hist
.
push_back
(
cv
::
Mat
(
colored
.
rows
,
colored
.
cols
,
CV_8UC1
));
hist
.
push_back
(
cv
::
Mat
::
zeros
(
saturatedMag
.
rows
,
saturatedMag
.
cols
,
CV_8UC1
));
}
}
for
(
int
y
=
0
;
y
<
saturatedMag
.
rows
;
++
y
)
for
(
int
y
=
0
;
y
<
saturatedMag
.
rows
;
++
y
)
...
@@ -375,7 +378,6 @@ struct ChannelStorage
...
@@ -375,7 +378,6 @@ struct ChannelStorage
for
(
int
i
=
0
;
i
<
HOG_BINS
;
++
i
)
for
(
int
i
=
0
;
i
<
HOG_BINS
;
++
i
)
{
{
cv
::
Mat
shrunk
,
sum
;
cv
::
Mat
shrunk
,
sum
;
decimate
(
hist
[
i
],
shrunk
);
decimate
(
hist
[
i
],
shrunk
);
cv
::
integral
(
shrunk
,
sum
,
cv
::
noArray
(),
CV_32S
);
cv
::
integral
(
shrunk
,
sum
,
cv
::
noArray
(),
CV_32S
);
hog
.
push_back
(
sum
);
hog
.
push_back
(
sum
);
...
@@ -385,7 +387,6 @@ struct ChannelStorage
...
@@ -385,7 +387,6 @@ struct ChannelStorage
hog
.
insert
(
hog
.
end
(),
luvs
.
begin
(),
luvs
.
end
());
hog
.
insert
(
hog
.
end
(),
luvs
.
begin
(),
luvs
.
end
());
CV_Assert
(
hog
.
size
()
==
10
);
CV_Assert
(
hog
.
size
()
==
10
);
#endif
#endif
// exit(10);
}
}
float
get
(
const
int
x
,
const
int
y
,
const
int
channel
,
const
cv
::
Rect
&
area
)
const
float
get
(
const
int
x
,
const
int
y
,
const
int
channel
,
const
cv
::
Rect
&
area
)
const
...
@@ -393,26 +394,23 @@ struct ChannelStorage
...
@@ -393,26 +394,23 @@ struct ChannelStorage
CV_Assert
(
channel
<
HOG_LUV_BINS
);
CV_Assert
(
channel
<
HOG_LUV_BINS
);
const
cv
::
Mat
m
=
hog
[
channel
];
const
cv
::
Mat
m
=
hog
[
channel
];
#if defined WITH_DEBUG_OUT
dprintf
(
"feature box %d %d %d %d "
,
area
.
x
,
area
.
y
,
area
.
width
,
area
.
height
);
printf
(
"feature box %d %d %d %d "
,
area
.
x
,
area
.
y
,
area
.
width
,
area
.
height
);
dprintf
(
"get for channel %d
\n
"
,
channel
);
printf
(
"get for channel %d
\n
"
,
channel
);
dprintf
(
"!! %d
\n
"
,
m
.
depth
());
printf
(
"!! %d
\n
"
,
m
.
depth
());
printf
(
"extract feature for: [%d %d] [%d %d] [%d %d] [%d %d]
\n
"
,
d
printf
(
"extract feature for: [%d %d] [%d %d] [%d %d] [%d %d]
\n
"
,
x
+
area
.
x
,
y
+
area
.
y
,
x
+
area
.
width
,
y
+
area
.
y
,
x
+
area
.
width
,
y
+
area
.
height
,
x
+
area
.
x
,
y
+
area
.
y
,
x
+
area
.
width
,
y
+
area
.
y
,
x
+
area
.
width
,
y
+
area
.
height
,
x
+
area
.
x
,
y
+
area
.
height
);
x
+
area
.
x
,
y
+
area
.
height
);
printf
(
"at point %d %d with offset %d
\n
"
,
x
,
y
,
0
);
dprintf
(
"at point %d %d with offset %d
\n
"
,
x
,
y
,
0
);
#endif
int
a
=
m
.
ptr
<
int
>
(
y
+
area
.
y
)[
x
+
area
.
x
];
int
a
=
m
.
ptr
<
int
>
(
y
+
area
.
y
)[
x
+
area
.
x
];
int
b
=
m
.
ptr
<
int
>
(
y
+
area
.
y
)[
x
+
area
.
width
];
int
b
=
m
.
ptr
<
int
>
(
y
+
area
.
y
)[
x
+
area
.
width
];
int
c
=
m
.
ptr
<
int
>
(
y
+
area
.
height
)[
x
+
area
.
width
];
int
c
=
m
.
ptr
<
int
>
(
y
+
area
.
height
)[
x
+
area
.
width
];
int
d
=
m
.
ptr
<
int
>
(
y
+
area
.
height
)[
x
+
area
.
x
];
int
d
=
m
.
ptr
<
int
>
(
y
+
area
.
height
)[
x
+
area
.
x
];
#if defined WITH_DEBUG_OUT
dprintf
(
" retruved integral values: %d %d %d %d
\n
"
,
a
,
b
,
c
,
d
);
printf
(
" retruved integral values: %d %d %d %d
\n
"
,
a
,
b
,
c
,
d
);
#endif
return
(
a
-
b
+
c
-
d
);
return
(
a
-
b
+
c
-
d
);
}
}
};
};
...
@@ -444,12 +442,10 @@ struct cv::SoftCascade::Filds
...
@@ -444,12 +442,10 @@ struct cv::SoftCascade::Filds
float
scaling
=
CascadeIntrinsics
::
getFor
(
feature
.
channel
,
relScale
);
float
scaling
=
CascadeIntrinsics
::
getFor
(
feature
.
channel
,
relScale
);
scaledRect
=
feature
.
rect
;
scaledRect
=
feature
.
rect
;
#if defined WITH_DEBUG_OUT
dprintf
(
"feature %d box %d %d %d %d
\n
"
,
feature
.
channel
,
scaledRect
.
x
,
scaledRect
.
y
,
printf
(
"feature %d box %d %d %d %d
\n
"
,
feature
.
channel
,
scaledRect
.
x
,
scaledRect
.
y
,
scaledRect
.
width
,
scaledRect
.
height
);
scaledRect
.
width
,
scaledRect
.
height
);
std
::
cout
<<
"rescale: "
<<
feature
.
channel
<<
" "
<<
relScale
<<
" "
<<
scaling
<<
std
::
endl
;
dprintf
(
"rescale: %d %f %f
\n
"
,
feature
.
channel
,
relScale
,
scaling
);
#endif
float
farea
=
(
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
);
float
farea
=
(
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
);
// rescale
// rescale
...
@@ -458,14 +454,9 @@ struct cv::SoftCascade::Filds
...
@@ -458,14 +454,9 @@ struct cv::SoftCascade::Filds
scaledRect
.
width
=
cvRound
(
relScale
*
scaledRect
.
width
);
scaledRect
.
width
=
cvRound
(
relScale
*
scaledRect
.
width
);
scaledRect
.
height
=
cvRound
(
relScale
*
scaledRect
.
height
);
scaledRect
.
height
=
cvRound
(
relScale
*
scaledRect
.
height
);
#if defined WITH_DEBUG_OUT
dprintf
(
"feature %d box %d %d %d %d
\n
"
,
feature
.
channel
,
scaledRect
.
x
,
scaledRect
.
y
,
printf
(
"feature %d box %d %d %d %d
\n
"
,
feature
.
channel
,
scaledRect
.
x
,
scaledRect
.
y
,
scaledRect
.
width
,
scaledRect
.
height
);
scaledRect
.
width
,
scaledRect
.
height
);
std
::
cout
<<
" new rect: "
<<
scaledRect
.
x
<<
" "
<<
scaledRect
.
y
<<
" "
<<
scaledRect
.
width
<<
" "
<<
scaledRect
.
height
<<
" "
;
#endif
float
sarea
=
(
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
);
float
sarea
=
(
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
);
float
approx
=
1.
f
;
float
approx
=
1.
f
;
...
@@ -474,20 +465,14 @@ struct cv::SoftCascade::Filds
...
@@ -474,20 +465,14 @@ struct cv::SoftCascade::Filds
const
float
expected_new_area
=
farea
*
relScale
*
relScale
;
const
float
expected_new_area
=
farea
*
relScale
*
relScale
;
approx
=
expected_new_area
/
sarea
;
approx
=
expected_new_area
/
sarea
;
#if defined WITH_DEBUG_OUT
dprintf
(
" rel areas %f %f
\n
"
,
expected_new_area
,
sarea
);
std
::
cout
<<
" rel areas "
<<
expected_new_area
<<
" "
<<
sarea
<<
std
::
endl
;
#endif
}
}
// compensation areas rounding
// compensation areas rounding
float
rootThreshold
=
threshold
/
approx
;
float
rootThreshold
=
threshold
/
approx
;
rootThreshold
*=
scaling
;
rootThreshold
*=
scaling
;
#if defined WITH_DEBUG_OUT
dprintf
(
"approximation %f %f -> %f %f
\n
"
,
approx
,
threshold
,
rootThreshold
,
scaling
);
std
::
cout
<<
"approximation "
<<
approx
<<
" "
<<
threshold
<<
" -> "
<<
rootThreshold
<<
" "
<<
scaling
<<
std
::
endl
;
#endif
return
rootThreshold
;
return
rootThreshold
;
}
}
...
@@ -495,26 +480,21 @@ struct cv::SoftCascade::Filds
...
@@ -495,26 +480,21 @@ struct cv::SoftCascade::Filds
void
detectAt
(
const
Level
&
level
,
const
int
dx
,
const
int
dy
,
const
ChannelStorage
&
storage
,
void
detectAt
(
const
Level
&
level
,
const
int
dx
,
const
int
dy
,
const
ChannelStorage
&
storage
,
std
::
vector
<
Object
>&
detections
)
const
std
::
vector
<
Object
>&
detections
)
const
{
{
#if defined WITH_DEBUG_OUT
dprintf
(
"detect at: %d %d
\n
"
,
dx
,
dy
);
std
::
cout
<<
"detect at: "
<<
dx
<<
" "
<<
dy
<<
std
::
endl
;
#endif
float
detectionScore
=
0.
f
;
float
detectionScore
=
0.
f
;
const
Octave
&
octave
=
*
(
level
.
octave
);
const
Octave
&
octave
=
*
(
level
.
octave
);
int
stBegin
=
octave
.
index
*
octave
.
stages
,
stEnd
=
stBegin
+
octave
.
stages
;
int
stBegin
=
octave
.
index
*
octave
.
stages
,
stEnd
=
stBegin
+
octave
.
stages
;
#if defined WITH_DEBUG_OUT
dprintf
(
" octave stages: %d to %d index %d %f level %f
\n
"
,
std
::
cout
<<
" octave stages: "
<<
stBegin
<<
" to "
<<
stEnd
<<
" index "
<<
octave
.
index
<<
" "
stBegin
,
stEnd
,
octave
.
index
,
octave
.
scale
,
level
.
origScale
);
<<
octave
.
scale
<<
" level "
<<
level
.
origScale
<<
std
::
endl
;
#endif
int
st
=
stBegin
;
int
st
=
stBegin
;
for
(;
st
<
stEnd
;
++
st
)
for
(;
st
<
stEnd
;
++
st
)
{
{
#if defined WITH_DEBUG_OUT
dprintf
(
"index: %d
\n
"
,
st
);
printf
(
"index: %d
\n
"
,
st
);
#endif
const
Stage
&
stage
=
stages
[
st
];
const
Stage
&
stage
=
stages
[
st
];
{
{
...
@@ -529,15 +509,11 @@ struct cv::SoftCascade::Filds
...
@@ -529,15 +509,11 @@ struct cv::SoftCascade::Filds
float
sum
=
storage
.
get
(
dx
,
dy
,
feature
.
channel
,
scaledRect
);
float
sum
=
storage
.
get
(
dx
,
dy
,
feature
.
channel
,
scaledRect
);
#if defined WITH_DEBUG_OUT
dprintf
(
"root feature %d %f
\n
"
,
feature
.
channel
,
sum
);
printf
(
"root feature %d %f
\n
"
,
feature
.
channel
,
sum
);
#endif
int
next
=
(
sum
>=
threshold
)
?
2
:
1
;
int
next
=
(
sum
>=
threshold
)
?
2
:
1
;
#if defined WITH_DEBUG_OUT
dprintf
(
"go: %d (%f >= %f)
\n\n
"
,
next
,
sum
,
threshold
);
printf
(
"go: %d (%f >= %f)
\n\n
"
,
next
,
sum
,
threshold
);
#endif
// leaves
// leaves
const
Node
&
leaf
=
nodes
[
nId
+
next
];
const
Node
&
leaf
=
nodes
[
nId
+
next
];
...
@@ -549,23 +525,24 @@ struct cv::SoftCascade::Filds
...
@@ -549,23 +525,24 @@ struct cv::SoftCascade::Filds
int
lShift
=
(
next
-
1
)
*
2
+
((
sum
>=
threshold
)
?
1
:
0
);
int
lShift
=
(
next
-
1
)
*
2
+
((
sum
>=
threshold
)
?
1
:
0
);
float
impact
=
leaves
[(
st
*
4
)
+
lShift
];
float
impact
=
leaves
[(
st
*
4
)
+
lShift
];
#if defined WITH_DEBUG_OUT
printf
(
"decided: %d (%f >= %f) %d %f
\n\n
"
,
next
,
sum
,
threshold
,
lShift
,
impact
);
d
printf
(
"decided: %d (%f >= %f) %d %f
\n\n
"
,
next
,
sum
,
threshold
,
lShift
,
impact
);
#endif
detectionScore
+=
impact
;
detectionScore
+=
impact
;
}
}
dprintf
(
"extracted stage:
\n
"
);
dprintf
(
"ct %f
\n
"
,
stage
.
threshold
);
dprintf
(
"computed score %f
\n\n
"
,
detectionScore
);
#if defined WITH_DEBUG_OUT
#if defined WITH_DEBUG_OUT
printf
(
"extracted stage:
\n
"
);
printf
(
"ct %f
\n
"
,
stage
.
threshold
);
printf
(
"computed score %f
\n\n
"
,
detectionScore
);
if
(
st
-
stBegin
>
50
)
break
;
if
(
st
-
stBegin
>
50
)
break
;
#endif
#endif
if
(
detectionScore
<=
stage
.
threshold
)
break
;
if
(
detectionScore
<=
stage
.
threshold
)
break
;
}
}
printf
(
"x %d y %d: %d
\n
"
,
dx
,
dy
,
st
-
stBegin
);
d
printf
(
"x %d y %d: %d
\n
"
,
dx
,
dy
,
st
-
stBegin
);
if
(
st
==
stEnd
)
if
(
st
==
stEnd
)
{
{
...
@@ -793,7 +770,7 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
...
@@ -793,7 +770,7 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
const
Filds
&
fld
=
*
filds
;
const
Filds
&
fld
=
*
filds
;
cv
::
Mat
image1
;
cv
::
Mat
image1
;
cv
::
cvtColor
(
image
,
image1
,
CV_
RGB2RGBA
);
cv
::
cvtColor
(
image
,
image1
,
CV_
BGR2RGB
);
#if defined DEBUG_STORE_IMAGES
#if defined DEBUG_STORE_IMAGES
cv
::
FileStorage
fs
(
"/home/kellan/opencvInputImage.xml"
,
cv
::
FileStorage
::
WRITE
);
cv
::
FileStorage
fs
(
"/home/kellan/opencvInputImage.xml"
,
cv
::
FileStorage
::
WRITE
);
...
@@ -812,8 +789,11 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
...
@@ -812,8 +789,11 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
#endif
#endif
cv
::
imshow
(
"!!"
,
image1
);
cv
::
waitKey
(
0
);
// create integrals
// create integrals
ChannelStorage
storage
(
image
1
,
fld
.
shrinkage
);
ChannelStorage
storage
(
image
,
fld
.
shrinkage
);
// object candidates
// object candidates
std
::
vector
<
Object
>
detections
;
std
::
vector
<
Object
>
detections
;
...
@@ -826,6 +806,8 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
...
@@ -826,6 +806,8 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
#if defined WITH_DEBUG_OUT
#if defined WITH_DEBUG_OUT
std
::
cout
<<
"================================ "
<<
l
++
<<
std
::
endl
;
std
::
cout
<<
"================================ "
<<
l
++
<<
std
::
endl
;
#else
(
void
)
l
;
#endif
#endif
// int dx = 79; int dy = 76;
// int dx = 79; int dy = 76;
for
(
int
dy
=
0
;
dy
<
level
.
workRect
.
height
;
++
dy
)
for
(
int
dy
=
0
;
dy
<
level
.
workRect
.
height
;
++
dy
)
...
@@ -834,9 +816,7 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
...
@@ -834,9 +816,7 @@ void cv::SoftCascade::detectMultiScale(const Mat& image, const std::vector<cv::R
{
{
fld
.
detectAt
(
level
,
dx
,
dy
,
storage
,
detections
);
fld
.
detectAt
(
level
,
dx
,
dy
,
storage
,
detections
);
total
++
;
total
++
;
// break;
}
}
// break;
}
}
cv
::
Mat
out
=
image
.
clone
();
cv
::
Mat
out
=
image
.
clone
();
...
...
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