AN19-Vzense ToF camera parameter configuration method

Written By:Sophia.feng Updated: 2024-11-11

During operation, the camera offers many adjustable parameters such as frame rate, exposure time, image filtering switch, etc. Different application scenarios have different requirements for these working parameters, and users can freely set them according to their needs. To facilitate user debugging and usage, Vzense cameras have developed and designed two methods to help users preset the camera’s working parameters. This article introduces how Vzense’s ToF cameras generate parameter configuration files (.json files) and the methods for setting camera parameters.

Parameter setting methods

The camera stores factory default parameters internally. Upon powering on, the camera reads these internal parameters and applies them. After the SDK connects to the camera, the API controls whether to set other parameters. If no parameters are set, the camera runs with the default parameters. If parameters are set, they will dynamically alter the camera’s operating parameters but will not change the camera’s internal default parameters, meaning the changes will not be saved after power off. The default parameter setting methods are divided into software settings and hardware settings.
Software setting method: This method involves reading the configuration file through the SDK to dynamically set parameter values in real-time. The camera will immediately apply the changes without altering the default camera parameters. The changes are not saved when the camera is powered off and this needs to be performed once every time the device is powered on.
Hardware setting method: This method uses ScepterGUITool to import the configuration file into the camera device, which changes the default parameters of the camera. The changes are saved when the camera is powered off and take effect after a restart.
Note: Some camera models do not support the hardware setting method. Please contact FAE to confirm whether a specific model supports this method.

Generating configuration file

Use the ScepterGUITool to open the camera. Adjust the corresponding camera parameters in the tool according to the usage scenario. After completing the adjustments, click “Generate” to create the configuration file. A success message will appear, and the configuration file will be saved in the JsonConfig folder with the naming format “CameraType_Year_Month_Day_Hour_Minute_Second_SN.json“. You can click the link to navigate to the generated file. As shown in the diagram below:

Software configuration method

1. Using ScepterGUITool: The current operation sets parameters without changing the internal parameters of the camera device, and they are not saved after power-off.
When the camera is powered off and restarted, use ScepterGUITool to open the camera. At this point, the camera working parameters displayed by the ScepterGUITool will be the camera’s default settings. After clicking “ApplyByApp” and selecting the previously generated configuration file, once the import is successful, the current working parameters will be set to match the configuration file. However, after restarting and reconnecting, the configuration file parameters will not take effect. As shown in the diagram below:

2. Use the Scepter SDK to setting the camera parameter
Sample code:
BaseSDK/Windows/Samples/Base/DS86/DeviceSetParamsByJson.
The API interface is as follows:

//Set the parameters by Json file that can be saved by ScepterGUITool. The camera does not save parameters  after power off
ScStatus scSetParamsByJson(ScDeviceHandle device, char* pfilePath);

Hardware configuration method

1. Using ScepterGUITool: The current operation modifies the internal parameters of the camera device, and the settings will be saved even after power is turned off.
Use the ScepterGUITool tool to open the camera. Click “ImportToDevice” and select the configuration file. After once the import is successful, a restart is required for the settings to take effect. Upon reconnection after rebooting, the parameters of the configuration file will automatically take effect, as shown in the diagram below:

2. Use the Scepter SDK to setting the camera parameter
Sample code:
BaseSDK/Windows/Samples/Base/DS86/DeviceImportParamInitFile.
The API interface is as follows:

//Save the parameter settings to the camera's internal parameters, which will remain effective even after power off and restart.
ScStatus scImportParamInitFile(ScDeviceHandle device, char* pfilePath);

Restore parameters to factory settings

1. Using ScepterGUITool: The current operation will restore the camera’s internal parameters to the factory default settings.
Use the ScepterGUITool tool to open the camera. After clicking “RestoreDevice“, the operation will be successfully executed, the camera will reboot, and the parameters will be updated to the default settings. As shown in the figure below:

2. Use the Scepter SDK to restore the camera parameter
The API interface is as follows:

//Restore the parameter initialization file of the device.
ScStatus scRestoreParamInitFile(ScDeviceHandle device);

Related Posts

How can we support you?

We will be happy to advise you on product selection and find the right solution for your application.

Contact Now