-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Pointcloud: comparing deprojected points vs points.get_vertices() #4315
Comments
Hi @grigala |
Hi @dorodnic, Thanks very much for your suggestion, sounds like that could indeed be the problem. I'm gonna give it a try tomorrow. Are those two approaches you suggested identical? Ignoring |
Almost identical, yes. Alignment will introduce small differences because aligned image is resampled from the original (so these are not exactly the same points). |
Hi @dorodnic, Thanks, it helped to pass all my tests. However, the reason I was running those tests in the first place was to understand why my deprojected points are getting shifted - they are not where they should be. I still couldn't wrap my head around what could be causing this issue. I'm obtaining pixel landmarks, deprojecting them to points and when visualizing them together with point cloud mesh the landmark points are shifted( The only thing that came to my mind was to manually add some fixed values to the positive axis of Any thoughts what could be wrong? Thanks in advance, appreciate your follow up. |
Could this be an issue of aligning frames to color stream?
|
@ev-mp Thanks for reply. Yes, I come to the same conclusion just by analyzing two different point clouds, one produced by pipeline with stream aligned to color frame and the other aligned to depth frame. The only disadvantage is that color image generated after aligning stream to depth frame gets black pixels(depth info missing) on the image. Which might not be desirable for some applications. |
Comparing
rs.rs2_deproject_pixel_to_point()
andpoints.get_vertices()
I'm trying to understand what is the difference (and most importantly where does it come from) between a point which is produced by
rs.rs2_deproject_pixel_to_point()
and the one obtained from the point cloud generated by callpoints.get_vertices()
.TLDR;
x
coordinates are slightly off almost always ✘y
coordinates are slightly off almost always ✘z
coordinates are always the same ✓by saying almost always I mean that there were cases when, if I round up values to 2 decimals I might get the same coordinates but not always. Whereas
z
value is exactly the same up until 7 decimals.ACTUAL OUTPUT(See the example code bellow):
Can anybody tell me where does this difference might be coming from? I tried to find the exact implementation how SDK(C++) obtains point cloud points to examine and compare what I'm doing wrong but I couldn't find one.
Code
Both
projected_pts
andsdk_pts
list are filled up the same wayexport_to_ply()
method fills vertices list:librealsense/include/librealsense2/hpp/rs_export.hpp
Lines 64 to 71 in d6f6be8
The text was updated successfully, but these errors were encountered: