Graduate

Update flask

......@@ -29,15 +29,16 @@ function activate()
function detect_face(img)
{
let classifier = new cv.CascadeClassifier();
classifier.load('haarcascade_frontalface_default.xml');
let canvas = document.createElement('canvas');
let ctx = canvas.getContext("2d")
ctx.src = img;
let src = cv.imread(canvas);
let dst = new cv.Mat(src.cols, src.rows, cv.CV_8UC4);
let gray = new cv.Mat();
let faces = new cv.RectVector();
let classifier = new cv.CascadeClassifier();
classifier.load('haarcascade_frontalface_default.xml');
src.copyTo(dst);
cv.cvtColor(dst, gray, cv.COLOR_RGBA2GRAY, 0);
let msize = new cv.Size(120, 120);
......