title: OpenCV 2.4.13 cascade classifier training problems
body: <p>I tried to train  the haar cascade using the following:</p>
  
  <pre><code>C:\opencv\build\x86\vc12\bin\opencv_traincascade.exe -data C:\opencv\build\x86\vc12\bin\LETTER_TRAIN -vec C:\opencv\build\x86\vc12\bin\LETTER.vec -bg C:\opencv\build\x86\vc12\bin\LETTER_NEG.dat -numPos 4 -numNeg 28 -numStages 15 -minHitRate 0.995 -w 50 -h 50 -featureType LBP -precalcValBufSize 1024 -precalcldxBufSize 1024
  </code></pre>
  
  <p>When I send this in the Command Prompt, I get:</p>
  
  <pre><code> PARAMETERS:
  cascadeDirName: C:\opencv\build\x86\vc12\bin\LETTER_TRAIN
  vecFileName: C:\opencv\build\x86\vc12\bin\LETTERS.vec
  bgFileName: C:\opencv\build\x86\vc12\bin\LETTER_NEG.dat
  numPos: 13
  numNeg: 28
  numStages: 2
  precalcValBufSize[Mb] : 1024
  precalcIdxBufSize[Mb] : 1024
  acceptanceRatioBreakValue : -1
  stageType: BOOST
  featureType: LBP
  sampleWidth: 50
  sampleHeight: 50
  boostType: GAB
  minHitRate: 0.995
  maxFalseAlarmRate: 0.5
  weightTrimRate: 0.95
  maxDepth: 1
  maxWeakCount: 100
  Number of unique features given windowSize [50,50] : 166464
  
  ===== TRAINING 0-stage =====
  &lt;BEGIN
  POS count : consumed   13 : 13
  Train dataset for temp stage can not be filled. Branch training terminated.
  Cascade classifier can't be trained. Check the used training parameters.
  </code></pre>
  
  <p>I tried to solve the problem using <a href="http://answers.opencv.org/question/10872/cascade-training-error-opencv-244-train-dataset-for-temp-stage-can-not-filled-branch-training-terminated-cascade-classifier-cant-be-trained-check-the/" rel="nofollow">this</a> but it did't help.</p>
  
  <p>The negative images file (.dat) is:</p>
  
  <pre><code>\LETTERS_NEG(bg)\Untitled.jpg
  \LETTERS_NEG(bg)\Untitled2.jpg
  \LETTERS_NEG(bg)\Untitled3.jpg
  \LETTERS_NEG(bg)\Untitled4.jpg
  \LETTERS_NEG(bg)\Untitled5.jpg
  \LETTERS_NEG(bg)\Untitled6.jpg
  \LETTERS_NEG(bg)\Untitled7.jpg
  \LETTERS_NEG(bg)\Untitled8.jpg
  \LETTERS_NEG(bg)\Untitled9.jpg
  \LETTERS_NEG(bg)\Untitled10.jpg
  \LETTERS_NEG(bg)\Untitled11.jpg
  \LETTERS_NEG(bg)\Untitled12.jpg
  \LETTERS_NEG(bg)\Untitled13.jpg
  \LETTERS_NEG(bg)\Untitled14.jpg
  \LETTERS_NEG(bg)\Untitled15.jpg
  \LETTERS_NEG(bg)\Untitled16.jpg
  \LETTERS_NEG(bg)\Untitled17.jpg
  \LETTERS_NEG(bg)\Untitled18.jpg
  \LETTERS_NEG(bg)\Untitled19.jpg
  \LETTERS_NEG(bg)\Untitled20.jpg
  \LETTERS_NEG(bg)\Untitled21.jpg
  \LETTERS_NEG(bg)\Untitled22.jpg
  \LETTERS_NEG(bg)\Untitled23.jpg
  \LETTERS_NEG(bg)\Untitled24.jpg
  \LETTERS_NEG(bg)\Untitled25.jpg
  \LETTERS_NEG(bg)\Untitled26.jpg
  \LETTERS_NEG(bg)\Untitled27.jpg
  \LETTERS_NEG(bg)\Untitled28.jpg
  \LETTERS_NEG(bg)\Untitled29.jpg
  \LETTERS_NEG(bg)\Untitled30.jpg
  </code></pre>
  
  <p>What am I doing wrong?</p>