- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MartyG I have written some code in order to capture data from the aforementioned device. At this point
...
auto depth = frames.get_depth_frame();
points = pc.calculate(depth);
auto color = frames.get_color_frame();
pc.map_to(color);
...
const string st ="filename.ply";
points.export_to_ply(st.c_str(), color);
After saving the point cloud (and manually setting faces equal to zero), i see this:
ply
format ascii 1.0
comment pointcloud saved from Realsense Viewer
element vertex 664972
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 0
property list uchar int vertex_index
end_header
-1.36699 -0.806493 1.492 142 154 160 255
-1.36653 -0.807575 1.494 142 154 160 255
-1.36881 -0.810277 1.499 142 154 160 255
-1.36834 -0.811358 1.501 142 154 160 255
-1.36786 -0.812439 1.503 142 154 160 255
-1.36738 -0.813521 1.505 142 154 160 255
-1.36689 -0.814602 1.507 142 154 160 255
-1.36458 -0.814602 1.507 142 154 160 255
-1.36047 -0.813521 1.505 142 154 160 255
-1.35636 -0.812439 1.503 142 154 160 255
-1.35045 -0.810277 1.499 142 154 160 255
-1.34366 -0.807575 1.494 142 154 160 255
-1.33958 -0.806493 1.492 142 154 160 255
-1.33371 -0.804331 1.488 142 154 160 255
-1.32517 -0.800547 1.481 142 154 160 255
-1.31932 -0.798385 1.477 142 154 160 255
-1.3135 -0.796223 1.473 142 154 160 255
-1.30946 -0.795142 1.471 142 154 160 255
-1.30543 -0.794061 1.469 142 154 160 255
.... .... .... ....
.... .... .... ....
.... .... .... ....
.... .... .... ....
I can visualize the pointcloud via meshlab. but when i use the standard ply2.pcd(https://github.com/PointCloudLibrary/pcl/blob/master/tools/ply2pcd.cpp) function in order to convert it to pcd i got this error:
PCD output format: binary
[pcl::PLYReader] new.ply:15: parse error
[pcl::PLYReader::read] problem parsing header!
[pcl::PLYReader::read] problem parsing header!
> Loading new.ply user@awa-51212:~/user/tmp/
The same comes up even if i use the ascii output format.
One thing that i have noticed is that, in vertices' field i got 7 columns whereas the default is 6.
Any help would be greatly appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may have more luck if you skip the ply export stage and instead use the SDK's PCL wrapper linked to below to convert RealSense data into PCL. A user suggested that "Once you are in PCL then you can convert to PCD".
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/pcl
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may have more luck if you skip the ply export stage and instead use the SDK's PCL wrapper linked to below to convert RealSense data into PCL. A user suggested that "Once you are in PCL then you can convert to PCD".
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/pcl
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page