Beispiel #1
0
 def update(self, dt):
     if self.capture.isOpened() == True:
         ret, frame = self.capture.read()
         cv2.imwrite("capture.png", frame)
         YOLO_object_detect("capture.png", "capture_YOLO.png")
         self.img_id.source = "capture_YOLO.png"
         self.img_id.reload()
Beispiel #2
0
 def perform_YOLO(self, dt):
     ret, frame = self.capture1.read()
     if (ret == False):
         self.processed_flag = 1
         self.button_id.text = "PLAY"
         Clock.unschedule(self.per)
         self.capture1.release()
         return
     cv2.imwrite("IMG3.png", frame)
     YOLO_object_detect("IMG3.png", "IMG_YOLO3.png")
     frame2 = cv2.imread("IMG_YOLO3.png")
     self.vid.write(frame2)
Beispiel #3
0
 def perform_YOLO(self, dt):
     ret, frame = self.capture1.read()
     self.frame_h = frame.shape[0]
     self.frame_w = frame.shape[1]
     if (ret == False):
         self.processed_flag = 1
         Clock.unschedule(self.per)
         self.capture1.release()
         return
     cv2.imwrite("IMG3.png", frame)
     YOLO_object_detect("IMG3.png", "IMG_YOLO3.png")
     frame2 = cv2.imread("IMG_YOLO3.png")
     self.frames.append(frame2)
Beispiel #4
0
 def perform_YOLO(self):
     YOLO_object_detect("IMG2.png", "IMG_YOLO2.png")