-
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
Calculate surface area of object using 3D Depth reconstruaction. #11571
Comments
Hi @TheNemo05 Would it be practical for you to instead export a ply pointcloud file instead of a bag and then import it into the free open source RealSense-compatible MeshLab tool to perform 3D reconstruction and surface area estimation on it, as described at #9823 (comment) |
Also if I use meshlab i ll have to join multiple ply files together. in that case inaccuracy will be more in surface area calculation. surely i ll be using meshlab if i was able to somehow capture the 3D view of object. I need a solution that has depth 3D reconstruction. with all the depth parameters & hopefully that can convert .bag file into 3D reconstruction. |
Also i ve finally decided to give mesh lab a try, but to build a accurate 3D model i ll have to eliminate the same co-ordinates or single (x,y,z) should be repeated only once else there might be overlapping of pointclouds. Do you have any method to resolve it. |
https://www.youtube.com/watch?v=pLCVCH7ypI4 |
You can manually clean up overlapping points in MeshLab. https://en.wikiversity.org/wiki/MakerBot/Cleaning_up_cloud_point_mesh_in_mesh_lab_for_3D_printing In regard to the Open3D video, most RealSense 400 Series cameras with an RGB sensor (except D405) can also be used as an ordinary video webcam and so a D455 should work with programs / applications that use RGB video for their analysis. The requirement to use a single bag file instead of multiple ply files is likely to rule out most possible methods for achieving your reconstruction, unfortunately. However, if you are able to use C++ instead of Python, you could try using the RealSense SDK's rs-kinfu example program, which can use a single camera that is moved around the object to create a 360 degree pointcloud by "fusing" frames together. The resulting large pointcloud can then be exported as a .ply file. Whilst rs-kinfu uses a live camera by default, you could conceivably edit the script to use a recorded bag file as the camera data-source instead. So you could record a bag where you move the camera all around the object, and then load that file into rs-kinfu and have it turn the bag and its 360 degree recording of the object into a .ply file. https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/kinfu |
Alright, considering the fact i ve recorded .bag file, is it possible to convert every frame in a bag file frame into .ply file using some python code or sdk method. If yes, I ll have 1000's of pointcloud files how do I frame it in a single file using the co-ordinate information. |
Not good at understanding C++, but seen some tutorials with regards to realsense rs-kinfu. I hope to get help with some predefined C++ codes if possible. |
You could convert every frame to a ply file using the RealSense SDK's pre-made rs-convert C++ tool. If the SDK tools and examples were installed when the SDK was installed then an executable of rs-convert should be in the usr/local/bin folder of your computer. https://github.com/IntelRealSense/librealsense/tree/master/tools/convert You could merge all of the ply files together using the command-line interface of the free open source tool CloudCompare, as described at #10640 (comment) and the link below. |
Hello there, i converted the .bag into ply file using the rs-convert tool. But i did not received any .ply file. I either received .raw or .txt files; is there an issue in conversion. |
.ply file conversion with rs-convert unfortunately does not work for some RealSense users whilst the other modes do work. An example of this problem is discussed at #3214 Can you confirm that you used the command -l please (it is a small-case L and not an i). |
Also can you please share c++ code for rs-kinfu |
i was able to convert .bag file into multiple .ply files using Windows. I need some converter to convert .ply files to .pcd files for its usage in cloud compare. |
The rs-kinfu C++ code is here: It's excellent to hear that you were successful with the .ply conversion in rs-convert. A person at the link below installed Open3D to convert .ply to a .pcd that was readable in CloudCompare. There is also an online converter. |
Thank you for the converters, but these converters are able to convert only 1 .ply file at a time. As you know realsense does record multiple frames & we do obtain huge resource of .ply files its certainly impossible to convert every file one by one. It would be intensely time consuming any other method would you suggest that can conert multiple .ply files at a time. |
I was not able to find a tool that could convert multiple ply files to pcd. I am not certain why a conversion to pcd is necessary though as CloudCompare permits the loading of multiple ply files simultaneously with a command line instruction, and then merge them after they have been loaded. https://www.danielgm.net/cc/forum/viewtopic.php?p=9987&sid=a6a56715a3c2aefdc7e253899ccaf160#p9987 Usually, thousands of ply files would not be combined into a single one. It is more usual to choose between six and 10 ply to combine. |
Are you using OpenCV 4, as the rs-kinfu documentation states that this OpenCV version is required. |
I used cmake CMakeList.txt from terminal. |
The rs-kinfu instructions suggest to me that the correct approach is not to use the CMakeList.txt file in the terminal but instead to build the librealsense SDK from source code with CMake and include the following commands: -DBUILD_CV_EXAMPLES=True For example: cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_CV_EXAMPLES=True -DBUILD_CV_KINFU_EXAMPLE=True -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true Once librealsense has been built, check whether a compiled and executable version of rs-kinfu is in Ubuntu's usr/local/bin folder. |
I ve build using the following CMake, but the program still has huge number of errors. prasad@prasad:~/librealsense/wrappers/opencv/kinfu$ g++ rs-kinfu.cpp -I/usr/include/opencv4/opencv2/.. |
I do not have anything else I can suggest for correcting your rs-kinfu errors, unfortunately. I do apologize. |
Hi @TheNemo05 Bearing in mind the comment above, do you require further assistance with this case please? Thanks! |
Case closed due to no further comments received. |
Issue Description
Hello again,
I need some help regarding a project i m trying to accomplish. I need to calculate Surface area of a undefined object using its depth parameters & 3D reconstruction. I ve recorded .bag file for the object.
My main objective is to calculate surface area of the object. Previously i ve tried Open3D which has predefined realsense packages but due to unavailability of information was not able to construct any reconstruction model.
As mentioned earlier I have recorded sequence of bag file. What can be the method I can follow for accomplishment of this project.
The text was updated successfully, but these errors were encountered: