Ejemplo n.º 1
0
    def loop_over(self, images, handle_input=lambda key : None, delay=25):
        for image in images:
            self._show(image)

            keycode = lib.cvWaitKey(delay)
            nothing_was_pressed = keycode == -1
            if nothing_was_pressed:
                continue

            handle_input(key=_keycode_to_key(keycode))
Ejemplo n.º 2
0
    def loop_over(self, images, handle_input=lambda key: None, delay=25):
        for image in images:
            self._show(image)

            keycode = lib.cvWaitKey(delay)
            nothing_was_pressed = keycode == -1
            if nothing_was_pressed:
                continue

            handle_input(key=_keycode_to_key(keycode))
Ejemplo n.º 3
0
 def show_until_keypress(self, image, delay=None):
     self._show(image)
     keycode = lib.cvWaitKey(0)
     return _keycode_to_key(keycode)
Ejemplo n.º 4
0
 def show_until_keypress(self, image, delay=None):
     self._show(image)
     keycode = lib.cvWaitKey(0)
     return _keycode_to_key(keycode)