-
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
Problems with output Point Cloud of the C++API with RGB texture(LIdar Camera L515) #L515 #C++ label:L515 #9071
Comments
also I m confused whether the XYZ coordinates are pixel coordinates or 3D coordinates in the Camera frame @MartyG-RealSense @RealSense-Customer-Engineering @RealSenseSupport |
Hi @Ziling169BENZHI Did you manage to find a solution for the problem in this case, please? |
Hi MartyG-RealSense, sorry I still have the same problem with On the other side, for points.export_to_ply("",color); I figured out the problem is the binary data type reader, do you have any idea, how can I change the format to " format ascii 1.0" ?? |
Also, I am trying to change the minimum range from default to 0, however, I am bit confused about how to implement the sensor control example from SDK2.0 on point cloud example, Can you give me some hints? Thanks a lot. |
When using save_to_ply, setting OPTION_PLY_BINARY to a value of '0' should result in the ply being exported in ASCII format. An example of a C++ script for doing so is here: If you wish to shorten minimum range on L515, the link below suggests loading a Visual Preset (json) camera configuration such as Short Range. I also located a Python script example for setting the L515's minimum distance to '0' using code. |
The RealSense user who created #6979 shared a Python script in a later case that exported the ply with binary = false using the save_to_ply instruction. The script did not export color though. I recalled that there was a case in the link below where a RealSense user created a script for export a color ply with export_to_ply for the purposes of accessing it as ASCII.
My understanding of that case is that once the RealSense user exported the color ply then they opened the ply file in the open-source MeshLab software package and exported the mesh as ASCII. A guide to importing a RealSense ply file into MeshLab and performing further work on it is here: https://www.andreasjakl.com/capturing-3d-point-cloud-intel-realsense-converting-mesh-meshlab/ |
Hi @Ziling169BENZHI Do you require further assistance with this case, please? Thanks! |
Hi, Marty Thank you very much, unfortunately, I still need some assistance, I am trying to load the Json file into my code, I am using the method from #6739 and #4046. Currently, I felt bit confuse about how this works: Besides that, I am wondering how to set the mode to Short Range Set in C++? |
Setting up the loading of a camera configuration json can be a little awkward. Let's focus on trying to set up the Short Range preset first. Fortunately the code for doing so is simpler than for custom made presets. Intel provide a guide for doing so in C++ in the link below. If the second of the two methods in that guide is used: auto sensor = profile.get_device().firstrs2::depth_sensor(); To define the L515 Short Range preset, please try changing this instruction: rs2_rs400_visual_preset::RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY To this: rs2_l500_visual_preset::RS2_L500_VISUAL_PRESET_SHORT_RANGE |
thank you so much, Marty I am able to change the Short-range set. I also have some questions about setting the resolution of the L515, do you have any recommended issue I can use? |
The code for setting the resolution for L515 in C++ will be the same as with other RealSense cameras, except for selecting resolutions that are supported by L515. You can set up cfg configuration instructions just before the pipe start line of the script, and then place 'cfg' in the brackets of the pipe start instruction so that the script knows to use that custom configuration instead of the L515's default stream configuration. Here's a simple example of such code that is taken from an L515 case for defining depth and color streams:
|
Hi @Ziling169BENZHI Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
Sorry I got sick for few weeks. Thank you for all the help. |
No problem at all, @Ziling169BENZHI - you are very welcome! |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open a new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
the reason to start this problem is the ply file exported from RSviewer and save_to_ply.py both came out as the same form
1elements with 9 properties, but each line only contains 3 elements, so a bit confusing to load the data in python or CPP.
Hi, I have been working on export my ply file with CPP API for about a week; I expect to export the ply file with RGB, meshed point cloud data and normals like in RealsenseViewer.
I have looked through many helpful issues in the community already ( such as #8656, #6979 and #2832)
Based on their help, I can export the point cloud with the colourized depth and mesh it like this:
And I tried to play around with rs2::save_to_ply, but I am not sure how to do that. Can anyone take a look at my code and gives me some help?

1>-----
my idea is to use
rs2::save_to_ply exporter(fname,pc); // because save_to_ply can provide set_options then using
exporter.process(colorized) // this will help me process the saving procedure
But I can only put colourized depth frames in the exporter.process() method, I am not sure why I cannot put the colour frame inside.
2>--------

I also tried to use points.export_to_ply(fname, colour) directly to export the file. However, this will help me export the data with RGB texture, but it didn't provide me options to select mesh or normals.
Also, this method only saves the points in binary form, it will be really helpful if anyone can provide me with a way to export in ASCII form.
Thank you for all the help @MartyG-RealSense @RealSenseSupport
The text was updated successfully, but these errors were encountered: