Page 1 of 1

M3C2_GaussMean_statistical-parameters

Posted: Tue Nov 22, 2022 8:17 am
by Michael123
Hi everyone,

I am comparing different cloud with the M3C2 Algorithm and I try to show the comparability by asigning a Gaussian distribution. I am a little bit confused by the results. The peak of the Gaussian curve should normally represent the mean value, right? In the graphic that I attached (file 2) it seems that in CC the peak value of the curve and the calculated value (Gauss mean) are not the same (Gauss mean -0,183674, Peak value at around -0,8). How is CC calculating the Gauss mean value (and the std. dev.)? Is this different from the mean value of the sum of all the M3C2 distances devided by all the values?
I exported the values and reproduced the curve with the Gauss mean and std. dev. from CC. As a result the Gauss curve lays way off (file 1).

Best regards
Michael

Re: M3C2_GaussMean_statistical-parameters

Posted: Tue Nov 22, 2022 10:11 pm
by daniel
Hum, that's weird, especially since the Gauss curve displayed in CC's histogram is at the right position. Which means that internally the mean value is the right one (and what's displayed is wrong).

And what about the info which is displayed in the Console by the way? Does it match the values displayed above the histogram?

I was not able to reproduce this on my side. Would you be able to share the cloud (with this scalar field) with me? (admin [at] cloudcompare.org)

Re: M3C2_GaussMean_statistical-parameters

Posted: Wed Nov 23, 2022 10:40 am
by Michael123
Hi Daniel,

Thank you for your quick response.
The info in the terminal shows the same values as displayed above the histogram.
I sent you an E-Mail with a link. With that you can download the point cloud.

Best regards
Michael

Re: M3C2_GaussMean_statistical-parameters

Posted: Thu Nov 24, 2022 10:00 pm
by daniel
Ok, thanks to your data I found the bug.

Luckily it's 'only' the abscissa values below the histogram that could be wrong in presence of NaN values in the scalar field.

The mean, standard deviation, Chi2 distance and RMS values displayed above the graph or in the Console were correct.

Here is the new display:
fixed_compute_stats_params.JPG
fixed_compute_stats_params.JPG (40.46 KiB) Viewed 11451 times
I'll update the online version as soon as possible (currently I have an issue with the certification authority)

Re: M3C2_GaussMean_statistical-parameters

Posted: Thu Nov 24, 2022 10:10 pm
by daniel
Ok, I fixed my certificate issue, the new version is now online.

Re: M3C2_GaussMean_statistical-parameters

Posted: Fri Nov 25, 2022 12:37 pm
by Michael123
Hello Daniel,

Thank you very much.
It seems like the exported csv-file showed the "wrong" results as well. That's why the Gaussian curve was not at the right position. I exported the csv-file again (with CC 2.13.alpha) and double checked the mean value by using the equation in the attached file. It is now the exact same value as in the histogram (mean).
Thanks again for your help!