Fix real-time target location on camera stream

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-03-26 12:58:13 -07:00
parent a3f63749b1
commit 42faae18eb

View File

@@ -175,7 +175,7 @@ export default {
imageCtx.clearRect(0,0,imCanvas.width,imCanvas.height) imageCtx.clearRect(0,0,imCanvas.width,imCanvas.height)
var imgWidth var imgWidth
var imgHeight var imgHeight
const imgAspect = vidData.clientWidth / vidData.clientHeight const imgAspect = vidData.width / vidData.height
const rendAspect = imCanvas.width / imCanvas.height const rendAspect = imCanvas.width / imCanvas.height
if (imgAspect >= rendAspect) { if (imgAspect >= rendAspect) {
imgWidth = imCanvas.width imgWidth = imCanvas.width