In theory, the Gaussian function at every point on the image will be non-zero, meaning that the entire image would need to be included in the calculations for each pixel. In practice, when computing a discrete approximation of the Gaussian function, pixels at a distance of more than 3σ are small enough to be considered effectively zero. Thus contributions from pixels outside that range can be ignored. Typically, an image processing program need only calculate a matrix with dimensions × (where is the ceiling function) to ensure a result sufficiently close to that obtained by the entire gaussian distribution.
Given two p-dimensional normal probability density functions G1 ≡ gp (x; a, A) and G2 ≡ gp (x; b, B)
The convolution of these two functions is a normal probability density distribution function with mean a + b and variance A + B, i.e. gp (x; a + b, A + B): G1 ∗ G2 (z) = gp (z; a + b, A + B)