multiple cascade classifiers in one loop

asked 2018-11-20 17:35:12 -0500

yoggiee gravatar image

I have different detectors. Each one detects one specified object. Im curious, can I merge these loops into one? My code looks like:

{    
  d1.detectMultiScale(image2, znaki1, 1.05, 3, 0, Size(40, 40));
  d2.detectMultiScale(image2, znaki2, 1.07, 3, 0 | CV_HAAR_SCALE_IMAGE, Size(40, 40));
  d3.detectMultiScale(image2, znaki3, 1.02, 3, 0 | CV_HAAR_SCALE_IMAGE, Size(40, 40));

 for (size_t i = 0; i < znaki1.size(); i++)
     {
       code...
     }
 for (size_t i = 0; i < znaki1.size(); i++)
     {
       code...
     }
 for (size_t i = 0; i < znaki1.size(); i++)
     {
       code...
     }

}
edit retag flag offensive close merge delete

Comments

using multiple cascade classifiers on the whole image won't scale. (and the loops are the smallest of your problems there)

do some research on Single Shot Detection networks

berak gravatar imageberak ( 2018-11-21 01:03:26 -0500 )edit

ssd is too much for my raspberry I guess..

yoggiee gravatar imageyoggiee ( 2018-11-21 07:30:01 -0500 )edit