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

Saving the point cloud to a .ply file using the Python wrapper #862

Closed
felix-tracxpoint opened this issue Nov 29, 2017 · 6 comments
Closed

Comments

@felix-tracxpoint
Copy link

Required Info
Camera Model D400
Firmware Version SDK 2.0
Operating System & Version Windows 10
Kernel Version (Linux Only)

I would like to save the point clouds to .ply files using the Python wrapper of the SDK, in the same way that I can save .ply files from the SDK's GUI. But I am unable to find documentation explaining how to achieve this. All I found is the following line:

points = pc.calculate(depth_frame)

But what sort of object is 'points'? What methods can one call for it? Where can I read about it?

Thanks in advance!

@dorodnic
Copy link
Contributor

Hi @felix-tracxpoint
At the moment PLY conversion is not part of the core SDK but only the UI.
We will consider adding it to the API (making it available to all the wrappers) in one of the future releases.
For now, the PLY format is rather simple, and you can use the following code as reference:
model-views.cpp:199-289

@felix-tracxpoint
Copy link
Author

Is there some other format I can export to, without implementing the whole thing by myself?

Thanks!

@dorodnic
Copy link
Contributor

There is no export functionality at the moment. If all you need is to serialize the data to save it for later use, you might want to check SDK recording capabilities. However, ros-bag format is fairly proprietary and will not help you export the 3D model into 3rd party software.

@dorodnic
Copy link
Contributor

You can now save MeshLab-compatible PLY files directly from pyrealsense

@felix-tracxpoint
Copy link
Author

This is great! But how...?

@dorodnic
Copy link
Contributor

We added an example - export_ply_example.py.
At the moment, it is still only on the development branch, but it will be merged to master with next release (and also added to next binary installer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants