1
$\begingroup$

I have a set of discrete points on a 2D surface and need to build a heat map or a distribution of the density of the points. However, I also need to smooth out the density/distribution by applying some sort of kernel (Gaussian kernel, for example).

I Know what Gaussian distribution is, and I have no idea how to mathematically apply the Gaussian kernel to the points on 2D so I can get a smooth distribution or density of points. I know there are functions in Wolfram to do that, but this is more like a research problem, so I need to understand the theory of it. I am a theory person, and I am not in need of programming. I just need to understand the underlying math of it.

Please explain it to me, possibly with an example, or take me to a website that I can read about it.


I got this answer, but I'm still struggling to understand it:

Since the points are discrete, you simply translate the kernel to each point and scale it by the height (value) at that point, and then sum the results.

$$f(x,y)=\sum_i \sum_j p_{i,j} f(x−x_i,y−y_j)$$ where $f(x,y)$ is my kernel and $p_{i,j}$ is the value of the point at $(x_i,y_j)$.

The result will be smooth because it is a finite sum of smooth functions. However, If we multiply the height at each point with $f(x−x_i,y−y_j)$, does it affect the density at all? Say, if $f(x−x_i,y−y_j) > f(x−x_p,y−y_q)$ for two particular points $(x_i,x_j)$ and $(x_p,x_q)$, then this would change the relative original densities at $(x_i,x_j)$ and $(x_p,x_q)$. I think I am wrong, but cannot understand why I am wrong. Maybe it's something in the function $f(x−x_i,y−y_j)$ itself that I misunderstand. Any explanation or links to documentation/tutorial would be much appreciated!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.