Skip to content

L515 - Add digital gain option that replace ambient light option - #7563

Merged
maloel merged 7 commits into
realsenseai:developmentfrom
Nir-Az:add_digital_gain_option_2
Oct 19, 2020
Merged

L515 - Add digital gain option that replace ambient light option#7563
maloel merged 7 commits into
realsenseai:developmentfrom
Nir-Az:add_digital_gain_option_2

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Oct 13, 2020

Copy link
Copy Markdown
Collaborator

Original Requirement : "Rename ambient light option to digital gain"

  • Add digital gain option at same option value as ambient light

  • Add comment on LRS API option ambient light that it is deprecates

  • Replace ambient light option registration with digital gain option (same value for both) from L515 depth sensor

  • Add it to all wrappers

  • Add special case for python wrapper for dealing with 2 options with the same value

  • no ambient == high gain

Tested on:

  • RealSense Viewer
  • Python wrapper
  • C# wrapper

Tracked on [RS5-9152]

Comment thread include/librealsense2/h/rs_option.h
Comment thread include/librealsense2/h/rs_option.h Outdated
Comment thread src/algo/depth-to-rgb-calibration/optimizer.cpp Outdated
Comment thread src/algo/depth-to-rgb-calibration/optimizer.cpp Outdated
Comment thread src/l500/ac-trigger.cpp Outdated
Comment thread src/l500/ac-trigger.cpp Outdated
Comment thread src/l500/l500-options.cpp Outdated
{ float(RS2_AMBIENT_LIGHT_LOW_AMBIENT), "Low Ambient" }}));
(RS2_OPTION_VISUAL_PRESET, std::make_shared<uvc_xu_option<int >>(raw_depth_sensor, ivcam2::depth_xu, ivcam2::L500_DIGITAL_GAIN,
"Change the depth digital gain to: 1 for high gain and 2 for low gain",
std::map<float, std::string>{ { float(RS2_DIGITAL_GAIN_HIGH_GAIN), "High Gain"},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting... it doesn't take the string representation from the get_string() functions?

@Nir-Az Nir-Az Oct 18, 2020

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was implemented this way with ambient light so I kept it.
If I remove the map the viewer will display it as a slider (we don't want it), the strings map makes the viewer display it as a combo box.

Comment thread src/l500/l500-options.cpp Outdated
{ RS2_AMBIENT_LIGHT_LOW_AMBIENT, "Low Ambient" }});
_digital_gain = register_option<uvc_xu_option<int>, uvc_sensor&, platform::extension_unit, uint8_t, std::string, const std::map<float, std::string>& >
(RS2_OPTION_DIGITAL_GAIN, raw_depth_sensor, ivcam2::depth_xu, ivcam2::L500_DIGITAL_GAIN,
"Change the depth digital gain to values: 1 for high gain and 2 for low gain",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to values: -> to:

Comment thread src/l500/l500-private.h
Comment thread src/rs.cpp Outdated
const char* rs2_calibration_type_to_string(rs2_calibration_type type) { return get_string(type); }
const char* rs2_calibration_status_to_string(rs2_calibration_status status) { return get_string(status); }
const char* rs2_host_perf_mode_to_string(rs2_host_perf_mode mode) { return get_string(mode); }
const char* rs2_digital_gain_to_string(rs2_digital_gain gain) { return get_string(gain); }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to right after the rs2_ambient_light?

Comment thread src/types.h Outdated
RS2_ENUM_HELPERS_CUSTOMIZED(rs2_ambient_light, RS2_AMBIENT_LIGHT_NO_AMBIENT, RS2_AMBIENT_LIGHT_LOW_AMBIENT)
RS2_ENUM_HELPERS(rs2_cah_trigger, CAH_TRIGGER)
RS2_ENUM_HELPERS(rs2_host_perf_mode, HOST_PERF)
RS2_ENUM_HELPERS_CUSTOMIZED(rs2_digital_gain, RS2_DIGITAL_GAIN_HIGH_GAIN, RS2_DIGITAL_GAIN_LOW_GAIN)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move right after rs2_ambient_light

Comment thread wrappers/csharp/Intel.RealSense/Types/Enums/Option.cs
Comment thread wrappers/matlab/option.m
Comment thread wrappers/nodejs/src/addon.cpp
@Nir-Az
Nir-Az force-pushed the add_digital_gain_option_2 branch from 22312bd to 5d34d85 Compare October 18, 2020 18:55
Comment thread wrappers/unrealengine4/Plugins/RealSense/Source/RealSense/Public/RealSenseTypes.h Outdated
@maloel
maloel merged commit b5d6f7f into realsenseai:development Oct 19, 2020
@Nir-Az
Nir-Az deleted the add_digital_gain_option_2 branch December 23, 2020 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants