Skip to content

Update live minz example - #15069

Merged
Nir-Az merged 1 commit into
realsenseai:developmentfrom
ashrafk93:ashraf/depth-unit
May 18, 2026
Merged

Nir-Az merged 1 commit into
realsenseai:developmentfrom
ashrafk93:ashraf/depth-unit

Conversation

@ashrafk93

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI 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.

Pull request overview

Updates the live MinZ comparison example to query the device's depth scale and convert the raw Z16 depth frame to true millimetres before feeding it to the improver and the colorizer, so the example works correctly on cameras that don't use the default 1 mm/unit scaling.

Changes:

  • Reads RS2_OPTION_DEPTH_UNITS via first_depth_sensor().get_depth_scale() (with a 0.001 fallback) and prints it.
  • Scales the raw depth array by depth_scale * 1000.0 and casts back to uint16 so downstream code keeps treating values as millimetres.

@ashrafk93
ashrafk93 force-pushed the ashraf/depth-unit branch from 47f30bc to b80a7b1 Compare May 18, 2026 10:47
@Nir-Az
Nir-Az merged commit 9e6aa43 into realsenseai:development May 18, 2026
29 of 30 checks passed
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