Autocorrelation itself is logically equivalent to comparing all possible pixel pairs and reporting the likelihood that both will be bright as a function of the distance and direction of separation. In a more mathematical definition, autocorrelation is the convolution of a function with itself. For a digital image $I$, of size $M\xd7N$ (images are discretely spatially defined, 2- to 4-dimensional, of finite extent, and have real, bounded, digital values), autocorrelation can be calculated by Eq. (1) Display Formula
$Gii(a,b)=\u2211xM\u2211yNi(x,y)*i(x\u2212a,y\u2212b),$(1)
where $Gii(a,b)$ is the autocorrelation function, $i(x,y)$ is the image intensity at position $(x,y)$, and $a$ and $b$ represent the distance (or lag) from the corresponding $x$ and $y$ position. The analysis in this work assumes that the image is homogeneous (or ergodic). For example, if an image has boundaries like a cell on a background it should be cropped to be homogeneous. As the mean value and range of real digital images are based on acquisition system and parameters instead of the underlying structure, the normalized autocorrelation, denoted $gii$, is used for analyses such as ICS. It is calculated by dividing $G$ by the square of the mean intensity and subtracting 1 from that quantity, Display Formula$gii(a,b)=\u2211xM\u2211yNi(x,y)*i(x\u2212a,y\u2212b)\u2211xM\u2211yNi(x,y)*i(x,y)\u22121=F\u22121{F[i(x,y)]2}NMi2\u22121,$(2)
where $F(x,y)$ is the Fourier transform of $i(x,y)$. For images which are isotropic (i.e., no orientation), $Gii$ and $gii$ will be radially symmetric, which thus produces $gii(d)$, where $d$ is the length to $(a,b)$.