From 24c4b962e5fdbff27b73bdba9e8b419c4df804b6 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 17 Jul 2021 16:37:43 +1000 Subject: [PATCH] now draws green rectangle and person.tag for matches on faces -- need to fix interface, but it works - lots of "plumbing" across database/classes and this viewer.html to get this to work --- templates/viewer.html | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/templates/viewer.html b/templates/viewer.html index 9fbcd9d..87c1737 100644 --- a/templates/viewer.html +++ b/templates/viewer.html @@ -35,17 +35,26 @@ // actually draw the pixel images to the canvas at the right size context.drawImage(im, 0, 0, canvas.width, canvas.height ) - /* need a for loop - context.beginPath(); - new_x=(orig_face.x/orig_face.orig_w)*img.width/(img.height/canvas.height) - new_y=(orig_face.y/orig_face.orig_h)*thumbsize/(img.height/canvas.height) - new_w=(orig_face.w/orig_face.orig_w)*img.width/(img.height/canvas.height) - new_h=(orig_face.h/orig_face.orig_h)*thumbsize/(img.height/canvas.height) - context.rect(new_x, new_y, new_w, new_h) - context.lineWidth = 2; - context.strokeStyle = 'green'; - context.stroke(); - */ + // draw rect on each face + for( i=0; i