How can I export .ply files with camera origin?
Hi, I work for realsense for a while, and now I want to validate the accuracy of realsense by exporting a ply file (one kind of 3d mesh) to read in other 3D viewers like Meshlab to measure the depth generated by the camera. But the ply file doesnt contain the camera position, which is available in Realsense viewer (image below). But open the ply file, I cannot find the origin of the camera.
In Meshlab viewing exported file:
Your help is appreciated.
Regards,
Dan
-
Hi Dannguyen The link below describes how to set the 0,0,0 origin point in MeshLab using the following menu selection sequence:
Filters > Normals > Curvatures and Orientation > Transform: Translate, Center, Set Origin
After setting the origin and saving the model as an .obj file with File > Export Mesh As, the origin should then be highlighted on the saved model.
https://revthat.com/updating-origin-meshes-meshlab/
-
Hi Marty, thanks for your response. I have generated ply from realsense as well as stl file from meshlab, and found that somehow the measurement of the model is not right. The selected region highlighted should be about 28mm (a contact lens blister, FYI), but I measured in both Meshlab and Solidworks the distance of that blister is just 0.0349mm. What's wrong that I just made?
Thank you
Regards,
Dan
-
If there is a large difference between the scale of the original point cloud that was saved to the ply and the scale that the cloud is displayed in when the ply is imported into a 3D modelling software such as MeshLab, it may be because the modelling software is set to a different scale than the RealSense SDK had. Both the RealSense SDK and the modelling software should be set to the same scale.
For example, the default depth unit scale in the RealSense SDK is 0.001 (meters) so the scale in the modelling software should be set to that scale too. The link below looks as though it may provide useful insight about this in MeshLab.
-
I have not used MeshLab and so do not know how it handles scale, and could not find a definitive answer from research either. It may be easier to change the depth unit scale in the RealSense SDK and hope that it provides more accurate results when imported into MeshLab. For example, if you recorded your ply in the RealSense Viewer then you could try changing the depth unit scale from 0.001 to 0.01 with the Depth Units slider that is under the Controls section of the Stereo Module options before you record the ply file.
You could also try importing your ply into another free 3D modelling software that supports ply import, such as Blender
Please sign in to leave a comment.
Comments
5 comments