-
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
Save pointcloud (RGB) without meshing? #7747
Comments
Hi @philianeles The SDK provides OPTION_PLY configuration commands for enabling / disabling mesh, normals and binary point cloud settings. A Python script in the opening comment of the discussion linked to below provides an example of defining the off / on state of these commands when exporting to a ply file. |
Yes, I have this now:
which gives me the pointcloud, without normals and without RGB info - how do I include them? |
I went through your code carefully, checking it against other examples. One trend I noticed is that pc_map_to preceded points:
Whilst in your own script, you reverse that order:
So it may be worth making that edit in your script just to eliminate it as a cause of your problems in getting RGB. Also, my understanding is that the SDK's default is to export a ply in binary format, and binary = false is used if someone aims to export the data in textual / ASCII format. So can you try setting binary to True please? |
I reversed the order to your suggestion:
However the result is still the mesh. No pointcloud with RGB info. I tried also setting binary to True. But still no pointcloud with RGB info... |
I compared your script to the SDK's export_ply_example Python example that can export color. It is possible that using points.export_to_ply to export the ply is not compatible with setting the ply options with ply.set_option(rs.save_to_ply ...). In the export_to_ply example, which also supports setting the ply configuration options, it exports the ply with the rs.save_to_ply method instead of export_to_ply: Notably, it also sets the options after the export instruction. |
I have a version with
|
Unfortunately if |
Apologies for the delay in responding further. I was carefully considering the next step. I have the feeling that there may be an issue related to how alignment is being set up. Looking at the align block setup in the code example below may give insights about something that may need to be changed / added in your own script. |
Hi @philianeles Do you have progress with this case to report, please? Thanks! |
Hi @MartyG-RealSense, yes, I also tried this suggestion however did not help. |
There was another case recently from a RealSense user trying to export a colored point cloud to a ply with Python and not succeeding. There seems to be a historical pattern of cases in which RealSense users try to achieve this in Python without success. |
Hi @philianeles Do you require further assistance with this case, please? Thanks! |
Case closed due to no further cmmments received. |
@MartyG-RealSense Hey I am working on cropping depth map that I get from Intel RealSense D435 to get the depth map of a particular object in the frame and then process that cropped depth map into a point cloud. I tried it with the inbuilt functions but it only saved the entire frame as point cloud and not the cropped depth map. How do you think we can do that? |
Hi @sanjaiiv04 The D435 and D455 camera model types support an 848x100 resolution where the depth data is cropped to a wide but thin horizontal strip at the center of the camera's field of view. 2D mode 3D point cloud mode It is possible to define your own horizontal and vertical cropping, though it is a complex procedure. #2016 (comment) offers advice from a RealSense user about a method for doing so. |
Issue Description
Is there an example (python) to save the pointcloud (RGB) without meshing?
Basically, this functionality of the viewer:
I have the following code (adapted from examples in the sdk) but does not return the point cloud with RGB info (but the mesh):
The text was updated successfully, but these errors were encountered: