Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

multiple cascade classifiers in one loop

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...
     }

}