Fix real-time target location on camera stream
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user