This is my first attempt to use the cascade training mechanism of opencv. I am trying this based on a small image set of one positive and 3 negative images. I followed the instructions of the official opencv documentation.
The negative images are referenced to by a description file bg.txt
:
Negative/t1.jpg
Negative/t2.jpg
Negative/t3.jpg
The negative images have different sizes (all in a "1920 x something" pixel range).
The positive image was used to generate a vector file with
opencv_createsamples.exe -img Positive/p1.jpg -num 5000 -w 100 -h 60 -show -vec vecFile.vec
Everything so far works without an error. I'd guess it's normal that the vector file vecFile.vec
is not readable since it stores the 5000 images.
When I now want to apply cascade training by using
opencv_traincascade.exe -data TrainData/ -vec vecFile.vec -bg bg.txt -w 100 -h 60 -npos 10 -nneg 10
The program crashes without any output ("the program has stopped working"). Any idea why this is happening? Did I forget some important parameters?
I'm using Windows 10 and opencv 3.