for (rate = 2; rate <= 7; + + + 1)//for each window {len = baselen*rate;//detection of the Face's edge length (default square) [50, 75, 100, 125,
175] cout << "Current Window len is:" << len << Endl;
Step = LEN/2; for (x = 0; x < image->width-len; x + = Step)//for each x {for (y = 0; y < image->height-len; y + +
Step)//for each y {int faceflag = 1;
for (j = 0; J < Strclfinfolist.size (); j + +)//for each str clf {strclfinfo = strclfinfolist[j]; result = MYFD (x, y, Len, Len, Sumpixel, Strclfinfo, featurelist);
(int x, int y, int w, int h) if (result = = 0)//one Str CLF say this isn't a face, then regect this image { cout << "x=" << x << "; y= "<< y <<";
Len= "<< len <<" ==> not a Face "<< Endl;
Faceflag = 0;
Break }} if (Faceflag = = 1)//all Str CLF say this was a face and then draw {//draw window on the IMG Point Center (x + len*0.5, y + len*0.5);
Ellipse (IMG, center, Size (len*0.5, len*0.5), 0, 0,, Scalar (255, 0, 255), 4, 8, 0);
Rectangle (IMG, point (x, y), point (x + len, y + len), Scalar (0, 255, 255));
Imshow ("Facedection", IMG);
Waitkey (0); }
}
}
}