Page 1 of 2

unit of measure (density;gradient)

Posted: Mon Jun 16, 2014 2:04 pm
by Luca1988SCENE
Hi, i would understand :
- which unit of measure have the two functions density and gradient;
- which is the difference between the two methods of calculating density ( accurate and approximate), and their unit of measure.
Thanks

Re: unit of measure (density;gradient)

Posted: Mon Jun 16, 2014 3:14 pm
by daniel
About the density: http://www.cloudcompare.org/release/not ... 40223.html
New method: "Tools > Other > Density > Accurate (at a given scale)"
  • More accurate method to compute the local density (= number of points inside a sphere centered on each point)
  • The old version is now accessible via "Tools > Other > Density > Approximate" (and it simply outputs the distance to the nearest neighbor now)
And for the gradient, it's in "units of your scalar field" / "units of your cloud".

Re: unit of measure (density;gradient)

Posted: Mon Jun 16, 2014 4:08 pm
by Luca1988SCENE
yes, but i don't understand because this value is so big, in my situation i have a cluod of about 4 milion points, i choose the value of default ( sphere of 2 cm diam) and the mean value in the GAUSS distribution is about 19 milion. What this number means ? i don't have so much points. I thought that CC computes the number of points included in each sphere calculated in every point.

Re: unit of measure (density;gradient)

Posted: Mon Jun 16, 2014 8:16 pm
by daniel
My mistake, the non-approximate density seems to be the number of points divided by the volume of the 'kernel' sphere.

So in your case the sphere volume will be 4/3 * pi * 0.02^3 ~ 3.35e-5 (the inverse of which will be around 30 000).

Re: unit of measure (density;gradient)

Posted: Tue Jun 17, 2014 8:08 am
by Luca1988SCENE
Thanks Daniel, now i understand, but the value of 30 000 not convince me. the formula is d (density)=n( number of points)/v( volume sphere), now if i take the mean value of GAUSS' distribuition (19 000 000) and i want to know the n related of this value i do:

d= n/v; 19 000 000 = n/3.35e^-5 ;n = 428870

is it right ?

Re: unit of measure (density;gradient)

Posted: Tue Jun 17, 2014 9:31 am
by daniel
Well, if you say that your sphere radius is 2 cm, then its volume is 3.35e-5 m^3.

So your density is d = n/v = n * 30000. So if d = 19 000 000, then n = 19 000 000 / 30 000 = 633.

Re: unit of measure (density;gradient)

Posted: Tue Jun 17, 2014 9:53 am
by Luca1988SCENE
Sorry....i understood e^-5 = 10^-5.......
Thanks a lot and sorry again

Re: unit of measure (density;gradient)

Posted: Tue Jun 17, 2014 9:58 am
by daniel
Indeed it's 10^-5... v = 0.0000335 m^3 (and 1/v ~ 30 000)

Re: unit of measure (density;gradient)

Posted: Tue Jun 24, 2014 11:38 am
by Luca1988SCENE
thanks Daniel i understood, another thing i would ask you... the gradient' s unit measure ?I have data raw fron laser scanner and i don't know if choose YES or NO when CC ask me if the scalar field is composed by euclidian measures...and CC gives different out puts if you change one or the other option.
thanks

Re: unit of measure (density;gradient)

Posted: Tue Jun 24, 2014 1:48 pm
by daniel
Well, the gradient is basically the difference between the scalar fields values of two points divided by their distance (in fact it's a little bit more complicated because we use all the neighbors of a point but you got the idea). It's generally very sensitive to noise, especially when the two points are very close from each others (as their distance is very small and we divide by this distance, any error will have a great influence on the result).

So if we know that the scalar field is an euclidean distance itself (or more generally that its values can't change faster than the distance between points) then we can cap this noise effect as we know that the gradient can't be greater than 1. But it's only valid if this 'euclidean' condition is met (rarely in practice!). Otherwise there's no reason to cap the result and you'd better get clean data...