projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d403200
)
alter the read stage.threshold to match traincascade behavior (ticket #1071)
author
Vadim Pisarevsky
<no@email>
Thu, 19 May 2011 12:41:48 +0000
(12:41 +0000)
committer
Vadim Pisarevsky
<no@email>
Thu, 19 May 2011 12:41:48 +0000
(12:41 +0000)
modules/objdetect/src/cascadedetect.cpp
patch
|
blob
|
history
diff --git
a/modules/objdetect/src/cascadedetect.cpp
b/modules/objdetect/src/cascadedetect.cpp
index
349b139
..
8e55b89
100644
(file)
--- a/
modules/objdetect/src/cascadedetect.cpp
+++ b/
modules/objdetect/src/cascadedetect.cpp
@@
-1236,6
+1236,8
@@
void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& object
bool CascadeClassifier::Data::read(const FileNode &root)
{
+ static const float THRESHOLD_EPS = 1e-5f;
+
// load stage params
string stageTypeStr = (string)root[CC_STAGE_TYPE];
if( stageTypeStr == CC_BOOST )
@@
-1281,7
+1283,7
@@
bool CascadeClassifier::Data::read(const FileNode &root)
{
FileNode fns = *it;
Stage stage;
- stage.threshold =
fns[CC_STAGE_THRESHOLD]
;
+ stage.threshold =
(float)fns[CC_STAGE_THRESHOLD] - THRESHOLD_EPS
;
fns = fns[CC_WEAK_CLASSIFIERS];
if(fns.empty())
return false;