How to get/set config value with user code?

Hi Tsuka,

Its not really documented anywhere - much like most of the option settings sadly.
But the values are a set of dotted paths based on the elements in nuitrack.config

So for example to change the ProcessWidth - go into the nuitrack.config - find the element you want … and work out its path:

=================================
Realsense2Module”: {
Depth”: {
“ProcessMaxDepth”: 4000,
ProcessWidth”: 640,
“ProcessHeight”: 480,
“Preset”: 5,

which is Realsense2Module then Depth then ProcessWidth
that becomes Realsense2Module.Depth.ProcessWidth

Which you then call.

Nuitrack::setConfigValue(“Realsense2Module.Depth.ProcessWidth”, “320” );

A NOTE HOWEVER - you cant make many of these changes while the system is running.

Best option that we have found is to make changes just after nuitrack:init(); runs successfully that way the default values from nuitrack.config are all setup correctly first.

Then you can override any settings you need to change.

Then call DepthSensor::create();

Cheers

Westa

1 Like