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

Added support for rgb metadata #3791

Merged
merged 3 commits into from
Apr 21, 2019
Merged

Conversation

aangerma
Copy link
Contributor

@aangerma aangerma commented Apr 18, 2019

Spitted l500-depth class to l500-device and l500-depth.
Added support for rgb metadata
Tracked On: RS5-2343


auto intrinsic = (intrinsic_rgb*)(res.data());

auto model = intrinsic->resolution.intrinsicResolution[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add mapping between the requested profile and the table's entry

return {};
using namespace ivcam2;

auto res = *_owner->_color_intrinsics_table_raw;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Employ the embedded template for the table validation
auto table = check_calib<TBD_table>(*_TBD_table_raw);

command cmd_fy(0x01, 0xa00e080c, 0xa00e0810);
command cmd_cx(0x01, 0xa00e0814, 0xa00e0818);
command cmd_cy(0x01, 0xa00e0818, 0xa00e081c);
auto fx = _hw_monitor->send(cmd_fx); // CBUFspare_000
Copy link
Collaborator

Choose a reason for hiding this comment

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

What happens if the cal throws ? wrapping with try/catch or some other preventive measure is needed


if (res.size() < sizeof(float) * 4)
if (res.size() < sizeof(intrinsic_depth))
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same as with RGB intrinsic above

throw invalid_value_exception("size of calibration invalid");

auto intrinsic = (intrinsic_depth*)(res.data());

auto model = intrinsic->resolution.intrinsicResolution[0].world.pinhole_cam_model;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Depth does has multiple resolutions. How is this translated to intrinsicResolution[0].world.pinhole_cam_model

auto res = *((pose*)raw_data.data());
float trans_scale = 0.001f;

if (res.position.x > 0.f) // Extrinsic of color is referenced to the Depth Sensor CS
Copy link
Collaborator

Choose a reason for hiding this comment

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

This heuristic will work for D400 only

@@ -28,8 +28,11 @@ namespace librealsense
GVD = 0x10,
GLD = 0x0f,
DPT_INTRINSICS_GET = 0x5A,
DPT_INTRINSICS_FULL_GET = 0x7F,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make the list ordered to prevent/highlight duplicates

@@ -72,6 +75,87 @@ namespace librealsense
{ DFU_error, "DFU error" },
};

typedef struct pinhole_model
{
float2 focalLength;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please switch to unified code style

@@ -72,6 +75,87 @@ namespace librealsense
{ DFU_error, "DFU error" },
};

typedef struct pinhole_model
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pls verify whether those type require #pragma pack(ing) for parsing

uint16_t reserved16;
uint8_t reserved8;
uint8_t numOfResolutions;
pinhole_camera_model intrinsicResolution[1]; //Dynamic number of entries according to numOfResolutions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Provision for 5 resolutions

@aangerma aangerma force-pushed the development branch 3 times, most recently from 447f0fb to 8a901c2 Compare April 20, 2019 20:05
ev-mp added 2 commits April 21, 2019 11:15
This is required as a back-compatibility measure, as well as Android/Mac bypass.
The drawback -The enum flow that is dependent on HID activation latency will not commit,
 resulting in partial functionality only. Will be added to known-issues

Change-Id: Ib8c546741eedb37a040c7ba0d7a79bf804c4dfdc
Signed-off-by: Evgeni Raikhel <[email protected]>
Change-Id: Iae982b95509a65a5d1b0057728c45209c0c15d3e
Signed-off-by: Evgeni Raikhel <[email protected]>
@ev-mp ev-mp merged commit a31c049 into IntelRealSense:development Apr 21, 2019
@ev-mp ev-mp changed the title Added support on depth and rgb intrinsics and extrinsics Added support for rgb metadata Apr 21, 2019
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