- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to alter the depth control parameters of the R435 camera using the visual presets. I've found a way to load presets from a Json file in advanced mode: https://github.com/IntelRealSense/librealsense/blob/master/doc/rs400/rs400_advanced_mode.md https://github.com/IntelRealSense/librealsense/blob/master/doc/rs400/rs400_advanced_mode.md.
However, the .Net wrapper (I'm using .Net) has a type Rs400VisualPresets which contains all of the presets found in the viewer.
The Json approach seems a little involved, is there a simpler method which uses the enums in the wrapper?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep, you can use one of the presets like so:
PipelineProfile profile = pipeline.Start(cfg);
var depthSensor = profile.Device.QuerySensors()[0];
if (depthSensor.Options[Option.VisualPreset].Supported)
depthSensor.Options[Option.VisualPreset].Value = Rs400VisualPreset.HighDensity;
I think that the list of presets might not be finalised though; I read in the comments of one of the samples that they might change. Keep an eye on it when new versions come out!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Visual Presets guide says that as an alternative to using a JSON file, "the user can also modify the settings via the Advanced Mode menu and save a customized user preset."
https://github.com/IntelRealSense/librealsense/wiki/D400-Series-Visual-Presets D400 Series Visual Presets · IntelRealSense/librealsense Wiki · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep, you can use one of the presets like so:
PipelineProfile profile = pipeline.Start(cfg);
var depthSensor = profile.Device.QuerySensors()[0];
if (depthSensor.Options[Option.VisualPreset].Supported)
depthSensor.Options[Option.VisualPreset].Value = Rs400VisualPreset.HighDensity;
I think that the list of presets might not be finalised though; I read in the comments of one of the samples that they might change. Keep an eye on it when new versions come out!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great stuff,
This works great thanks, only one very minor change to the code in case someone else wants to use it.
The Enum needs casting to a float as below.
depthSensor.Options[Option.VisualPreset].Value = (float)Rs400VisualPreset.HighDensity;
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page