Opencv haar训练参数:Mode& symmentry

时间:2016-03-04 05:16:05

标签: image-processing opencv3.0 feature-detection haar-classifier cascade-classifier

我正在使用Opencv 3.0在开始训练之前,我想将'mode'参数设置为'all' 下面是命令行参数

  

C:\ OpenCV \ build \ x64 \ vc12 \ bin \ opencv_traincascade.exe -data cascade   -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHitRate 0.995   -maxfalsealarm 0.5 -w 36 -h 28 -mode ALL

即使我明确指定模式参数,它仍然使用默认值(BASIC),如下所示

D:\>C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHi
tRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode All
PARAMETERS:
cascadeDirName: cascade
vecFileName: samples.vec
bgFileName: NegativeSet.txt
numPos: 333
numNeg: 922
numStages: 20
precalcValBufSize[Mb] : 3750
precalcIdxBufSize[Mb] : 3750
stageType: BOOST
featureType: HAAR
sampleWidth: 36
sampleHeight: 28
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: BASIC

我的第二个问题是,如何使用-nonsym?
如果我在结尾或命令行参数之间的任何地方附加-nonsym,一旦我传递参数,训练就会崩溃(只要我在cmd中输入) 它说“opencv_traincascade.exe已停止工作”

下面的

是包含-nonsym

的cmd行参数
  

C:\ OpenCV \ build \ x64 \ vc12 \ bin \ opencv_traincascade.exe -data cascade   -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHitRate 0.995   -maxfalsealarm 0.5 -w 36 -h 28 -mode ALL -nonsym

谢谢&问候

0 个答案:

没有答案