How to turn 3D points into fuzzy spheres, without changing their values? (Gaussian filter?)

312 Views Asked by At

Basically, I have a bunch of sparse points in 3D space. I want to turn these points into fuzzy spheres. I want the center of each fuzzy sphere to be the original point value, and I want it to have a smooth falloff. Applying a Gaussian filter to my data gets me halfway there - I get fuzzy spheres. But now the values are much less than they were originally.

Is a Gaussian filter the right way to go about this? I'm doing this programmatically (Python). Can I apply a Gaussian filter(scipy.ndimage.filters.gaussian_filter()) and then multiply the result by sqrt(2*pi * sigma^2) to get my original values back? Or am I way off?

1

There are 1 best solutions below

2
On BEST ANSWER

I think that you may have misunderstood the Gaussian filter function. It originates from the image processing library and thus it will produce (i believe) this effect: https://en.wikipedia.org/wiki/Gaussian_blur

It sounds more like you are trying to do a Kernel Density Estimation (a Gaussian blur can be seen as a KDE): https://en.wikipedia.org/wiki/Kernel_density_estimation

I.e. given a number $N$ of points $\mathbf{p}$, they create a density function

$$ \rho(\mathbf{x}) = \sum_{i=1}^N \delta(\mathbf{x} - \mathbf{p}_i) $$

the KDE version of this density function is is the sum of a set of "fuzzy sphere functions" (tri-variate Gaussian) $G_{\mathbf{p}_i}$ centered on each point, i.e.

$$ \eta(\mathbf{x}) = \sum_{i=1}^N G_{\mathbf{p}_i}(\mathbf{x}) $$