コード例 #1
0
 def make_shot(self, capture):
     index = self.indexes[self.captures.index(capture)]
     del (capture)
     try:
         capture = self.cv2.VideoCapture(index)
     except Exception as e:
         self.logger.warning("Error while opening video capture: " + str(e))
     else:
         if capture.isOpened():
             self.captures[index] = capture
             frame = DualCameraMaster.make_shot(self, capture)
             capture.release()
             return frame
コード例 #2
0
 def make_shot(self, capture):
     index = self.indexes[self.captures.index(capture)]
     del(capture)
     try:
         capture = self.cv2.VideoCapture(index)
     except Exception as e:
         self.logger.warning("Error while opening video capture: " + str(e))
     else:
         if capture.isOpened():
             self.captures[index] = capture
             frame = DualCameraMaster.make_shot(self, capture)
             capture.release()
             return frame