Skip to main content

Module blob_detection

Module blob_detection 

Source
Expand description

Blob detection with the scale-normalised Laplacian of Gaussian (LoG).

A blob is a roughly round bright region on a darker background. Smoothing an image with a Gaussian of scale σ and taking the Laplacian responds most strongly, at a blob’s centre, when σ matches the blob’s size. Multiplying by σ² (scale normalisation) makes responses at different scales comparable, so searching for local maxima over position and scale finds each blob’s centre and size at once. For a Gaussian blob of standard deviation s the response peaks at σ = s; a disc of radius R peaks at σ = R / √2.

Overlapping detections of the same blob at neighbouring positions or scales are pruned, keeping the strongest.

Only bright blobs are detected. A dark blob on a bright background gives a negative response at its centre but, as with any LoG, weak positive sidelobes in a ring around it (about 13% of the response of an equal-contrast bright blob), so use a threshold comfortably above that.

See the book entry Local features.

Structs§

Blob
A detected blob.

Functions§

blob_detection
Detects bright blobs of scale between min_sigma and max_sigma (num_sigma geometrically spaced scales). A detection must be a local maximum over its 3×3×3 neighbourhood in position and scale with a normalised response above threshold; of two detections overlapping by more than overlap (a fraction of the smaller blob’s area, in [0, 1]) only the stronger is kept. The image intensity scale matters for threshold (about 0.1 is reasonable for images in [0, 1]).