librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

changing persistency mode in C++

Open EmmanuelCos opened this issue 7 years ago • 1 comments


Required Info
Camera Model D435
Language C++

Hello,

I would like to know how we can change the persistency mode of the temporal filter, within the code in C++?

Thank you and regards,

Emmanuel

EmmanuelCos avatar Apr 15 '19 13:04 EmmanuelCos

@EmmanuelCos hello, Selecting persistence mode is done via RS2_OPTION_HOLES_FILL, for example here

    ...
    rs2::temporal_filter    temp_filter;
   ...
    int PersistenceMode = [0..];
   
    // Set new mode
   temp_filter.set_option(RS2_OPTION_HOLES_FILL,  float(PersistenceMode));

  // Get the human-readable description of the selected persistence mode
  auto descr =  temp_filter.get_option_value_description(RS2_OPTION_HOLES_FILL,PersistenceMode)

Check the documentation for the full range of supported values.

ev-mp avatar Apr 15 '19 21:04 ev-mp