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)

Control Parameters

Below are the parameters available for get/set controls:

Control NameminmaxstepdefaultDescription of Modes
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_time11000000116666
exposure_max_time11000000166666
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

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 -d 0 --sensor-decode --bin config.bin --json config.json