Graduate

Update flask

......@@ -29,9 +29,8 @@ function activate()
function detect_face()
{
let classifier = new cv.CascadeClassifier();
let imgElement = document.getElementById('imagefile');
classifier.load('haarcascade_frontalface_default.xml');
let src = cv.imread(imgElement);
let src = cv.imread('imagefile');
let dst = new cv.Mat(video.height, video.width, cv.CV_8UC4);
let gray = new cv.Mat();
src.copyTo(dst);
......@@ -93,9 +92,9 @@ var loadFile = function(event) {
reader.readAsDataURL(event.target.files[0]);
reader.onload = function() {
var output = document.getElementById('imagefile');
output.src = URL.createObjectURL(event.target.files[0]);
output.src = reader.result;
detect_face();
}
};
};
let tempCanvas = document.createElement("canvas");
......