Theoretical Background

In order to simplify discussions, we first introduce a standard accuracy ε for Gaussian (bell-shaped) curves.
This accuracy is set equal to
   ε = e-(2π)2/2 = 2.675287991E-0009
It is recognized herewith that any Gauss curve needs only to be calculated in a small neighbourhood around its "mean value":
   e-[(t - tk) / σ]2/ 2 > ε    ==>    e-[(t - tk) / σ]2/ 2 > e-(2π)2/2    ==>    -[(t - tk) / σ]2 > -(2π)2    ==>    | t - tk | < 2π.σ

Let f(t) denote a continuous Graph having a continuous Fourier transform. Let f(t) be sampled at uniform discrete intervals of T pixels. Then, according to Shannon's Sampling Theorem f(t) can be exactly reconstructed from its samples f(n.T) if and only if the spectrum F(ω) of f(t) has a limited bandwith, such that F(ω) = 0 for all |ω| ≥ π/T . It is clear from the start, however, that the sampling interval T of a Graph in an image is just equal to T = 1 pixel .
We seek a Continuation of the discrete Graph which is representative. By this we mean that the continuation can be (re-)constructed from the Discrete background. Hence the bandwith of its Fourier Transform should be such that |ω| ≥ π/T = π .
We will define now a quite a specific continuation f of the Graph, as follows (apart from a well-known constant):
   f(t) = Σk fk e-[(t - tk) / σ]2 / 2     with discrete values   fk   at positions   tk
This kind of continuation may be called a Sense. Here the "spread" σ is still to be determined.
Calculate the Fourier Transform F of the Sense (apart from norming constants again):
   F(ω) = Σk fk ei ω tk . e2 σ2/2
The result is equal to kind of a Fourier Transform of the sampling, multiplied by a factor which is independent of the sampling as well as the samples. It will be assumed that the whole F(ω) becomes effectively zero (that is: small enough) if this sampling-independent factor becomes smaller than our standard accuracy (-: which can be redefined it if such is not the case):
   e2 σ2/2 < e-(2π)2/2    giving:    |ω σ| > 2π    or:    |ω| > 2 π/σ = π / (σ/2)
But we know from Shannon's Sampling Theorem that: |ω| ≥ π/1 .
Giving for the quantity σ an extremely simple rule of thumb:    1 < σ/2    or    σ > 2 .
In words: the spread of the bell-shapes in sensing the discrete Graph must at least be greater that two times the pixel size.
And the smaller σ , the better, of course. In practice, values 2≤ σ ≤ 3 may be suitable.

The continuation of a discrete background has the immense advantage that it can be manipulated with help of the whole machinery of classical calculus. We repeat:
   f(t) = Σk fk e-[(t - tk) / σ]2 / 2
This sum of Gauss shapes is much less cumbersome than it seems at first sight, because we have seen that only values at intervals smaller than 2.πσ , where σ has a value, say, between 2 and 3 pixels, have to be calculated.
The function can easily be differentiated, for example:
   f '(t) = - Σk fk [(t - tk) / σ2] e-[(t - tk) / σ]2 / 2
Also the second derivative can be calculated without much effort:
   f ''(t) = Σk fk [(t - tk) / σ2]2 e-[(t - tk) / σ]2 / 2 - 1 / σ2 Σk fk e-[(t - tk) / σ]2 / 2
In a nutshell, this is the whole secret behind Numerical Differentiation, as it is accomplished according to my insights (HdB).