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:
| Flag | Description |
|---|---|
-h | Display available options |
-v, --version | Show version information |
-l, --list-devices | List all connected camera devices |
-d, --device <num> | Select device number (default: 0) |
-i, --info | Display 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-formats | List supported capture formats |
-si, --save-image | Save camera image with --path <filepath> parameter |
-hi, --header-info | Display ISP header information |
-go, --get-osp | Get current OSP profile flag |
-so, --set-osp <flag> | Set OSP profile flag: 0=Disable, 1=Enabled, 2=EnableAndSave |
-ro, --reset-osp | Reset OSP profile to default settings |
-fu, --firmware-update | Update firmware (optional --target is for UVC firmware, with possible target flags : SPI, RAM, I2C) |
-fd, --firmware-download | Download firmware interactively |
--get-timestamp | Retrieve timestamp |
--reset-timestamp | Reset timestamp (requires streaming) |
--get-framecount | Retrieve framecount |
--reset-framecount | Reset framecount (requires streaming) |
--debug | Enable debug logging |
--log-path | Specify log file storage path |
-sc, --save-sensor | Save sensor config to binary file |
-sd, --sensor-decode | Decode sensor config binary to JSON (requires --bin and --json parameters) |
--reset-route | Reset 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-ispu | Get IMU ISPU data. |
--get-intrin <filepath> | Get intrinsics info and save to YAML. |
--set-intrin <filepath> | Set intrinsics info from YAML file. |
- 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.
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 Name | min | max | step | default | Description | Note |
|---|---|---|---|---|---|---|
| brightness | -10 | 10 | 1 | 0 | ||
| contrast | -50 | 50 | 1 | 0 | ||
| saturation | 0 | 50 | 1 | 10 | ||
| gamma | 4 | 79 | 1 | 22 | ||
| sharpness | -20 | 20 | 1 | 0 | ||
| backlight | -150 | 150 | 1 | 10 | ||
| noise | -20 | 20 | 1 | 0 | ||
| white_balance_mode | 0 | 1 | 1 | 1 | Manual Temperature (0) Auto (1) | |
| white_balance_temperature | 2300 | 15000 | 1 | 5000 | ||
| jpeg_quality | 0 | 255 | 1 | 233 | ||
| exposure_mode | 0 | 2 | 1 | 1 | Manual Mode (0) Auto Mode (1) Auto gain (2) | |
| exposure_time | 1 | 1000000 | 1 | 33333 | ||
| exposure_min_time | 1 | 1000000 | 1 | 16666 | The default value is followed by VxExposure.yaml min value | |
| exposure_max_time | 1 | 1000000 | 1 | 66666 | The default value is followed by VxExposure.yaml max value | |
| exposure_gain | 1 | 64 | 1 | 1 | ||
| flick_mode | 0 | 3 | 1 | 0 | Disable (0) 50Hz (1) 60Hz (2) Auto (3) | |
| special_effect | 0 | 4 | 1 | 0 | Normal Mode (0) Black White Mode (1) Grayscale Mode (2) Negative Mode (3) Sketch Mode (4) | |
| flip_mode | 0 | 3 | 1 | 0 | Normal (0) H-Mirror (1) V-Mirror (2) Rotate-180 (3) | |
| pan_target | 0 | 10 | 1 | 5 | ||
| tilt_target | 0 | 10 | 1 | 5 | ||
| zoom_target | 10 | 80 | 1 | 10 | ||
| throughput | 10.0 | 1000.0 | ||||
| max_fps | 1 | 120 | ||||
| trigger_mode | 0 | 3 | 1 | 0 | Disable (0) Sync (1) Periodic (2) Non Periodic(3) | Supported Device:
|
| ehdr_mode | 0 | 1 | 1 | 0 | Enable (0) Disable (1) | Disable mode will turn off the eHDR effect |
| ehdr_exposure_min_number | 1 | 4 | 1 | 1 | ||
| ehdr_exposure_max_number | 1 | 4 | 1 | 4 | ||
| ehdr_ratio_min | 1 | 128 | 1 | 12 | ||
| ehdr_ratio_max | 1 | 128 | 1 | 24 |
- 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
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
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
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
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
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
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
This command only support on Linux platform.
vizion-ctl --reset-route
Activate the routes
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
This command only available on VCM/TEVM cameras.
vizion-ctl -d 0 --enable-imu ispu
Reboot the IMU mode
This command only available on VCM/TEVM cameras.
vizion-ctl -d 0 --reboot-imu ispu
Get IMU self-test mode accelerometer and gyroscope data
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
This command only available on VCM/TEVM cameras.
Please ensure IMU ispu mode is enable.
vizion-ctl -d 0 --imu-ispu
Get intrinsics data
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
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