- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have got pointcloud data from only one frame.But I want get pointcloud data from multiple frame.
I know can export .ply file from .bag file by realsense-viewer.So I think maybe by pyrealsense2 it can also come true.
What should I do?
Thanks in advance
The code:
pc = rs.pointcloud()
pc.map_to(color)
points = pc.calculate(depth) # only one frame
points.export_to_ply("xxx", color)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try converting the script below from an Intel point cloud tutorial for Python, which uses 'color_frame' and 'depth_frame' instead of 'color' and 'depth'.
pc = rs.pointcloud();
pc.map_to(color_frame);
pointcloud = pc.calculate(depth_frame);
pointcloud.export_to_ply("1.ply", color_frame);
cloud = PyntCloud.from_file("1.ply");
cloud.plot()
*******
Here's the link to the full tutorial.
https://github.com/dorodnic/binder_test/blob/master/pointcloud.ipynb binder_test/pointcloud.ipynb at master · dorodnic/binder_test · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MartyG,
Thanks for your reply.
I use 'color' and 'depth' which are just different names, I know they are got from frames.
I just want to know how to export .ply file with multiple frame.
Is there a function to achieve this?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 'export_ply_example' sample program for Python may meet your needs.
https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/export_ply_example.py librealsense/export_ply_example.py at master · IntelRealSense/librealsense · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your warm reply.
I had seen the link several times.There is no usefule infromation about how to export .ply file from multple frames.
Maybe there is no function to achieve this in pyrealsense2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is another Python script in the link below for generating a point cloud and saving it as a ply. Is there anything in it that is helpful to you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi York_,
You should use a loop around your code like this:
while True:
# Wait for a coherent pair of frames: depth and color
frames = pipeline.wait_for_frames()
depth_frame = frames.get_depth_frame()
color_frame = frames.get_color_frame()
Regards,
Alexandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
In this way, when 'pc.calculate(depth_frame)', there is also only one frame in it, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just now,I found that the .ply file exported from realsense-viewer just have one frame data.
It can export different .ply with different time in the .bag file from realsense-viewer.
So maybe it can't export .ply containing multiple frames.
These two pictures are different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I think D435 can't shoot panorama point cloud(the whole room), or panorama requires manual synthesis, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will let Alexandra continue with the ply question when she is back on the forum, as I do not have any information to add about that.
Regarding D435's viewpoint ... though the D435 has a wide field of view (FOV), you would have to either arrange multiple cameras around the room or walk a single camera around the room to capture all of it.
In a "volumetric capture" demo Intel did with D435s in January 2018, four cameras were used to capture a 180 degree view. It was estimated that eight would be needed in that setup for 360 degrees (though the company Jaunt managed a 360 degree view with six cameras).
https://realsense.intel.com/intel-realsense-volumetric-capture/ Volumetric Capture @ Sundance using Intel RealSense Depth Cameras
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much.
Now I have some clarity about this.
In this way, if I need a .ply include the whole room point cloud, like a whole scene of ScanNet-data, I need to synthesize one by one frame by myself.
It should be so.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page