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

Aligned Point Cloud possibly still utilizing wrong intrinsics #3752

Closed
joki123 opened this issue Apr 12, 2019 · 8 comments
Closed

Aligned Point Cloud possibly still utilizing wrong intrinsics #3752

joki123 opened this issue Apr 12, 2019 · 8 comments

Comments

@joki123
Copy link

joki123 commented Apr 12, 2019

I'm opening a new issue because issue #2002 was closed out. I'm running the following code:

rs2::pipeline_profile profile = pipe.start();
float depth_scale = get_depth_scale(profile.get_device());
rs2_stream align_to = find_stream_to_align(profile.get_streams());
rs2::align align(align_to);

for (auto i = 0; i < 30; ++i) {
pipe.wait_for_frames();
}

auto processed = align.process(pipe.wait_for_frames());
rs2::video_frame rgb_vf = processed.first(align_to);
rs2::depth_frame raw_df = processed.get_depth_frame();

rs2::pointcloud pc;
rs2::points points;
pc.map_to(rgb_vf);
points = pc.calculate(raw_df);
points.export_to_ply("test.ply", rgb_vf);

I received some assistance from Sergey Dorodnicov and we established that not aligned (raw, or original sized) pointclouds can be generated just fine and that the resulting pointclouds from running the code above definitely appear to be misaligned.

Are aligned point clouds using wrong intrinsics? If not, is it possible the alignment code might not be working properly? Note: alignment code above is taken from SDK examples.

@joki123
Copy link
Author

joki123 commented Apr 13, 2019

Confirming that I can generate a valid point cloud from aligned data so it appears the point cloud generation code is not utilizing the right intrinsic information.

ev-mp pushed a commit to ev-mp/librealsense that referenced this issue Apr 13, 2019
@ev-mp
Copy link
Collaborator

ev-mp commented Apr 14, 2019

@joki123 hello and thank you for the report and the additional info.
We're looking into it and it seem indeed that there is a potential extrinsic issue with the aligned stream.
We'll keep you updated.

ev-mp pushed a commit to ev-mp/librealsense that referenced this issue Apr 14, 2019
ev-mp added a commit to ev-mp/librealsense that referenced this issue Apr 15, 2019
- The alignment must update the extrinsic of the new profile.
- the alignment shall filter inputs and avoid non-video frames passed on, otherwise the blocks fails with exception
This addresses IntelRealSense#3752
Tracked on: DSO-12515

Change-Id: I189a77710733245cd13644807420830b0d9bc432
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
@ev-mp
Copy link
Collaborator

ev-mp commented Apr 15, 2019

@joki123 , there is a fix PR being evaluated that should address the offset in pointcloud mapping from aligned depth.
Visually, the changes are subtle so I suppose it will require a controlled environment to measure the improvement
You can try it from here

@ev-mp
Copy link
Collaborator

ev-mp commented May 1, 2019

@joki123 , the fix was merged into the recently released v2.21.0. Do you still observe discrepancies with that version ? Please update

@joki123
Copy link
Author

joki123 commented May 1, 2019 via email

@RealSenseCustomerSupport
Copy link
Collaborator


Hi @joki123,
Do you have a chance to check out v2.21.0?

@joki123
Copy link
Author

joki123 commented May 15, 2019 via email

@RealSenseCustomerSupport
Copy link
Collaborator


Hi joki123,

Thanks for the updates. Glad to hear that you have already addressed the issue.
Closing this one.

Thanks!

@ev-mp ev-mp closed this as completed May 22, 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

No branches or pull requests

3 participants