Skip to content

Commit 71c15d0

Browse files
committed
Add support for internal parameter overrides on the command line
1 parent 39dd226 commit 71c15d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/cli/process/process.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def define_args(parser):
2020
parser.add_argument('--device_preset', choices=['none', 'oak-d', 'k4a', 'realsense', 'android', 'android-tof', 'ios-tof', 'orbbec-astra2', 'orbbec-femto'], help="Automatically detected in most cases")
2121
parser.add_argument('--fast', action='store_true', help='Fast but lower quality settings')
2222
parser.add_argument('--mono', action='store_true', help='Monocular mode: disable ToF and stereo data')
23+
parser.add_argument('--internal', action='append', type=str, help='Internal override parameters in the form --internal=name:value')
2324
parser.add_argument('--image_format', type=str, default='jpg', help="Color image format (use 'png' for top quality)")
2425
parser.add_argument("--preview", help="Show latest primary image as a preview", action="store_true")
2526
parser.add_argument("--preview3d", help="Show 3D visualization", action="store_true")
@@ -539,6 +540,11 @@ def detect_device_preset(input_dir):
539540
if args.device_preset:
540541
device_preset = args.device_preset
541542

543+
if args.internal is not None:
544+
for param in args.internal:
545+
k, _, v = param.partition(':')
546+
config[k] = v
547+
542548
if device_preset: print(f"Selected device type: {device_preset}", flush=True)
543549
else: print("Warning! Couldn't automatically detect device preset, to ensure best results suply one via --device_preset argument", flush=True)
544550

0 commit comments

Comments
 (0)