I want to output a pcl point cloud from an istream (ply file read directly from server and can't be saved locally). Can anyone help if there is a way to achieve this?
I am familiar with pcl::io::loadPLYFile<pcl::PointXYZRGBA>(std::string fname, *cloud);
but the function I am looking for is of the form xxxx(std::istream, *cloud);
I tried looking at pcl's codebase in the github but couldn't get anywhere: :(
I don't think PCL has one function to do what you're asking. But looking at the .ply file format , I'd suggest you do something like following
element vertex X
, keep the number Xend_header
, start reading vertex values (I'm guessing in the order of xyz r gba) from the next line to the next X
th line
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.