Graduate

Dectect optimization

......@@ -100,6 +100,7 @@ function main()
let canvasContext = canvasOutput.getContext('2d');
let src = new cv.Mat(video.height, video.width, cv.CV_8UC4);
let dst = new cv.Mat(video.height, video.width, cv.CV_8UC4);
let msize = new cv.Size(video.width / 4, video.height / 4);
let dsize = new cv.Size(canvasOutput.width, canvasOutput.height);
let cap = new cv.VideoCapture(video);
let faces = new cv.RectVector();
......@@ -152,7 +153,6 @@ function main()
cv.flip(src, src, 1);
src.copyTo(dst);
// detect faces.
let msize = new cv.Size(video.width / 4, video.height / 4);
classifier.detectMultiScale(dst, faces, 1.1, 5, 0, msize);
// draw faces.
for (let i = 0; i < faces.size(); ++i) {
......
......@@ -81,6 +81,7 @@ function main()
let canvasContext = canvasOutput.getContext('2d');
let src = new cv.Mat(video.height, video.width, cv.CV_8UC4);
let dst = new cv.Mat(video.height, video.width, cv.CV_8UC4);
let msize = new cv.Size(video.width / 4, video.height / 4);
let dsize = new cv.Size(canvasOutput.width, canvasOutput.height);
let cap = new cv.VideoCapture(video);
let faces = new cv.RectVector();
......@@ -132,7 +133,6 @@ function main()
cv.flip(src, src, 1);
src.copyTo(dst);
// detect faces.
let msize = new cv.Size(video.width / 4, video.height / 4);
classifier.detectMultiScale(dst, faces, 1.1, 5, 0, msize);
// draw faces.
for (let i = 0; i < faces.size(); ++i) {
......