1 Reply Latest reply on May 31, 2018 4:41 PM by MartyG

    How to properly configure the D4XX series in Cpp via JSON

    mcutter

      I am trying to configure my device with a json file created in realsense-viewer.

       

      However, after initializing the camera the stream fps runs at 30 instead of 6 as configured. Is there something I am doing incorrectly or is this expected behavior? Do I need to restart the pipeline?

       

       

      -  _pipe.start();
      -  _profile = _pipe.get_active_profile();
      -  std::ifstream t("/home/internetUser/config/customRealsenseConfig.json");
      -  std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator
      <char>());
      -  rs400::advanced_mode dev = _profile.get_device();
      -  dev.load_json(str);
      

       

       

      Here is the json file contents. Note stream fps is set to 6.

      {
          "aux-param-autoexposure-setpoint": "400",
          "aux-param-colorcorrection1": "0.461914",
          "aux-param-colorcorrection10": "-0.553711",
          "aux-param-colorcorrection11": "-0.553711",
          "aux-param-colorcorrection12": "0.0458984",
          "aux-param-colorcorrection2": "0.540039",
          "aux-param-colorcorrection3": "0.540039",
          "aux-param-colorcorrection4": "0.208008",
          "aux-param-colorcorrection5": "-0.332031",
          "aux-param-colorcorrection6": "-0.212891",
          "aux-param-colorcorrection7": "-0.212891",
          "aux-param-colorcorrection8": "0.68457",
          "aux-param-colorcorrection9": "0.930664",
          "aux-param-depthclampmax": "65536",
          "aux-param-depthclampmin": "0",
          "aux-param-disparityshift": "0",
          "controls-autoexposure-auto": "True",
          "controls-autoexposure-manual": "33000",
          "controls-color-autoexposure-auto": "True",
          "controls-color-autoexposure-manual": "166",
          "controls-color-backlight-compensation": "0",
          "controls-color-brightness": "0",
          "controls-color-contrast": "50",
          "controls-color-gain": "64",
          "controls-color-gamma": "300",
          "controls-color-hue": "0",
          "controls-color-power-line-frequency": "3",
          "controls-color-saturation": "64",
          "controls-color-sharpness": "50",
          "controls-color-white-balance-auto": "True",
          "controls-color-white-balance-manual": "4600",
          "controls-depth-gain": "16",
          "controls-depth-white-balance-auto": "False",
          "controls-laserpower": "150",
          "controls-laserstate": "off",
          "ignoreSAD": "0",
          "param-autoexposure-setpoint": "400",
          "param-censusenablereg-udiameter": "8",
          "param-censusenablereg-vdiameter": "9",
          "param-censususize": "8",
          "param-censusvsize": "9",
          "param-depthclampmax": "65536",
          "param-depthclampmin": "0",
          "param-depthunits": "1000",
          "param-disableraucolor": "0",
          "param-disablesadcolor": "0",
          "param-disablesadnormalize": "0",
          "param-disablesloleftcolor": "0",
          "param-disableslorightcolor": "0",
          "param-disparitymode": "0",
          "param-disparityshift": "0",
          "param-lambdaad": "74",
          "param-lambdacensus": "26",
          "param-leftrightthreshold": "28",
          "param-maxscorethreshb": "1890",
          "param-medianthreshold": "871",
          "param-minscorethresha": "70",
          "param-neighborthresh": "113",
          "param-raumine": "1",
          "param-rauminn": "1",
          "param-rauminnssum": "5",
          "param-raumins": "3",
          "param-rauminw": "7",
          "param-rauminwesum": "7",
          "param-regioncolorthresholdb": "0.0225049",
          "param-regioncolorthresholdg": "0.290607",
          "param-regioncolorthresholdr": "0.092955",
          "param-regionshrinku": "4",
          "param-regionshrinkv": "0",
          "param-robbinsmonrodecrement": "1",
          "param-robbinsmonroincrement": "1",
          "param-rsmdiffthreshold": "5.21875",
          "param-rsmrauslodiffthreshold": "0.71875",
          "param-rsmremovethreshold": "0.511905",
          "param-scanlineedgetaub": "72",
          "param-scanlineedgetaug": "72",
          "param-scanlineedgetaur": "72",
          "param-scanlinep1": "176",
          "param-scanlinep1onediscon": "196",
          "param-scanlinep1twodiscon": "36",
          "param-scanlinep2": "414",
          "param-scanlinep2onediscon": "96",
          "param-scanlinep2twodiscon": "57",
          "param-secondpeakdelta": "310",
          "param-texturecountthresh": "8",
          "param-texturedifferencethresh": "0",
          "param-usersm": "1",
          "param-zunits": "1000",
          "stream-depth-format": "Z16",
          "stream-fps": "6",
          "stream-height": "240",
          "stream-ir-format": "Y8",
          "stream-width": "424"
      }