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
2d2c46e7
Commit
2d2c46e7
authored
Oct 06, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add const qualifier to detectMultiScale method
parent
9771c3c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+1
-1
softcascade.cpp
modules/objdetect/src/softcascade.cpp
+6
-12
No files found.
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
2d2c46e7
...
...
@@ -512,7 +512,7 @@ public:
//! 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
rejectfactor
=
1
);
int
rejectfactor
=
1
)
const
;
protected
:
enum
{
BOOST
=
0
};
...
...
modules/objdetect/src/softcascade.cpp
View file @
2d2c46e7
...
...
@@ -419,7 +419,6 @@ struct cv::SoftCascade::Filds
float
rescale
(
const
Feature
&
feature
,
const
float
scaling
,
const
float
relScale
,
cv
::
Rect
&
scaledRect
,
const
float
threshold
)
const
{
// float scaling = CascadeIntrinsics::getFor(feature.channel, relScale);
scaledRect
=
feature
.
rect
;
dprintf
(
"feature %d box %d %d %d %d
\n
"
,
feature
.
channel
,
scaledRect
.
x
,
scaledRect
.
y
,
...
...
@@ -439,18 +438,13 @@ struct cv::SoftCascade::Filds
float
sarea
=
(
scaledRect
.
width
-
scaledRect
.
x
)
*
(
scaledRect
.
height
-
scaledRect
.
y
);
float
approx
=
1.
f
;
// if (fabs(farea - 0.f) > FLT_EPSILON && fabs(farea - 0.f) > FLT_EPSILON)
{
const
float
expected_new_area
=
farea
*
relScale
*
relScale
;
approx
=
sarea
/
expected_new_area
;
const
float
expected_new_area
=
farea
*
relScale
*
relScale
;
float
approx
=
sarea
/
expected_new_area
;
dprintf
(
" rel areas %f %f
\n
"
,
expected_new_area
,
sarea
);
}
dprintf
(
" rel areas %f %f
\n
"
,
expected_new_area
,
sarea
);
// compensation areas rounding
float
rootThreshold
=
threshold
*
approx
;
rootThreshold
*=
scaling
;
float
rootThreshold
=
threshold
*
approx
*
scaling
;
dprintf
(
"approximation %f %f -> %f %f
\n
"
,
approx
,
threshold
,
rootThreshold
,
scaling
);
...
...
@@ -715,10 +709,10 @@ bool cv::SoftCascade::load( const string& filename, const float minScale, const
return
true
;
}
//
#define DEBUG_SHOW_RESULT
//#define DEBUG_SHOW_RESULT
void
cv
::
SoftCascade
::
detectMultiScale
(
const
Mat
&
image
,
const
std
::
vector
<
cv
::
Rect
>&
/*rois*/
,
std
::
vector
<
cv
::
Rect
>&
objects
,
const
int
/*rejectfactor*/
)
std
::
vector
<
cv
::
Rect
>&
objects
,
const
int
/*rejectfactor*/
)
const
{
typedef
std
::
vector
<
cv
::
Rect
>::
const_iterator
RIter_t
;
// only color images are supperted
...
...
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