Skip to main content

vizion-ctl

vizion-ctl Functionality Overview

vizion-ctl is a command-line tool that utilizes the VizionSDK to control video devices. It provides a wide range of functionalities and options for convenient configuration and control.

General/Common Options

The following options provide general functionality for vizion-ctl:

FlagDescription
-hDisplay available options
-v, --versionShow version information
-l, --list-devicesList all connected camera devices
-d, --device <num>Select device number (default: 0)
-i, --infoDisplay selected device information
-g, --get-ctrl <name>Retrieve control value (use --all for all controls)
-s, --set-ctrl <ctrl=value>Set control value
-f, --list-formatsList supported capture formats
-si, --save-imageSave camera image with --path <filepath> parameter
-hi, --header-infoDisplay ISP header information
-go, --get-ospGet current OSP profile flag
-so, --set-osp <flag>Set OSP profile flag: 0=Disable, 1=Enabled, 2=EnableAndSave
-ro, --reset-ospReset OSP profile to default settings
-fu, --firmware-updateUpdate firmware
(optional --target is for UVC firmware, with possible target flags : SPI, RAM, I2C)
-fd, --firmware-downloadDownload firmware interactively
--get-timestampRetrieve timestamp
--reset-timestampReset timestamp (requires streaming)
--get-framecountRetrieve framecount
--reset-framecountReset framecount (requires streaming)
--debugEnable debug logging
--log-pathSpecify log file storage path
-sc, --save-sensorSave sensor config to binary file
-sd, --sensor-decodeDecode sensor config binary to JSON (requires --bin and --json parameters)
--reset-routeReset the active routes from device on Linux platform
--setroute <yaml_file_path>Activate the routes from the YAML file
--enable-imu <imu_mode>Enable IMU mode: self-test, ispu
--reboot-imu <imu_mode>Reboot IMU mode: self-test, ispu
--imu-acc <imu_mode>Get IMU Accelerometer data with specific self test type.
--self-test <self_test_mode> parameter: normal, positive, negative
--imu-gyr <imu_mode>Get IMU Gyroscope data with specific self test type.
--self-test <self_test_mode> parameter: normal, positive, negative
--imu-ispuGet IMU ISPU data.
--get-intrin <filepath>Get intrinsics info and save to YAML.
--set-intrin <filepath>Set intrinsics info from YAML file.
info
  • IMU options are only available on VCM/TEVM cameras.
  • Intrinsics options are only available on TEVS/TEVM cameras.

Intrinsics YAML file format

The YAML file used with the --get-intrin and --set-intrin commands must follow the structure below:

cam0:
cam_overlaps: []
camera_model: pinhole
distortion_coeffs: [fx, fy, cx, cy]
distortion_model: radtan
intrinsics: [k1, k2, r1, r2]
resolution: [w, h]
rostopic: /usb_cam/image_raw
  • w, h: Image width and height in pixels.
  • fx, fy: Focal lengths along the horizontal (U) and vertical (V) axes.
  • cx, cy: Principal point coordinates along the horizontal (U) and vertical (V) axes.
  • k1, k2: Radial Distortion coefficients.
  • r1, r2: Tangential Distortion coefficients.
info

The fields cam_overlaps, camera_model, distortion_model, and rostopic are fixed.
VizionSDK only writes the numerical values (fx, fy, cx, cy, k1, k2, r1, r2, w, h) from this YAML file.

Control Parameters

Below are the parameters available for get/set controls:

Control NameminmaxstepdefaultDescriptionNote
brightness-101010
contrast-505010
saturation050110
gamma479122
sharpness-202010
backlight-150150110
noise-202010
white_balance_mode0111Manual Temperature (0)
Auto (1)
white_balance_temperature23001500015000
jpeg_quality02551233
exposure_mode0211Manual Mode (0)
Auto Mode (1)
Auto gain (2)
exposure_time11000000133333
exposure_min_time11000000116666The default value is followed by VxExposure.yaml min value
exposure_max_time11000000166666The default value is followed by VxExposure.yaml max value
exposure_gain16411
flick_mode0310Disable (0)
50Hz (1)
60Hz (2)
Auto (3)
special_effect0410Normal Mode (0)
Black White Mode (1)
Grayscale Mode (2)
Negative Mode (3)
Sketch Mode (4)
flip_mode0310Normal (0)
H-Mirror (1)
V-Mirror (2)
Rotate-180 (3)
pan_target01015
tilt_target01015
zoom_target1080110
throughput10.01000.0
max_fps1120
trigger_mode0310Disable (0)
Sync (1)
Periodic (2)
Non Periodic(3)
Supported Device:
  • TEVS cameras
  • VCS cameras
