Ask Your Question

Revision history [back]

Very simple TrainCascade not working

Hello everyone,

I'm currently trying to detect complex thing in video but since it wasn't working at all, I've decided to go back to the basics and I'm trying to find this object

image description

So I used this script in a .bat file with a directory full of 1519 negative image that I checked one by one to contain nothing that look like that.

:: Creaction of 10000 positive variation of the image
opencv_createsamples -vec pos.vec -img positive/recherche.bmp -bg negative.txt -num 10000
pause

:: Training
opencv_traincascade -data resultat -vec pos.vec -featureType LBP -bg negative.txt -numPos 1 -numNeg 1519
pause

After that I'm searching in image like this:

image description

No luck at all... So imagine if the traincascade is not able to detect something as simple as this logo in a white bmp, I will never work on a real world example.

Anyone here could tell me what I'm doing wrong or what I could do to improve my technique. The correct answer will be awarded to the one that will give me an advice that will make this simple detection works. I've also read that Haartraining is slower, not developed anymore but could be more effective, is it true?

Thanks