-
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
Saving a colorful pointcloud using sofware-device #10412
Comments
hI @ilyak93 When OPTION_PLY_BINARY is set to 0 / false, it exports the ply as ASCII text characters, as described in the save_to_ply documentation at #4906 So can you try using false / true instead of 0 / 1 and setting OPTION_PLY_BINARY to true to see whether it results in the export of a colored cloud, please?
|
@MartyG-RealSense, nope, that didn't changed the result, the texcoords are still all (0,0), same behavior. Do you maybe where in the file system I can look at the implementation of Or even maybe instructions to linking the library without installing it, so I can debug it and see where is the problem. |
@MartyG-RealSense,
|
That's great to hear! I was just going to show you that old case at #900 that was experiencing (0,0) texcoords. A RealSense user in that case found in #900 (comment) that calling pc.calculate(depth) twice worked for them. I'm very pleased that you were able to develop your own solution! |
@MartyG-RealSense, actually the same solution worked for me, forgot to mention that the whole working code looks like:
So the second calculation gives the proper colorful pointcloud. |
I'm creating a software-device in the following way:
and while looping over the frames:
I'm trying to save the pointcloud in a ply format.
I try both methods: using
points.export_to_ply
(many people wrote here in issues that it worked for them (probably on live streaming and not software-device)) and the method suggested on issue #6677 (by making it public and accessible inrs_export.hpp
).In both I get one gray color for all the points. Further I found that:
I debugged the function
export_to_ply
of the objectrs2::save_to_ply
and found thattexcoords[i]
for eachi
(all the points) are all set to 0 (thecout << "here"
loop is my code injected into real sensers_export.hpp
, which why probably I get only one color (the color of(u=0,v=0)
), which means my pointcloud somehow doesn't know what is his texture coordinates. Maybe it is somehow connected to the fact it is software-device, some data maybe lost, I think the implementation of this functionrs2::points points = pc.calculate(depth_frame2);
(calculate) should give the answers if you can look around it.That's the whole peace of code above in two images) from
rs_export.hpp
@MartyG-RealSense, that's the new issue from the #6677 discussion.
I've updated my SDK to the latest version my alignment code works, which is 2.48.0.
After that the alignment just gives black image (aligning depth to color) and both methods write 0 points, such that the
calculate
function doesn't creates any points.The alignment which also kind of an assurance I'm not breaking the basic functionality of software-device and it's intrinsics/extrinsics registration. The alignment works fine while I cant get the ply of a colorful pointcloud.
Thank you in advance.
The text was updated successfully, but these errors were encountered: