Ask Your Question

Revision history [back]

For that You will need one loop:

vector<mat> people; for(int i=0;i<rects.size();i++) {="" people.push_back((image(rects[i])).clone());="" or="" draw="" green="" rectangle="" over="" image="" rectangle(image,rects[i],scalar(0,255,0),1,8,0);="" }<="" p="">

For that You will need one loop:

vector<mat>

vector<Mat> people;
for(int i=0;i<rects.size();i++) {="" people.push_back((image(rects[i])).clone());="" or="" draw="" green="" rectangle="" over="" image="" rectangle(image,rects[i],scalar(0,255,0),1,8,0);="" }<="" p="">

i=0;i<rects.size();i++) { people.push_back((image(rects[i])).clone()); //or draw green rectangle over image //rectangle(image,rects[i],Scalar(0,255,0),1,8,0); }