M3C2-PM Issue: Different results using GUI and CL version

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
MissNoir
Posts: 3
Joined: Mon Jul 31, 2017 11:09 am

M3C2-PM Issue: Different results using GUI and CL version

Post by MissNoir »

Hey!
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
I use CloudCompare version 2.11.3 (but I tried different versions, the error remains). I also tried to calculate M3C2 without using Precision Maps but the error is still the same.

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
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: M3C2-PM Issue: Different results using GUI and CL version

Post by WargodHernandez »

if rerunning your process, do the same files give the same issue each time or is it a random ~10% each time?

If it is consistent can you please supply an example pair for us to examine?
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: M3C2-PM Issue: Different results using GUI and CL version

Post by daniel »

Do your clouds maybe have large coordinates? With the command line tool, you have to explicitly tell CloudCompare what to do with them (see the '-GLOBAL_SHIFT' option)
Daniel, CloudCompare admin
MissNoir
Posts: 3
Joined: Mon Jul 31, 2017 11:09 am

Re: M3C2-PM Issue: Different results using GUI and CL version

Post by MissNoir »

Hey,

@daniel: Yes, I run CloudCompare with the -GLOBAL_SHIFT AUTO option for both point clouds to be compared. And this works incredibly fine for 101/132 point cloud comparisions. In 31 cases (ok, it´s a bit more than my previously mentioned 10%) I got the mentioned error.
You can see the CL command in my first post highlighted with the <Code> Tag.

@WargodHernandez: The error always occurs on the same point clouds to be compared, but they do not differ from those where it works excellently (same study area extent, same way of processing [Metashape])

Edit: Please find under this link: https://cloudstore.zih.tu-dresden.de/in ... qpimofiREb two sample point clouds "PrecMapPrep_dense_0.txt" and "PrecMapPrep_dense_2.txt" as well as the M3C2 parameter file. "PrecMapPrep_dense_2.txt" contains the point cloud data that has to be compared to "PrecMapPrep_dense_0.txt".

The respective point cloud structure is as follows:
X(m) Y(m) Z(m) sx(mm) sy(mm) sz(mm)
(Space-separated)

As I said in my first post, both clouds can be perfectly processed using the GUI but using the CL will run into the mentioned error.

Thanks a lot for your help!
Post Reply