From 6c9a2c467856ab501022eb0aabc38495538e5db6 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 23 Jul 2024 23:19:45 +0200 Subject: Adding fps attribute to slow image refreshing. --- src/argaze/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/argaze/__main__.py b/src/argaze/__main__.py index c65d6e5..e4363ca 100644 --- a/src/argaze/__main__.py +++ b/src/argaze/__main__.py @@ -182,7 +182,7 @@ def load_context(args): pass # Key interaction - key_pressed = cv2.waitKey(40) + key_pressed = cv2.waitKey( int(1000 / args.fps) ) #print("key_pressed", key_pressed) # f: disable/enable pipeline drawing @@ -323,6 +323,7 @@ parser_load.add_argument('context_file', metavar='CONTEXT_FILE', type=str, help= parser_load.add_argument('-v', '--verbose', action='store_true', default=False, help='enable verbose mode to print information in console') parser_load.add_argument('-p', '--pipe_path', metavar='PIPE_PATH', type=str, default=None, help='enable pipe communication to execute external commands') parser_load.add_argument('-x', '--display', metavar='DISPLAY', nargs="+", type=int, default=None, help='adapt windows to display dimension') +parser_load.add_argument('-f', '--fps', metavar='FPS', type=int, default=15, help='set window fps') parser_load.add_argument('--no-window', action='store_true', default=False, help='disable window mode') parser_load.set_defaults(func=load_context) -- cgit v1.1