• Home
  • About Me
  • Projects
  • Publications
  • Posts

Intel Realsense D435i settings - 2: better depth

04 Nov 2020

Reading time : 3 minutes

To get better Depth for Exploration of UAV

Conclusion : Use Presets!!! unless under static, fixed scene situation.

Also use Post-Processing!!!

  • Almost of the contents from the guides are trying to tune the lots of parameters based on the scene-dependent situations.
  • Referred from here and here2
  • Official Tuning Guides Read through followings
    • Tuning depth cameras for best performance
    • Depth Post-Processing for Intel® RealSense™ Depth Camera D400 Series
    • D400 Series Visual Presets


● Result

Left: Default, Right: Default with post-processing
Left: High Accuracy, Right: High Accuracy with post-processing
Left: Default, Right: High Accuracy with post-processing


● Tuning depth cameras for best performance

  • 848x480 resolution is recommended for D435 at 30fps.
  • Increasing the gain tends to introduce electronic noise, Keep gain as low as possible (preferably 16).


● D400 Series Visual Presets

  • The “High Accuracy” preset will impose stricter criteria, and will only provide those depth values that are generated with very high confidence.
    • This will give a less dense depth map in general but is very good for autonomous robots where false depth are much worse than no depth.
  • Download the presets from here
  • Save the presets in realsense-viewer within SDK. Set the json file from custom or default to HighAccuracy and set other parameters you want, and the export that .json file.
  • Place the preset .json file in the .launch
  <arg name="json_file_path"      value="file_directory_and_name.json"/>


● Use Post-Processing filters with ROS package

  • Post-processings can be set using args in the launch file. filters can be checked here
    • Supported filters: colorizer, disparity, spatial, temporal, hole_filling, decimation, pointcloud
    • Note that decimation filter makes depth image downsampled, which results in changed focal length and principal points of intrinsic calibration.
    <!--arg name="filters" value="pointcloud,disparity,spatial,temporal,decimation"/-->
    <arg name="filters" value="pointcloud,disparity,spatial,temporal"/>


● Filter and .json file with emitter off

  • Download emitter off.json
    • infra camera at 30 fps, 640x480
  • Download Mid resolution with High accuracy and emitter off.json
    • infra camera at 30 fps, 640x480
    • or simply copy-paste below:
{
    "aux-param-autoexposure-setpoint": "1536",
    "aux-param-colorcorrection1": "0.298828",
    "aux-param-colorcorrection10": "-0",
    "aux-param-colorcorrection11": "-0",
    "aux-param-colorcorrection12": "-0",
    "aux-param-colorcorrection2": "0.293945",
    "aux-param-colorcorrection3": "0.293945",
    "aux-param-colorcorrection4": "0.114258",
    "aux-param-colorcorrection5": "-0",
    "aux-param-colorcorrection6": "-0",
    "aux-param-colorcorrection7": "-0",
    "aux-param-colorcorrection8": "-0",
    "aux-param-colorcorrection9": "-0",
    "aux-param-depthclampmax": "65536",
    "aux-param-depthclampmin": "0",
    "aux-param-disparityshift": "0",
    "controls-autoexposure-auto": "True",
    "controls-autoexposure-manual": "8500",
    "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-laserpower": "150",
    "controls-laserstate": "off",
    "ignoreSAD": "0",
    "param-amplitude-factor": "0",
    "param-autoexposure-setpoint": "1536",
    "param-censusenablereg-udiameter": "6",
    "param-censusenablereg-vdiameter": "7",
    "param-censususize": "6",
    "param-censusvsize": "7",
    "param-depthclampmax": "65536",
    "param-depthclampmin": "0",
    "param-depthunits": "1000",
    "param-disableraucolor": "0",
    "param-disablesadcolor": "0",
    "param-disablesadnormalize": "0",
    "param-disablesloleftcolor": "0",
    "param-disableslorightcolor": "1",
    "param-disparitymode": "0",
    "param-disparityshift": "0",
    "param-lambdaad": "751",
    "param-lambdacensus": "6",
    "param-leftrightthreshold": "10",
    "param-maxscorethreshb": "2893",
    "param-medianthreshold": "796",
    "param-minscorethresha": "4",
    "param-neighborthresh": "108",
    "param-raumine": "6",
    "param-rauminn": "3",
    "param-rauminnssum": "7",
    "param-raumins": "2",
    "param-rauminw": "2",
    "param-rauminwesum": "12",
    "param-regioncolorthresholdb": "0.785714",
    "param-regioncolorthresholdg": "0.565558",
    "param-regioncolorthresholdr": "0.985323",
    "param-regionshrinku": "3",
    "param-regionshrinkv": "0",
    "param-robbinsmonrodecrement": "25",
    "param-robbinsmonroincrement": "2",
    "param-rsmdiffthreshold": "1.65625",
    "param-rsmrauslodiffthreshold": "0.71875",
    "param-rsmremovethreshold": "0.809524",
    "param-scanlineedgetaub": "13",
    "param-scanlineedgetaug": "15",
    "param-scanlineedgetaur": "30",
    "param-scanlinep1": "155",
    "param-scanlinep1onediscon": "160",
    "param-scanlinep1twodiscon": "59",
    "param-scanlinep2": "190",
    "param-scanlinep2onediscon": "507",
    "param-scanlinep2twodiscon": "493",
    "param-secondpeakdelta": "647",
    "param-texturecountthresh": "0",
    "param-texturedifferencethresh": "1722",
    "param-usersm": "1",
    "param-zunits": "1000",
    "stream-depth-format": "Z16",
    "stream-fps": "30",
    "stream-height": "480",
    "stream-ir-format": "R8L8",
    "stream-width": "640"
}