Browse Source

fix MediaCam.draw

micha 1 week ago
parent
commit
4e7a90a29a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      vpu/vpu_live4.py

+ 3 - 2
vpu/vpu_live4.py

@@ -311,8 +311,9 @@ class MediaCam():
         pass
 
     def draw(self,wn,im,x,y,w,h):
-        xx = w/2 
-        yy = h/2
+        xx = int(im.shape[1]/2) 
+        yy = int(im.shape[0]/2)
+
         wn.blit(im, (int(x-xx), int(y-yy)))  # draw frame
 
     def _open_cam(self,obj):