Skip to content

CameraSystemConfigTest Tool

Prasad H L Bhat edited this page Aug 16, 2015 · 3 revisions

CameraSystemConfigTest tool is a simple tool create/modify/delete camera profiles. It also supports ways to save a camera profile to hardware and read it back.

Note that all modifications to a configuration file happen after copying the original to '/.Voxel/conf/' folder. Here, '' refers to the home directory of the user. On Linux, this maps to $HOME, while on Windows, this maps to %HOMEDRIVE%%HOMEPATH%.

Various command-line options supported by this tool are as follows -

-v Vendor ID of the USB device (hexadecimal)
-p Comma separated list of Product IDs of the USB devices (hexadecimal)
-s Serial number of the USB device (string)
-c Should create a new profile? If given, then name is to specified
-d Parent profile ID used while creating a new profile [default = -1].
-i ID of the camera profile
-t Name of the configuration section
-n Name of the parameter to read/write
-u Value for the parameter. This will be written. If not given, then the parameter will be read.
-l List all profiles for this camera
-r Remove profile selected with -i option
-w Write to EEPROM, the profile selected with -i option
-z Save selected profile (present in EEPROM) to host

Here '-v', '-p' and '-s' is used to selected a particular depth camera. We show below several example runs of this command to create/modify/remove and save to/read-back from hardware.

List camera profiles

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -l
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
1, Short Range (HW)
132, Test
131, No Calibration
130, High Ambient
129, Long Range
128, Short Range

Create camera profile

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -c Test2 -d 128
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Created profile with id = 133

Here a camera profile with name 'Test2' was asked to be created with parent profile ID as '128'. The ID of the newly created camera profile is '133'. The configuration file will be '~/.Voxel/conf/TintinCDKCameraTest2.conf'.

Read a configuration key-value

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 133 -t global -n id
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Param value for section = global, name = id, value = 133

Write a configuration key-value

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 133 -t test -n abc -u 123
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Successfully set parameter, section = test, name = abc, value = 123

This writes to camera profile ID '133', in section 'test', key 'abc', value '123'. To write negative valued numbers, on Windows (CMD), do

> CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 133 -t test -n abc -u '-123'
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Successfully set parameter, section = test, name = abc, value = -123

On Linux (BASH), do

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 133 -t test -n abc -u \'-123\'
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Successfully set parameter, section = test, name = abc, value = -123

Remove a camera profile

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 133 -r
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Are you sure you want to remove profile with id '133' [y/n]? y
Successfully removed camera profile '133'

Save to Hardware (EEPROM)

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 133 -w
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Profile saved to hardware with id = 1

Here software profile with ID '133' was saved to hardware with a new ID '1'. Note that profile ID '133' still exists in software and a copy of it created in hardware.

Read from Hardware

$ CameraSystemConfigTest -v 0x0451 -p 0x9105 -i 1 -z
Detected devices: 
0::0451:9105::CDK010KRY0011509718412

Successfully loaded depth camera for device 0::0451:9105::CDK010KRY0011509718412
Profile saved to host with id = 1 to file '~/.Voxel/conf/CDK010KRY0011509718412-Test2.conf'

Here the saved profile '~/.Voxel/conf/CDK010KRY0011509718412-Test2.conf', in meant for verification purposes and is not added to the list of camera profiles in the main configuration file. Thus, it cannot be referenced as a software profile unless some modifications are done to it manually. Specifically, the 'id' will still be of that allocated for hardware profiles and any referenced files (such as 'phasecorrection') need to be correctly handled.