Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

hog.detectMultiScale exits program without any warning, if the given image is smaller than a threshold.

I try to run a pedestrian detector with hog.detectMultiScale(). However, I realized that if the given image is smaller than a threshold, it exits the program without any warning. I also did not see any comment in the docs about this any limitation of image size. I am using OpenCV3 and here is the section of my code with a naive solution.;

                Rect bb = boundingBoxes[i];

                // ignore too small bbs
                if(bb.area() < BB_THRESHOLD || bb.height < 60 || bb.width < 60)
                    continue;


                cout << bb.height << endl;
                cout << bb.width << endl;

                // get bb image and run detector
                Mat bb_image = fg(bb);
                hog.detectMultiScale(bb_image, found, 0, Size(5,5), Size(30,30), 1.0, 0, true);

However if I make smaller Size(30,30) to Size(10,10), I also need to increase the check sizes. I could not figure aout what is the exact size threshold but this is the case. Any idea for the solution or does it seem like a bug in opencv?

hog.detectMultiScale exits program without any warning, if the given image is smaller than a threshold.

I try to run a pedestrian detector with hog.detectMultiScale(). However, I realized that if the given image is smaller than a threshold, it exits the program without any warning. I also did not see any comment in the docs about this any limitation of image size. I am using OpenCV3 and here is the section of my code with a naive solution.;

                Rect bb = boundingBoxes[i];

                // ignore too small bbs
                if(bb.area() < BB_THRESHOLD || bb.height < 60 || bb.width < 60)
                    continue;


                cout << bb.height << endl;
                cout << bb.width << endl;

                // get bb image and run detector
                Mat bb_image = fg(bb);
                hog.detectMultiScale(bb_image, found, 0, Size(5,5), Size(30,30), 1.0, 0, true);

However if I make smaller Size(30,30) to Size(10,10), I also need to increase the check sizes. I could not figure aout out what is the exact size threshold but this is the case. Any idea for the solution or does it seem like a bug in opencv?