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

read_point_cloud from buffer (not filename string) #1146

Open
sammo2828 opened this issue Aug 28, 2019 · 7 comments
Open

read_point_cloud from buffer (not filename string) #1146

sammo2828 opened this issue Aug 28, 2019 · 7 comments
Assignees
Milestone

Comments

@sammo2828
Copy link
Contributor

Point cloud files can be loaded using filename, e.g.:

pcd = open3d.io.read_point_cloud("pointcloud.ply")

Is there a way to load from a file that has already been read into a buffer? E.g. something like this:

with open("pointcloud.ply", "b") as f:
   buffer = f.read()
pcd = open3d.io.read_point_cloud(buffer, format="ply")

My use case is the ply files are read from a zip archive so I don't want to save individual ply files to disk so that open3d can load them.

@yxlao
Copy link
Collaborator

yxlao commented Aug 29, 2019

that's not possible currently, read_point_cloud is bind to open3d::io::ReadPointCloud C++ function, which takes the filename as argument

@hamaney
Copy link

hamaney commented Oct 14, 2019

that would be cool to have as it boosts the performance!!

@ManuelZ
Copy link

ManuelZ commented Jan 13, 2020

+1

@germanros1987
Copy link
Contributor

@sammo2828 in order to make that change in a consistent fashion we would have to update the entire IO module. I personally don't think it's worth the investment, but if you see the value we will happily accept a good PR.

@germanros1987 germanros1987 self-assigned this Aug 7, 2020
@germanros1987 germanros1987 added this to the IO module milestone Aug 7, 2020
@ruisebastiao
Copy link

+1

@theNded theNded added io and removed question labels Nov 23, 2021
@lfxx
Copy link

lfxx commented Dec 21, 2021

Quite need this feature as when we use Open3D in some online stream service,the pcd we receive is buffer not file.Read directly from buffer could save lots of time.

@sgolodetz-vm
Copy link

+1

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

9 participants