MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / define_args

Function define_args

python/cli/record/oak.py:33–72  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

31# script and as a subcommand in sai-cli.
32
33def define_args(p):
34 p.add_argument("--output", help="Recording output folder, otherwise recording is saved to current working directory")
35 p.add_argument('--auto_subfolders', action='store_true', help='Create timestamp-named subfolders for each recording')
36 p.add_argument("--use_rgb", help="Use RGB data for tracking (OAK-D S2)", action="store_true")
37 p.add_argument("--mono", help="Use a single camera (not stereo)", action="store_true")
38 p.add_argument("--no_rgb", help="Disable recording RGB video feed", action="store_true")
39 p.add_argument("--no_inputs", help="Disable recording JSONL and depth", action="store_true")
40 p.add_argument("--gray", help="Record (rectified) gray video data", action="store_true")
41 p.add_argument("--gray_preview", help="Show live preview of (rectified) gray video", action="store_true")
42 p.add_argument("--no_convert", help="Skip converting h265 video file", action="store_true")
43 p.add_argument('--no_preview', help='Do not show a live preview', action="store_true")
44 p.add_argument('--preview3d', help='Use more advanced visualizer instead of matplotlib', action="store_true")
45 p.add_argument('--no_slam', help='Record with SLAM module disabled', action="store_true")
46 p.add_argument('--recording_only', help='Do not run VIO, may be faster', action="store_true")
47 p.add_argument('--april_tag_path', help='Record with April Tags (path to tags.json)')
48 p.add_argument('--disable_cameras', help='Prevents SDK from using cameras, for example to only record RGB camera and IMU', action="store_true")
49 p.add_argument('--no_usb_speed_check', help='Disable USB speed check', action="store_true")
50 # This can reduce CPU load while recording with the --no_feature_tracker option
51 # and the 800p resolution. See "ffmpeg -codecs" (and see "encoders" under h264)
52 # for options that might be available. On Raspberry Pi or Jetson, try "h264_v4l2m2m",
53 # and on Linux machines with Nvidia GPUs, try "h264_nvenc".
54 p.add_argument('--ffmpeg_codec', help="FFMpeg codec for host", default=None)
55 p.add_argument('--ffmpeg_preview', help="Save PNG previews while recording with ffmpeg every Nth frame", type=int)
56 p.add_argument('--ffmpeg_preview_scale', help="Scale of the ffmpeg PNG previews 0.5 half, 1.0 full resolution etc.", type=float)
57 p.add_argument("--use_encoded_video", help="Encodes video on OAK-D, works only in recording only mode", action="store_true")
58 p.add_argument("--color_stereo", help="Use this flag with devices that have color stereo cameras", action="store_true")
59 p.add_argument('--map', help='Record SLAM map', action="store_true")
60 p.add_argument('--no_feature_tracker', help='Disable on-device feature tracking', action="store_true")
61 p.add_argument('--vio_auto_exposure', help='Enable SpectacularAI auto exposure which optimizes exposure parameters for VIO performance (BETA)', action="store_true")
62 p.add_argument('--white_balance', help='Set manual camera white balance temperature (K)', type=int)
63 p.add_argument('--exposure', help='Set manual camera exposure (us)', type=int)
64 p.add_argument('--sensitivity', help='Set camera sensitivity (iso)', type=int)
65 p.add_argument('--ir_dot_brightness', help='OAK-D Pro (W) IR laser projector brightness (mA), 0 - 1200', type=float, default=0)
66 p.add_argument("--resolution", help="Gray input resolution (gray)",
67 default='400p',
68 choices=['400p', '800p', '1200p'])
69 p.add_argument('--mxid', help="Specific OAK-D device's MxID you want to use, if you have multiple devices connected")
70 p.add_argument('--list_devices', help="List connected OAK-D devices", action="store_true")
71
72 return p
73
74def define_subparser(subparsers):
75 import argparse

Callers 2

define_subparserFunction · 0.70
parse_argsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected