CloudCompare / CloudComPy

Python wrapper for CloudCompare
Other
283 stars 40 forks source link

Scalar Field Gradient and Statistics? #46

Closed xiangtaoxu closed 2 years ago

xiangtaoxu commented 2 years ago

Hi, is there any plan to add Scalar fields\Gradient functionality?

https://www.cloudcompare.org/doc/wiki/index.php/Scalar_fields%5CGradient

In general, it would be great if there is neighborhood statistics for scalar fields (which I guess is not so different from the current neighborhood geometric statistics functions?)

prascle commented 2 years ago

Hi, I'm adding the Scalar fields\Gradient functionality to my TODO list! Do you have in mind some particular functions for the neighborhood statistics for scalar fields? Paul

xiangtaoxu commented 2 years ago

I think some basic descriptive statistics would be very helpful already, - mean, variance, median/percentile, gradient. For example, I am interested in the variability of point density within a neighborhood (variance of KNN within a radius), which might help to identify boundaries of objects.

If I think of anything, I will add them to this issue. Thanks so much!

prascle commented 2 years ago

Hi, The new version here gives access to the scalar field gradient. I have done nothing more yet, there are already several functions available, I suppose you can compute a variability of point density with that, and I am not sure of what to add. On clouds, you have all the functions corresponding to the CloudCompare menu tools/other/geometric features (see test024.py):

cc.computeApproxLocalDensity(...)
cc.computeCurvature(...)
cc.computeFeature(...)
cc.computeLocalDensity(...)
cc.computeMomentOrder1(...)
cc.computeRoughness(...)

On scalarFields you have the basic:

computeMeanAndVariance
computeMinAndMax, getMin, getMax

after, you have access to a lot of statistics via numpy (percentile, median, histogram...). Paul

xiangtaoxu commented 2 years ago

Thanks so much!