pythonrealsense

Advanced depth visualisation Intel Realsense camera in python


I want to modify the advanced depth visualisation parameters of my Intel Realsense D405 camera in python using the pyrealsense2 library.

I am currently able to modify these parameters in the realsense-viewer application:

Realsense camera depth visualisation parameters

I am able to export this to a json file. I would assume I can import these settings in python somehow and get the depth visualisation I desire but I can´t figure it out.


Solution

  • The librealsense package has an example for using the advanced parameters, which include the advanced depth parameters you're looking for: https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/python-rs400-advanced-mode-example.py
    More specifically to your question, the object returned from rs.rs400_advanced_mode(dev) (line 28 in the example) has a load_json method which you could use to load the exported settings into your code.