Skip to content

Laplacian of Gaussian

Laplacian of Gaussian (LoG) enhances spots of one size. It keeps the details of the size you give with Sigma and removes finer noise and coarser background and structures. Bright spots become positive peaks, dark spots negative ones, and flat or evenly sloped background becomes 0. It is the standard spot filter before Find Maxima.

A line through a noisy image with two spots on a sloped background: after the Laplacian of Gaussian the background is flat at 0, the noise is gone and each spot is one positive peak

A typical spot pipeline:

Laplacian of Gaussian → Find Maxima → Extract Objects

It is a preprocessing step: its result replaces the image for the steps after it. Measure intensities on the original channel, not on this image. In a project file it is LAPLACIAN_OF_GAUSSIAN.

Use it to find small, round spots (vesicles, foci, particles) of about one size, especially on an uneven background or when spots are close together. Compared to a Gaussian Blur before Find Maxima, it also removes the background, so one Find Maxima cut-off fits the whole image. Difference of Gaussians gives nearly the same result; Wavelet Spots suits spots of a few different sizes. For objects of different sizes, use Bandpass.

ParameterDescription
SigmaThe scale σ of the spots to enhance. A Gaussian spot of standard deviation σ responds most. As a guide, σ ≈ spot radius / √2 (1.4 for spots of 4 px radius). Smaller details count as noise, larger ones as background. Default 1.5, range 0.1-1000.
UnitUnit of Sigma: px (default) or nm. Without a pixel size, nm are taken as pixels.

The image is smoothed with the discrete Gaussian of variance t=σ2t = \sigma^2 (Lindeberg 1998, appendix A.4.1) - unlike a sampled Gaussian it is exact also for small spots (σ < 1 px). The second derivatives LxxL_{xx} and LyyL_{yy} of the smoothed image LL are taken with the differences L(x+1)−2L(x)+L(x−1)L(x+1) - 2L(x) + L(x-1). The result is the scale-normalized Laplacian, negated so bright spots are positive:

−t (Lxx+Lyy)-t \, (L_{xx} + L_{yy})

The factor tt (Lindeberg’s scale normalization, γ = 1) keeps the response of a spot independent of the scale, so results with different Sigma values are comparable.

  • 2D only: each plane is filtered on its own.
  • On a whole slide the filter runs per tile, mirrored at the tile’s borders like Gaussian Blur. Small images are one tile and not affected.
  • Tuned to one size: much larger objects lose their inside (only their rim responds).
  • Lindeberg T., “Feature Detection with Automatic Scale Selection,” International Journal of Computer Vision, vol. 30, pp. 79-116, 1998. doi:10.1023/A:1008045108935

The step cites it; see Citation for exporting the citations of a project.