class CameraCalibration(object): def __init__(self, capture, boards, flags=0): self._boards = boards self._calib_flags = flags ## Initialise image queue self.q_mono = Queue.Queue() ## Initialise image grabber grabber = GrabberThread(capture, self.queue_monocular) grabber.setDaemon(True) grabber.start() mth = ConsumerThread(self.q_mono, self.handle_monocular) mth.setDaemon(True) mth.start() self.calibrator = MonoCalibrator(self._boards, self._calib_flags) print(self.__class__) def redraw_monocular(self, *args): pass def queue_monocular(self, img): self.q_mono.put(img) def handle_monocular(self, img): drawable = self.calibrator.handle_msg(img) self.displaywidth = drawable.scrib.cols self.redraw_monocular(drawable) def do_upload(self): print('do_upload')
def __init__(self, capture, boards, flags=0): self._boards = boards self._calib_flags = flags ## Initialise image queue self.q_mono = Queue.Queue() ## Initialise image grabber grabber = GrabberThread(capture, self.queue_monocular) grabber.setDaemon(True) grabber.start() mth = ConsumerThread(self.q_mono, self.handle_monocular) mth.setDaemon(True) mth.start() self.calibrator = MonoCalibrator(self._boards, self._calib_flags) print(self.__class__)