1 | initial version |
You are using an image read from the disk. You should read it from the capture device.
....
if (capture.isOpened()) {
isStart = true;
Mat image;
capture.read(image);
MatOfRect faceDetections = new MatOfRect();
faceDetector.detectMultiScale(image, faceDetections);
.....
}