Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read the depth units from intrinsics. #5106

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/l500/l500-depth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,12 @@ namespace librealsense

float l500_depth_sensor::read_znorm()
{
const int baseline_znorm = 0xa00e0b08;
auto res = _owner->_hw_monitor->send(command(ivcam2::fw_cmd::MRD, baseline_znorm, baseline_znorm + 4));
if (res.size() < 1)
auto intrin = get_intrinsic();
if (intrin.resolution.num_of_resolutions < 1)
{
throw std::runtime_error("Invalid result size!");
throw std::runtime_error("Invalid intrinsics!");
}
auto znorm = *(float*)res.data();
auto znorm = intrin.resolution.intrinsic_resolution[0].world.znorm;
return 1/znorm* MM_TO_METER;
}

Expand Down