1
In a process of creating a haarcascade, I performed the procedures according to the tutorials of the Opencv library and arrived at the result of a vector with the number of 70 positive images named positive vec.. The vector is being generated correctly, because executing the following command, the vector images are shown:
opencv_createsamples -vec positivos.vec -show -w 20 -h 20
My problem is in part of the training command, when executing the following command:
opencv_traincascade -data data -vec positivos.vec -bg negativos.dat -numPos 70 -numNeg 35 -numStages 10 -minHitRate 0.8 -w 20 -h 20
My negative.dat file is as in the following way:
negativos/img1.jpg
negativos/img2.jpg
negativos/img3.jpg
negativos/img4.jpg
...
negativos/img1000.jpg
What would be the problem with the training command? Few images? Something not correctly added? How to proceed?
Note: I am using Windows 10 64bits.
How about showing the original error msg instead of images? You wouldn’t believe how bad it looks on some systems.
– Sidon
It is that the error message appears directly in Prompt, I run the command there and end up giving error along with the warning that the program stopped working. The main error that appears at the prompt is: Opencv Error: Bad argument (Can not get new Positive sample. The Most possible Reason is insufficient Count of samples in Given vec-file.
– LCavenaghi