Ask Your Question

Revision history [back]

According to the documentation, the command is

opencv_traincascade -data <cascade_dir_name> -vec <vec_file_name> -bg <background_file_name> -numPos <number_of_positive_samples> -numNeg <number_of_negative_samples> -numStages <number_of_stages> -w <sampleWidth> -h <sampleHeight>

So for your case it can be something like this:

opencv_traincascade -data data -vec positives.vec -bg background.txt -numPos 15 -numNeg 128 -numStages 30 -w 100 -h 100