Difference-of-Gaussians filter

The difference-of-Gaussians filter is a feature enhancement algorithm which acts as a band-pass filter. The convolution kernel is formed as the difference of two Gaussian kernels

K_{\mathrm{DoG}}\left(x,y\mid\sigma_{1},\sigma_{2}\right)=K_{\mathrm{G1}}-K_{%
\mathrm{G2}}\,,

where the standard deviation \sigma_{2}>\sigma_{1}, and the kernels are given by K_{\mathrm{G1}}=K_{\mathrm{G}}\left(x,y\mid\sigma_{1}\right) and K_{\mathrm{G2}}=K_{\mathrm{G}}\left(x,y\mid\sigma_{2}\right). The sizes for both kernels are computed as l=1+2\left\lceil 3\sigma_{2}\right\rceil. The standard deviations \sigma_{1} and \sigma_{2} are user-specified parameters.

Although the kernel K_{\mathrm{DoG}} is not separable, the filtered image can be obtained by subtracting two images filtered with Gaussian kernels having different standard deviations,

F=I*K_{\mathrm{DoG}}=I*K_{\mathrm{G}1}-I*K_{\mathrm{G}2}\,.

Threshold for approximate localization of molecules

The threshold value can be specified by users as an expression combining mathematical functions and operators with variables based on the current raw or filtered image. Variables provided by this filter are:

DoG.I current raw input image
DoG.F corresponding filtered image
DoG.G1 result of filtering only with K_{\mathrm{G1}}
DoG.G2 result of filtering only with K_{\mathrm{G2}}