Method for automating fine registration (ICP) of multiple meshes to a single reference mesh?
Posted: Tue Sep 06, 2022 9:16 am
Hi everyone,
I am currently completing a university project where I have taken 3D scans of some objects to test the accuracy of the devices used. I am doing this by comparing the resulting meshes against reference meshes that act as "ground truths". For a single reference mesh, 80 meshes need to be compared against it. I have already completed rough registration for all of these, so all I need to do now is run the fine registration and mesh-to-mesh distance calculations. However, the fine registration is very time-consuming as each comparison takes about 10 minutes to complete.
To get around this, I have tried to automate this process by using CloudCompare's command line mode. Unfortunately, I haven't used cmd much and haven't done much coding. Currently, I have got the fine registration process to work for a single comparison and have got multiple processess to run at the same time by running the commands in cmd with an "&" symbol in between. This looks like this:
CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (1).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (2).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (3).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (4).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (5).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100
While this works, it seems very inefficient and almost crashes my PC when I try to do more than five fine registration processes at once.
Is there any way to automate this fine registration process so that only one process runs at a time and the next process begins when the previous is finished?
I'm mainly concerned about fine registration at the moment, but if anyone knows how to automate mesh-to-mesh distance calculations (the next step for me), I would love to hear your thoughts.
Cheers.
I am currently completing a university project where I have taken 3D scans of some objects to test the accuracy of the devices used. I am doing this by comparing the resulting meshes against reference meshes that act as "ground truths". For a single reference mesh, 80 meshes need to be compared against it. I have already completed rough registration for all of these, so all I need to do now is run the fine registration and mesh-to-mesh distance calculations. However, the fine registration is very time-consuming as each comparison takes about 10 minutes to complete.
To get around this, I have tried to automate this process by using CloudCompare's command line mode. Unfortunately, I haven't used cmd much and haven't done much coding. Currently, I have got the fine registration process to work for a single comparison and have got multiple processess to run at the same time by running the commands in cmd with an "&" symbol in between. This looks like this:
CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (1).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (2).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (3).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (4).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100 & CloudCompare -M_EXPORT_FMT STL -O "C:\Users\...\Reference Scan.stl" -O "C:\Users\...\Compared Scan (5).stl" -ICP -REFERENCE_IS_FIRST -MIN_ERROR_DIFF 1e-5 -OVERLAP 100
While this works, it seems very inefficient and almost crashes my PC when I try to do more than five fine registration processes at once.
Is there any way to automate this fine registration process so that only one process runs at a time and the next process begins when the previous is finished?
I'm mainly concerned about fine registration at the moment, but if anyone knows how to automate mesh-to-mesh distance calculations (the next step for me), I would love to hear your thoughts.
Cheers.