Items with no label
3335 Discussions

Using RealSense Viewer presets in c++

CHipg
Novice
2,561 Views

Hi,

I'm wondering whether I can use the preset json files in my c++ code? I'm hoping I can just load the json file and apply it to the sensor. I don't see anything obvious in the viewer code. Is it possible?

0 Kudos
3 Replies
MartyG
Honored Contributor III
468 Views

I hope this script will help you:

CHipg
Novice
468 Views

Thanks. Here is the C++ code if anyone else is looking:

auto sensor = profile.get_device().first();

sensor.set_option(rs2_option::RS2_OPTION_VISUAL_PRESET, rs2_rs400_visual_preset::RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY);

MartyG
Honored Contributor III
468 Views

Thanks so much for sharing your code!

0 Kudos
Reply