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
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