-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Open3D saved ply cannot be ready by pcl? #1633
Comments
this problem still exists. |
Same issue here, when converted back from ply (generated by Open3D) to pcd using the |
Hi @heethesh @Guptajakala, Here is what I found:
However,
Conclusion:
PCL C++ Test Code for PLY IO: #include <pcl/io/ply_io.h>
#include <pcl/point_types.h>
#include <iostream>
int
main(int argc, char* argv[])
{
if (argc < 2) {
std::cout << "Please pass the path to PLY file, as argument.";
return 1;
}
const std::string path = argv[1];
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
if (pcl::io::loadPLYFile<pcl::PointXYZ>(path, *cloud) == -1) //* load the file
{
PCL_ERROR("Couldn't read file o3d_io_ply_ascii.ply \n");
return (-1);
}
std::cout << "Loaded " << cloud->width * cloud->height
<< " data points from test_ply.ply with the following fields: "
<< std::endl;
for (const auto& point : *cloud)
std::cout << " " << point.x << " " << point.y << " " << point.z << std::endl;
return (0);
} original.ply is a ply generated by PCL, with Float Points, Normals, Curvature, and UChar Colors.Case 1: Open3D Legacy/Eigen based IO : File Generated by the following code are NOT supported by PCL. import open3d as o3d
pcd = o3d.io.read_point_cloud("/home/rey/original.ply")
o3d.io.write_point_cloud("/home/rey/o3d_io_ply_ascii.ply", pcd, write_ascii=True, compressed=False)
o3d.io.write_point_cloud("/home/rey/o3d_io_ply_ascii_compressed.ply", pcd, write_ascii=True, compressed=False)
o3d.io.write_point_cloud("/home/rey/o3d_io_ply_bin.ply", pcd, write_ascii=False, compressed=False)
o3d.io.write_point_cloud("/home/rey/o3d_io_ply_bin_compressed.ply", pcd, write_ascii=False, compressed=True) Case 2: Open3D New Tensor IO : File Generated by the following code are supported by PCL. tpcd = o3d.t.io.read_point_cloud("/home/rey/original.ply")
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_ascii.ply", tpcd, write_ascii=True, compressed=False)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_ascii_compressed.ply", tpcd, write_ascii=True, compressed=False)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_bin.ply", tpcd, write_ascii=False, compressed=False)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_bin_compressed.ply", tpcd, write_ascii=False, compressed=True) Case 3: Converted to Float64/Double by Open3D and then saved by Tensor IO: File Generated by the following code are NOT supported by PCL. tpcd_f64 = o3d.t.io.read_point_cloud("/home/rey/original.ply")
for attr in tpcd_f64.point:
tpcd_f64.point[attr] = tpcd_f64.point[attr].to(o3d.core.float64)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_ascii64.ply", tpcd_f64, write_ascii=True, compressed=False)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_ascii_compressed64.ply", tpcd_f64, write_ascii=True, compressed=False)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_bin64.ply", tpcd_f64, write_ascii=False, compressed=False)
o3d.t.io.write_point_cloud("/home/rey/o3d_tio_ply_bin_compressed64.ply", tpcd_f64, write_ascii=False, compressed=True) |
Use the newer Open3D Tensor API to write pointclouds as float32, which are compatible with PCL (see isl-org/Open3D#1633). fixes nerfstudio-project#1571
Use the newer Open3D Tensor API to write pointclouds as float32, which are compatible with PCL (see isl-org/Open3D#1633). fixes nerfstudio-project#1571
Use the newer Open3D Tensor API to write pointclouds as float32, which are compatible with PCL (see isl-org/Open3D#1633). fixes nerfstudio-project#1571
Use the newer Open3D Tensor API to write pointclouds as float32, which are compatible with PCL (see isl-org/Open3D#1633). fixes nerfstudio-project#1571
* scripts/exporter.py: export PLY compatible with PCL Use the newer Open3D Tensor API to write pointclouds as float32, which are compatible with PCL (see isl-org/Open3D#1633). fixes #1571 * exporter.py: pylint: disable=no-member fixes https://github.com/nerfstudio-project/nerfstudio/actions/runs/4377569585/jobs/7661246358#step:10:13 open3d.core.Dtype has been around since open3d 0.11.0 http://www.open3d.org/docs/0.11.0/python_api/open3d.core.Dtype.html --------- Co-authored-by: Frédéric Devernay <f-dy@users.noreply.github.com>
…ct#1572) * scripts/exporter.py: export PLY compatible with PCL Use the newer Open3D Tensor API to write pointclouds as float32, which are compatible with PCL (see isl-org/Open3D#1633). fixes nerfstudio-project#1571 * exporter.py: pylint: disable=no-member fixes https://github.com/nerfstudio-project/nerfstudio/actions/runs/4377569585/jobs/7661246358#step:10:13 open3d.core.Dtype has been around since open3d 0.11.0 http://www.open3d.org/docs/0.11.0/python_api/open3d.core.Dtype.html --------- Co-authored-by: Frédéric Devernay <f-dy@users.noreply.github.com>
IMPORTANT: Please use the following template to report the bug.
Describe the bug
Open3D saved ply cannot be ready by pcl:
Then pcl will get empty cloud
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: