// We iterate over the discovered faces and draw yellow rectangles
// around them.
for (int i = 0; i < faces.total(); i++) {
CvRect r = new CvRect(cvGetSeqElem(faces, i));
cvRectangle(originalImage, cvPoint(r.x(), r.y()),
cvPoint(r.x() + r.width(), r.y() + r.height()),
CvScalar.YELLOW, 1, CV_AA, 0);
}
ImageIcon image = new ImageIcon(originalImage.getBufferedImage().getScaledInstance(-1, -1, 0));