aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-06-19 14:07:44 +0200
committerThéo de la Hogue2024-06-19 14:07:44 +0200
commit71029e689c116af128ef016e513fd68614e85646 (patch)
treefc7dbd4167968feb140761959b3eb8b3b74b5075
parent0ca3a8f96860192202a45b9be96d1a9b32d72c89 (diff)
downloadargaze-71029e689c116af128ef016e513fd68614e85646.zip
argaze-71029e689c116af128ef016e513fd68614e85646.tar.gz
argaze-71029e689c116af128ef016e513fd68614e85646.tar.bz2
argaze-71029e689c116af128ef016e513fd68614e85646.tar.xz
Allowing to mute pipeline drawing with f key.
-rw-r--r--src/argaze/__main__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/argaze/__main__.py b/src/argaze/__main__.py
index cc83d1d..7cfeb09 100644
--- a/src/argaze/__main__.py
+++ b/src/argaze/__main__.py
@@ -88,6 +88,9 @@ def load_context(args):
# Assess processing time
start_time = time.time()
+ # Draw context pipeline by default
+ draw_pipeline = True
+
# Waiting for 'ctrl+C' interruption
with contextlib.suppress(KeyboardInterrupt), os.fdopen(pipe_file) if args.pipe_path is not None else contextlib.nullcontext() as pipe:
@@ -115,7 +118,7 @@ def load_context(args):
if not args.no_window:
# Display context
- display(context.name, context.image(), 0.75)
+ display(context.name, context.image(draw_pipeline=draw_pipeline), 0.75)
# Head-mounted eye tracker case: display environment frames image
if issubclass(type(context.pipeline), ArCamera):
@@ -126,6 +129,7 @@ def load_context(args):
# Key interaction
key_pressed = cv2.waitKey(40)
+ #print("key_pressed", key_pressed)
# Esc: close window
if key_pressed == 27:
@@ -143,6 +147,11 @@ def load_context(args):
context.pause()
+ # f: disable/enable pipeline drawing
+ if key_pressed == 102:
+
+ draw_pipeline = not draw_pipeline
+
# Enter: start calibration
if key_pressed == 13: