I have already looked through the bug tracker and the forum but I have not come across any post that covers my problem.
I call Cloud Compare with the M3C2 plugin from command line (CL) to perform change detection between numerous point clouds (135 in sum) including precision maps. In some calculations, the distance calculations show only NaN values. I have performed some of the "problematic" calculation again (same point clouds, same M3C2_params.txt file) using the CC GUI version and what can I say, the output is as expected (correct distance measurements)!
When looking at the output files, it is noticeable that sigmn_cloud1 in the output of the GUI version and the "CL version" are identical. Sigmn_cloud2 is also calculated correctly in the GUI version, but in the CL version NaN values appear for all points. Furthermore the GUI version will give you the distance even if one of the sigmaN values shows NaNs. This is not the case when I call the tool from CL.
Please find here two snippets of the two M3C2 output files - one produced by the GUI and one produced by the CL version. Both snippets show the same point cloud extent (for simplicity I removed the normal columns).
GUI:
//X Y Z SigmaN_cloud1 SigmaN_cloud2 significant_change distance_uncertainty M3C2_distance
539637.58802 7757301.53422 36.21343 1.981461 0.251292 0.000000 3.914770 -0.773523
539637.68201 7757301.44448 36.11867 1.641392 0.293539 0.000000 3.268169 -0.669533
539637.50999 7757301.50231 36.03711 0.813694 0.606389 0.000000 1.988996 0.981034
539637.55355 7757301.61511 36.23497 1.216069 nan 0.000000 nan nan -0.785251
539637.46830 7757301.57884 36.07878 1.021095 nan 0.000000 nan nan -0.465966
(some NaN values are normal)
CL:
//X Y Z SigmaN_cloud1 SigmaN_cloud2 significant_change distance_uncertainty M3C2_distance
539637.58802 7757301.53422 36.21343 1.98146 nan 0.00000 nan nan
539637.68201 7757301.44448 36.11867 1.64139 nan 0.00000 nan nan
539637.50999 7757301.50231 36.03711 0.81369 nan 0.00000 nan nan
539637.55355 7757301.61511 36.23497 1.21607 nan 0.00000 nan nan
539637.46830 7757301.57884 36.07878 1.02109 nan 0.00000 nan nan
I call CC from CL using the following command:
Code: Select all
CloudCompare.exe -AUTO_SAVE ON -C_EXPORT_FMT ASC -PREC 5 -O -GLOBAL_SHIFT AUTO "C:\Users\Public\file1.txt" -O -GLOBAL_SHIFT AUTO "C:\Users\Public\file2.txt" -M3C2 "C:\Users\Public\m3c2_params.txt" -SAVE_CLOUDS
Please note, this problem occurs only in ~10% of the 135 calculations. In ~90% of the change detections, the M3C2 output using the CL version is as expected and equal to the output of the GUI version. The structure of the point clouds showing the NaN issue after running M3C2 is equal to those which do not produce any problems.
I am very happy about any hints that can help me to solve my problem!
Many thanks in advance and all the best, Mel