ehdr_mode0110Enable (0)
Disable (1)
Disable mode will turn off the eHDR effect
ehdr_exposure_min_number1411
ehdr_exposure_max_number1414
ehdr_ratio_min1128112
ehdr_ratio_max1128124
info
  • eHDR features are only supported on the following devices:
    • VCI-AR0821 / VCI-AR0822
    • VCS-AR0821 / VCS-AR0822
    • VLS3-AR0821 / VLS3-AR0822
    • VLS-GM2-AR0821 /VLS-GM2-AR0822
    • TEVS-AR0821 / TEVS-AR0822

Examples

Here are some examples illustrating the usage of vizionctl:

Display the vizion-ctl version information

vizion-ctl -v
vizion-ctl --version

List all available video devices

vizion-ctl -l
vizion-ctl --list-devices

Get the device information

vizion-ctl -d 0 -i
vizion-ctl -d 0 --info

Get the controls value

# Get All controls value
vizion-ctl -d 0 -g --all
vizion-ctl -d 0 --get-ctrl --all

# Get throughput value
vizion-ctl -d 0 -g throughput
vizion-ctl -d 0 --get-ctrl throughput

Set the control value

# Set throughput value to 500
vizion-ctl -d 0 -s throughput=500
vizion-ctl -d 0 --set-ctrl throughput=500

List the supported capture formats

vizion-ctl -d 0 -f
vizion-ctl -d 0 --list-formats

Save the image captured from device

warning

Please ensure the destination path is set to a location with write permissions for normal users.

vizion-ctl -d 0 -si --path=path_to_img
vizion-ctl -d 0 --save-image --path=path_to_img

Get the ISP header information

vizion-ctl -d 0 -hi
vizion-ctl -d 0 --header-info

Get the current OSP profile flag

vizion-ctl -d 0 -go
vizion-ctl -d 0 --get-osp

Set the OSP profile flag

vizion-ctl -d 0 -so 1
vizion-ctl -d 0 --set-osp 1

Reset the OSP profile flag to default value

vizion-ctl -d 0 -ro
vizion-ctl -d 0 --reset-osp

Update the firmware

# update sensor
vizion-ctl -d 0 -fu sensor=firmware.bin

# update uvc
vizion-ctl -d 0 -fu uvc=firmware.img

# update uvc with target flag = RAM
vizion-ctl -d 0 -fu uvc=firmware.img --target RAM

Download the firmware

warning

Please ensure the destination path is set to a location with write permissions for normal users.

vizion-ctl -d 0 -fd --path path_to_fw

Get the timestamp and framecount

vizion-ctl -d 0 --get-timestamp
vizion-ctl -d 0 --get-framcount

Reset the timestamp and framecount

warning

Please ensure the device is streaming or not. The reset functions must be used when the camera is streaming.

vizion-ctl -d 0 --reset-timestamp
vizion-ctl -d 0 --reset-framecount

Set the debug level for vizion-ctl

vizion-ctl --debug

Set the log file path

warning

Please ensure the destination path is set to a location with write permissions for normal users.

vizion-ctl -d 0 --log-path path_to_log_file

Export the sensor config

warning

Please ensure the destination path is set to a location with write permissions for normal users.

vizion-ctl -d 0 --save-sensor config.bin

Decode the sensor config

warning

Please ensure the destination path is set to a location with write permissions for normal users.

vizion-ctl --sensor-decode --bin config.bin --json config.json

Clear the active routes

warning

This command only support on Linux platform.

vizion-ctl --reset-route

Activate the routes

warning

This command only support on Linux platform.
Please ensure the YAML path is set to a location with write permissions for normal users.

vizion-ctl --setroute routes.yaml

Enable the IMU mode

warning

This command only available on VCM/TEVM cameras.

vizion-ctl -d 0 --enable-imu ispu

Reboot the IMU mode

warning

This command only available on VCM/TEVM cameras.

vizion-ctl -d 0 --reboot-imu ispu

Get IMU self-test mode accelerometer and gyroscope data

warning

This command only available on VCM/TEVM cameras.
Please ensure IMU self-test mode is enable.

vizion-ctl -d 0 --imu-acc --self-test normal
vizion-ctl -d 0 --imu-gyr --self-test normal

Get IMU ISPU data

warning

This command only available on VCM/TEVM cameras.
Please ensure IMU ispu mode is enable.

vizion-ctl -d 0 --imu-ispu

Get intrinsics data

warning

This command only available on TEVS/TEVM cameras.
Please ensure the YAML path is set to a location with write permissions for normal users.

vizion-ctl -d 0 --get-intrin calibration.yaml

Set intrinsics data

warning

This command only available on TEVS/TEVM cameras.
Please ensure the YAML path is set to a location with write permissions for normal users.

vizion-ctl -d 0 --set-intrin calibration.yaml