Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problems with CascadeClassifier detection. False positives

Hi, I'm making some tests with traincascade(to detect tuna), I create my positive samples with opencv_createsamples tool, then i create my own cascade.xml with opencv_traincascade, i'm doing very very simple tests so I use only 5 positive images and 1 negative. My positive samples have size 530x364 (some of them have only the object to detect in), when i launch the opencv_createsamples i use -w 26 -h 18 because if i use the original size opencv_traincascade needs too much memory for my pc. Here i have one question, if I use that parameters, would this cascade generated work properly?

And here is my main problem: I'm trying to do a detection to one of my positive samples. I use the sample code shown in the haar_cascade facedetection example. Here's the result.

image description

Maybe to make a better classifier I have to delete the background and put only the tuna in the image?

After show the image I get this error but this is another problem

image description

Hope someone can help me! thank you ahead!