1 | initial version |
you got this loop:
for (Rect rect : faceDetections.toArray()) {
// now, instead of writing the whole image to disk,
// only write the (face) cropped portion:
Mat cropped = frame.subrect(rect);
Highgui.imwrite("d:/capture6.jpg", cropped);
// also, please do this, *before* drawing more stuff into 'frame'
...
2 | No.2 Revision |
you got this loop:
for (Rect rect : faceDetections.toArray()) {
// now, instead of writing the whole image to disk,
// only write the (face) cropped portion:
Mat cropped = frame.subrect(rect);
frame.submat(rect);
Highgui.imwrite("d:/capture6.jpg", cropped);
// also, please do this, *before* drawing more stuff into 'frame'
...