Graduate

Update flask

......@@ -30,7 +30,7 @@ function activate()
function detect_face(img)
{
let canvas = document.createElement('canvas');
let ctx = canvas.getContext("2d")
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);
......@@ -55,6 +55,8 @@ function detect_face(img)
let cropped = src.roi(rect);
cv.imshow(tempCanvas,cropped);
}
let preview = document.getElementById('preview');
cv.imshow(preview, dst);
if (faces.size() == 1)
{
let sender = document.getElementById("sender");
......@@ -68,7 +70,6 @@ function detect_face(img)
{
alert('하나의 얼굴만 등록해주세요.')
}
cv.imshow('preview', dst);
}
function submit()
......