فهرست منبع

fix: vpu RotatImage wrapAffine bg to tuple

micha 1 سال پیش
والد
کامیت
b24480f29d
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      vpu/vpu_live.py

+ 2 - 2
vpu/vpu_live.py

@@ -377,11 +377,11 @@ class Vopen():
 
             center  = (shape[0]/2+delta_x,shape[1]/2+delta_y)
             image = self.moveImage(image,x=delta_x,y=delta_y,shape=bg_shape)
-
+            bg_shape = tuple(bg_shape) # exception ... if angle 0 no tuple !
             rot_mat = self.cv2.getRotationMatrix2D(center,angle,1.0) 
             #print("wrapAffine:", image, rot_mat, bg_shape) #,flags=self.cv2.INTER_LINEAR)
             print("wrapAffine:", type(image), type(rot_mat), type(bg_shape) ) #,flags=self.cv2.INTER_LINEAR)
-            frame   = self.cv2.warpAffine(image, rot_mat, bg_shape) #,flags=self.cv2.INTER_LINEAR)
+            frame   = self.cv2.warpAffine(image, rot_mat,  bg_shape  ) #,flags=self.cv2.INTER_LINEAR)
             return frame
         except Exception as e:
             raise(e)