opencv traincascade error?



我使用以下参数运行了火车级联

traincascade -data haarcascade -vec samples.vec -bg negatives.dat -nstages 20 -minhitrate 0.999 
-maxfalsealarm 0.5 -npos 1000 -nneg 2000 -precalcValBufSize 1024 
-precalcIdxBufSize 1024  -w 20 -h 20 -featureType LBP -mode ALL

但我得到以下输出:

PARAMETERS:
cascadeDirName: haarcascade
vecFileName: samples.vec
bgFileName: negatives.dat
numPos: 2000
numNeg: 1000
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
stageType: BOOST
featureType: LBP
sampleWidth: 20
sampleHeight: 20
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   2000 : 2000
NEG count : acceptanceRatio    1000 : 1
Precalculation time: 0.415
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|   0.9995|    0.651|
+----+---------+---------+
|   5|   0.9955|    0.499|
+----+---------+---------+
END>
**OpenCV Error: Unspecified error (No element name has been given) in unknown function, file C:opencvbuildincludeopencv2/core/operations.hpp, line 2908**

有人知道为什么会这样吗?

使用此命令

traincascade -data haarcascade -vec samples.vec -bg negatives.dat -numStages 20 -minHitRate 0.999 -maxFalseAlarm 0.5 -numPos 1000 -numNeg 2000 -precalcValBufSize 1024 
-precalcIdxBufSize 1024  -w 20 -h 20 -featureType LBP -mode ALL

最新更新