If we assume that the noise is white then its spatial distribution over the image will be random. For the analysis of spatial data there are many measures of randomness [18], often based on the assumption that the observations follow a Poisson distribution. This can be tested using the relative variance It is calculated by first counting the number of observations (in our case the number of above threshold pixels in the difference map) in n windows, , from which the mean, , and variance, , of the can be found. Although the test is sensitive to the window size and point density it works adequately as long as is sufficiently large.
For our purposes we do not wish to detect the spatially random noise, but rather to avoid it in our thresholded image. We therefore select the threshold which maximises the relative variance, thereby maximising ``clumpiness'' (regions of change) and minimising the Poisson distribution (noise).