Skip to content

Added depth_frame::get_units() - #5996

Merged
dorodnic merged 4 commits into
realsenseai:developmentfrom
maloel:get_units
Mar 10, 2020
Merged

Added depth_frame::get_units()#5996
dorodnic merged 4 commits into
realsenseai:developmentfrom
maloel:get_units

Conversation

@maloel

@maloel maloel commented Mar 9, 2020

Copy link
Copy Markdown
Contributor
  • With C#, Python, Android wrappers

maloel added 4 commits March 9, 2020 10:28
* Returns depth, in meters, per 1 unit stored in the frame data
* Function already existed inside the sensor API (depth_sensor::get_depth_scale) & at the bottom of the hourglass (depth_frame::get_unit), but wasn't exposed at the top
* Added a corresponding C fn (rs2_depth_frame_get_units)
* Updated CV examples' depth_frame_to_meters() so it no longer needs to get the pipeline
@maloel
maloel requested a review from ev-mp March 9, 2020 08:30
// Convert RealSense frame to OpenCV matrix:
auto color_mat = frame_to_mat(color_frame);
auto depth_mat = depth_frame_to_meters(pipe, depth_frame);
auto depth_mat = depth_frame_to_meters(depth_frame);

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.

Is this the only place where that function is called?

@ev-mp ev-mp left a comment

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.

Looks good.
Do you have DSO number for tracking ?

@dorodnic
dorodnic merged commit c5a73e1 into realsenseai:development Mar 10, 2020
@maloel
maloel deleted the get_units branch March 25, 2021 14: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.

3 participants