void CascadeClassifier::detectMultiScale opencv 3.2-dev parameter assumption

asked 2017-06-12 10:15:55 -0600

updated 2017-06-12 12:19:33 -0600

void CascadeClassifier::detectMultiScale( InputArray image,
calls  
void clipObjects(Size sz, std::vector<Rect>& objects,
                 std::vector<int>* a, std::vector<double>* b)
{
    size_t i, j = 0, n = objects.size();
    Rect win0 = Rect(0, 0, sz.width, sz.height);
    if(a)
    {
        CV_Assert(a->size() == n);
    }
    if(b)
    {
        CV_Assert(b->size() == n);
    }

///.....

A and b are rejectLevels and weights. It looks like this code is attempting to fix rectangles going outside image bounds(in 2.4 I remember tossing out illegal rects). This assert throws when I don't use rejectLevels/Weights, but detectedObjects is > 0 and I use detectedObjects. Don't think this is right.

edit retag flag offensive close merge delete

Comments

how exactly do you call detectMultiScale() ?

berak gravatar imageberak ( 2017-06-14 00:13:46 -0600 )edit

I'm going to put the full signature of detectMultiScale to help you.

shincodex gravatar imageshincodex ( 2017-07-11 08:55:47 -0600 )edit