-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
how can i use export_to_ply functions to save ply as ascii format? #6677
Comments
Hi @wuhaoqi-hub rs2::save_to_ply exporter(path, pc);
exporter.set_option(rs2::save_to_ply::OPTION_PLY_BINARY, 0.f);
exporter.export_to_ply(points, infrared); |
thank you very much |
i use the method you answered for me,but the function "rs2::save_to_ply::export_to_ply" can't be visited. |
@wuhaoqi-hub I note that you included export_to_ply in your instruction. @dorodnic stated above that using export_to_ply was not possible. and suggested this code based on save_to_ply instead: rs2::save_to_ply exporter(path, pc); Setting OPTION_PLY_BINARY to False with the '0' value instructs the program to save the ply in ASCII format instead of exporting a binary file. |
I used the code exporter.export_to_ply(points, infrared);it has export_to_ply,but the export_to_ply is the private function ,the exporter object can't visit it.can you give me some example code?thanks |
@wuhaoqi-hub I could not find an example for saving ASCII to ply. @dorodnic will be able to provide better advice than I can about custom code that you can try in your project. |
The function works if you change its |
Hi @ilyak93 Exporting color to ply usually does not work on Python (if you are using Python and not C++). The subject has been researched by me extensively over the years and the only script confirmed to work on Python is one at #6194 (comment) that exports color to ply but without vertex normals. |
@MartyG-RealSense, thanks, I'm trying it on C++ both methods (using points and using the function proposed here) with no success. I'm using 2.34.0-0~realsense0.2250 SDK version. Any suggestions ? When I open the ply file, i see that there is a color, but its a gray color and it's the same for all the points.
I'm doing it with software-device. The only solution I have now is to create a point cloud from the depth and the color using open3d library, but I wanted to get the original pointcloud as realsense construct it. I saw that for other people worked the regular approach using P.S: alignment does work with all the registered intrinsics/extrinsics and etc. |
@ilyak93 I will research your question tomorrow. Thanks again for your patience! |
@MartyG-RealSense, ok thanks. Should I open a new issue or can we continue here ? I have found (by using the function that the exporter exploits) that: Thank you in advance. |
Given that this case was originally about exporting ASCII characters to ply instead of color, please start a new issue and link back to this one. |
I want to export ply as ascii format,but i can't find some methods to slove this problem,so i want to consult this question,this is my code.
int main()
{
context ctx;
int ind(0);
}
The text was updated successfully, but these errors were encountered: