0

I have 1300+ positive images and 20000+ negative images. My positive images are of size 1080*1920 but I create samples with them to 45*45:

opencv_createsamples -vec pos.vec -info posdata.txt -bg negdata.txt -w 45 -h 45 -num 1152

Then when I use opencv_cascadetrain,

opencv_traincascade -data xml -vec pos.vec -bg negdata.txt -numPos 1000 -numNeg 1000 -numStages 10 -featureType HOG -minHitRate 0.99 -w 50 -h 50

Then I want to use the cascade.xml file to detect my objects, should I use CascadeClassifier or HOGDescriptor? What's the difference? Where can I set the "nLevel"?

Thx.

akanarika
  • 3
  • 2

1 Answers1

0

For loading a CascadeClassifier, you need to use the load function, which returns a bool. "It can be either a Haar or a LBP classifer"

You can look at an exemple here: http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html

Mickaël B.
  • 325
  • 4
  • 14