-
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
What will realsense viewer do when I export the 3D mesh? #10276
Comments
Hi @CodeLHY It looks as though you are applying depth to color alignment with align_to before the post-processing filters are applied. Intel recommends performing alignment after post-processing to help to avoid distortion effects such as aliasing (jagged lines). Could you try moving alignment to a section of the script that comes after the filter list to see whether the image improves, please? |
In fact, the post-processing flag is set as False. parser_bag = Parser_Bag("../realsense_data/20220301_174251.bag", post_proc=False, .......
|
Thank you for the information. Another difference between the RealSense Viewer and your own script may be that you are using the align_to method to perform depth to color alignment. The Viewer is likely using the alternative pc.calculate alignment method to map RGB data onto depth points directly, as demonstrated by the SDK's C++ 'rs-pointcloud' example program. https://github.com/IntelRealSense/librealsense/tree/master/examples/pointcloud |
You are right, when I align the color to the depth map, the strange phenomenon disappears immediately. align_to = rs.stream.depth
align = rs.align(align_to) By the way, where can I find the script that describes what Realsense Viewer does when I click "export" button exactly? Maybe this will help me to learn how to process the raw data captured by the RealSense Camera. Thank you for your prompt reply very much! |
The Viewer is making use of the save_to_ply instruction, which provides a range of options for customizing ply export. https://github.com/IntelRealSense/librealsense/blob/master/common/viewer.cpp#L111-L114 https://intelrealsense.github.io/librealsense/doxygen/classrs2_1_1save__to__ply.html Using save_to_ply in Python has a history of being a problem though in regard to saving RGB color to ply. There is an alternative instruction called export_to_ply that has been shown to be able to save color to ply, though without normals. #6194 (comment) provides a Python example of saving such a color ply. |
Hi @CodeLHY Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
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 new issue, even if they haven't followed any of the suggestions above :)
Issue Description
I recorded a .bag file, and tried to use pyrealsense2 to parse the .bag file to get the RGB and also the depth map. However, when I tried to visualize the depth map in the point cloud format, I found that the objects are not vertical but oblique, I am not sure what will cause this kind of problem. At the same time, I found that, the mesh exported through the GUI of RealSenseViewer looks good. So I wonder what will RealSenseViewer do when I click the "export" button.
To help you find out the problem, I paste the main code here.
The text was updated successfully, but these errors were encountered: