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

Export an organized point cloud #1455

Closed
baptiste-mnh opened this issue Mar 29, 2018 · 12 comments
Closed

Export an organized point cloud #1455

baptiste-mnh opened this issue Mar 29, 2018 · 12 comments

Comments

@baptiste-mnh
Copy link
Contributor

Hi,

I'm able to generate a PLY from my D415 but I need to get an organized point cloud such as a PCD, PTX or E57.
Is there a way to do it directly with th SDK 2.0 or PCL library?

Thanks in advance

Required Info
Camera Model D400
Operating System & Version Linux (Ubuntu 16.04)
Platform PC
SDK Version 2.0
@Alex9812
Copy link

use the rs-pcl example to convert realsense data to PCL. Once you're in PCL you can convert to PCD

@dorodnic
Copy link
Contributor

dorodnic commented Apr 1, 2018

Hi @baptiste-mnh @Alex9812
Adding the link to pcl example. It's not perfect, but should give you a point to get started.

@baptiste-mnh
Copy link
Contributor Author

Thank you for your answers. I successfully generated a .pcd but I still having issues to convert it.

My steps

  • Wait for a new frame
  • Get the points with this code
auto depth = frames.get_depth_frame();
auto points = pc.calculate(depth);
  • Transform it PCL point cloud like in the exemple rs-pcl
    ptr_cloud cloud = points_to_pcl(points);
  • Save it
    pcl::io::savePCDFile(filename+".pcd", * cloud);

PCD Header :

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z rgb
SIZE 4 4 4 4
TYPE F F F U
COUNT 1 1 1 1
WIDTH 395805
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 395805
DATA ascii

I easily can open it with CloudCompare.
Furthermore, my .pcd contain a lot of (-0, -0, 0) lines.

But when I try to convert it as E57, I can't open it in Cloudcompare, it says that the box dimension is 0,0,0.
Is there an issue in my .pcd header or maybe I miss a step?

So I still can't open my laser capture in Capturing Reality. May be there is an other way to convert it in PTX for exemple?

Thanks!

@RealSense-Customer-Engineering
Copy link
Collaborator

[Realsense Customer Engineering Team Comment]

@baptiste-mnh
Do you think this is still issue of LibRS? since you are now able save the PCD file from RealSense camera. For PCD file converts to E57, I read some topics few mentioned that E57 has richer feature saved than PCD, don't know if that cause the problem of converting, so maybe you should ask the question in PCL community.

@baptiste-mnh
Copy link
Contributor Author

Hi,
Yes, I still have the issues.
I will try to find the solution with PCL but it will be great if we could export directly in E57 format which is standard for laser scans.

@RealSense-Customer-Engineering
Copy link
Collaborator

[Realsense Customer Engineering Team Comment]
@baptiste-mnh
Since this is additional feature request, I will discuss internally if it will be implemented.

@baptiste-mnh
Copy link
Contributor Author

Ok thank you. It could be a very useful feature for 3D scan.

@vik-timmersion
Copy link

But here, PCD is not organized point cloud as HEIGHT 1
Is there an option to obtain organized point cloud from intelrealsense D415 and also intelrealsense SR300 ?

Thanks

Thank you for your answers. I successfully generated a .pcd but I still having issues to convert it.

My steps

  • Wait for a new frame
  • Get the points with this code
auto depth = frames.get_depth_frame();
auto points = pc.calculate(depth);
  • Transform it PCL point cloud like in the exemple rs-pcl
    ptr_cloud cloud = points_to_pcl(points);
  • Save it
    pcl::io::savePCDFile(filename+".pcd", * cloud);

PCD Header :

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z rgb
SIZE 4 4 4 4
TYPE F F F U
COUNT 1 1 1 1
WIDTH 395805
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 395805
DATA ascii

I easily can open it with CloudCompare.
Furthermore, my .pcd contain a lot of (-0, -0, 0) lines.

But when I try to convert it as E57, I can't open it in Cloudcompare, it says that the box dimension is 0,0,0.
Is there an issue in my .pcd header or maybe I miss a step?

So I still can't open my laser capture in Capturing Reality. May be there is an other way to convert it in PTX for exemple?

Thanks!

@AndreV84
Copy link

@RealSense-Customer-Engineering @MartyG-RealSense
so what is the status on e57 support? closed feature request?
How do we create e57 from realsense outputs?
Thanks

@MartyG-RealSense
Copy link
Collaborator

@AndreV84 I checked the progress of the feature request. As suggested in #1455 (comment) there was an official Intel feature request created but it was closed in October 2021 because research determined that there was little public interest in the E57 format compared to the ply format and so it was decided not to proceed with creating the feature.

In regard to how you might convert RealSense data into E57 format, MeshLab apparently introduced E57 import / export support in 2021.

cnr-isti-vclab/meshlab#582 (comment)
https://www.meshlab.net/

The link below has a guide to using a ply exported from RealSense in MeshLab to create a solid mesh.

https://www.andreasjakl.com/capturing-3d-point-cloud-intel-realsense-converting-mesh-meshlab/

@AndreV84
Copy link

@MartyG-RealSense
Thank you for following up
Yes, the recent Meshlab release supports e57 to a limited extent
for example saving [exporting] .ply without faces as e57 will result in e57 that won't work
so as for now the solution that seems to work is to convert .ply with mesg to e57 using cloud compare

cloudcompare.CloudCompare -o examplePointcloud.ply -C_EXPORT_FMT E57 -EXTRACT_VERTICES

then I was able to import resulting e57 from realsense camera into isaac sim
but if there was e57 direct support it would be more convinient indeed
0rotate

@MartyG-RealSense
Copy link
Collaborator

It's excellent to hear that CloudCompare can provide the E57 conversion that you needed.

As an official librealsense feature request for E57 has already been declined for creation, it would not be considered again a second time unfortunately.

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

7 participants