how can i load Json file or enable post processing (Hole filling) by writing in my code ?
Hi I use D435 , c++ as a programing language. how can i enable post processing (Hole filling) in my code (manually by writing )? or when i save the configuration of post processing (Hole filling) from RealSense Viewer as JSON file , how can i load this file in the code ?
Thank you

post-processing We don't have an example for loading JSON, but you could do it like this:
rs2::pipeline p;
auto prof = p.start();
rs2::device dev = prof.get_device();
auto advanced = dev.as<advanced_mode>();
advanced.load_json(str);
You could also apply one of the standard presets by setting VISUAL_PRESET option on the depth sensor.
i tried what you wrote :
rs2::pipeline p; auto prof = p.start(); rs2::device dev = prof.get_device(); auto advanced = dev.as<advanced_mode>(); advanced.load_json(str);
but the compiler can not identify "advanced_mode" in (auto advanced = dev.as<advanced_mode>();).
i use ralsense D435 and C++ and i included (rs_advanced_mode.hpp)
thank you
For hole filling, look up:
rs2::hole_filling_filter holeFilter;
...
...
data = pipe->wait_for_frames().apply_filter(holeFilter);
@Medo91code
You might need using namespace rs2;
@dorodnic
You might need using namespace rs2;
i used it , but nothing happens ( dev.as<advanced_mode>(); still doesn't work).
@HippoEug
data = pipe->wait_for_frames().apply_filter(holeFilter);
it works but how can i add to it the choice (fill from left)?
That I do not know, maybe @dorodnic can give some insights 👍
For advanced mode, you need namespace rs400 - rs_advanced_mode.hpp:10
Please review the linked post-processing example to learn how to configure filter settings.
[Please Ignore - RealSense system comment]
[Please Ignore - RealSense system comment]
[Please Ignore - RealSense system comment]