diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/__main__.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/argaze/__main__.py b/src/argaze/__main__.py index 7cfeb09..12d654c 100644 --- a/src/argaze/__main__.py +++ b/src/argaze/__main__.py @@ -26,6 +26,7 @@ import os import stat from . import load +from .DataFeatures import SharedObjectBusy from .ArFeatures import ArCamera, ArContext, PostProcessingContext, LiveProcessingContext from .utils.UtilsFeatures import print_progress_bar @@ -117,15 +118,28 @@ def load_context(args): # Window mode on if not args.no_window: - # Display context - display(context.name, context.image(draw_pipeline=draw_pipeline), 0.75) + try: + + # Display context + display(context.name, context.image(draw_pipeline=draw_pipeline), 0.75) + + except SharedObjectBusy: + + pass # Head-mounted eye tracker case: display environment frames image if issubclass(type(context.pipeline), ArCamera): for scene_frame in context.pipeline.scene_frames(): - display(scene_frame.name, scene_frame.image(), 0.5) + try: + + # Display scene's frame + display(scene_frame.name, scene_frame.image(), 0.5) + + except SharedObjectBusy: + + pass # Key interaction key_pressed = cv2.waitKey(40) |