allow runtime drawing settings for mjpeg and latest

This commit is contained in:
Blake Blackshear
2020-12-19 08:22:31 -06:00
parent 7dc6382c90
commit 899d41f361
5 changed files with 80 additions and 26 deletions

View File

@@ -70,7 +70,7 @@ class MotionDetector():
contour_area = cv2.contourArea(c)
if contour_area > self.config.contour_area:
x, y, w, h = cv2.boundingRect(c)
motion_boxes.append((x*self.resize_factor, y*self.resize_factor, (x+w)*self.resize_factor, (y+h)*self.resize_factor))
motion_boxes.append((int(x*self.resize_factor), int(y*self.resize_factor), int((x+w)*self.resize_factor), int((y+h)*self.resize_factor)))
if len(motion_boxes) > 0:
self.motion_frame_count += 1