playnano.analysis.modules.log_blob_detection module¶
Module for LoG blob detection.
Detect “blobs” in each frame of an AFM image stack using the Laplacian-of-Gaussian method. Provides automatic multi-scale blob detection and optional radius estimation.
- class playnano.analysis.modules.log_blob_detection.LoGBlobDetectionModule[source]¶
Bases:
AnalysisModuleDetect blobs in AFM image stacks using the Laplacian-of-Gaussian (LoG) method.
This module applies multi-scale blob detection to each frame in an AFM image stack using the Laplacian-of-Gaussian algorithm from skimage.feature.blob_log. It supports automatic scale selection and optional estimation of blob radii.
- run(stack, previous_results=None, \*, min_sigma=1.0, max_sigma=5.0, num_sigma=10,
threshold=0.1, overlap=0.5, include_radius=True) Detects blobs in each frame of the AFM image stack and returns per-frame features and a summary.
- Version()¶
- -------
- 0.1.0()¶
Examples
>>> module = LoGBlobDetectionModule() >>> result = module.run(stack, min_sigma=1.0, max_sigma=5.0, num_sigma=10) >>> result['summary']['total_blobs'] 42
- property name: str¶
Name of the analysis module.
- Returns:
The string identifier for this module: “log_blob_detection”.
- Return type:
- run(stack, previous_results: dict[str, Any] | None = None, *, min_sigma: float = 1.0, max_sigma: float = 5.0, num_sigma: int = 10, threshold: float = 0.1, overlap: float = 0.5, include_radius: bool = True) dict[str, Any][source]¶
Detect “blobs” in each frame via a Laplacian-of-Gaussian filter.
- Parameters:
stack (AFMImageStack) – Must have stack.data of shape (n_frames, H, W).
min_sigma (float) – Parameters passed to skimage.feature.blob_log.
max_sigma (float) – Parameters passed to skimage.feature.blob_log.
num_sigma (int) – Parameter passed to skimage.feature.blob_log.
threshold (float) – Absolute intensity threshold for LoG response.
overlap (float) – If two detected blobs overlap more than this fraction, only the larger is kept.
include_radius (bool) – If True, append the estimated blob radius in each feature-dict.
- Returns:
Dictionary with keys:
- features_per_framelist of list of dict
Per-frame list of detected blobs. Each dict contains: - frame_timestamp : float - y, x : float - sigma : float - radius : float, optional (if include_radius=True)
- summarydict
Aggregate metrics: - total_frames : int - total_blobs : int - avg_blobs_per_frame : float
- Return type:
- version = '0.1.0'¶