Revision history [back]

I am trying to train an overhead head detector using LBP with the help of opencv_traincascade. I have extracted 50 positive images from a video and placed them in a folder p. Then I have created an annotation file file.txt using opencv_annotation for those 50 positive images. After that, I created a vector file info.vec using opencv_createsamplesusing -w 100 and -h 100.
I have also extracted 100 negative images from the same video and placed them in folder img and listed their names in file bg.txt. Then I ran opencv_traincascade like this:
opencv_traincascade -data data -vec info.vec -bg bg.txt -precalcValBufSize 2048 -precalcIdxBufSize 2048 -numPos 50 -numNeg 100 -nstages 20 -minhitrate 0.999 -maxfalsealarm 0.5 -w 100 -h 100 -featureType LBP