The Laplacian of Gaussian (LoG) filter is a second-order derivative edge-detection operator that first convolves an image with a Gaussian kernel to suppress noise, then applies the Laplacian operator to locate zero-crossings corresponding to edges. This sequential operation mathematically approximates the difference of two Gaussians, making it a scale-space tool that detects blob-like structures and boundaries at a tunable spatial frequency.
Glossary
Laplacian of Gaussian (LoG) Filter

What is Laplacian of Gaussian (LoG) Filter?
A spatial band-pass filter that combines Gaussian smoothing with Laplacian edge detection to identify regions of rapid intensity change at a specific scale.
In radiomics, the LoG filter is applied to medical images to extract multi-scale texture features by varying the Gaussian sigma parameter, highlighting structures of different sizes—from fine parenchymal patterns to coarse tumor margins. The resulting filtered volumes emphasize regions of rapid intensity transition, enabling the quantification of tissue heterogeneity that serves as input for downstream predictive modeling in biomarker identification systems.
Key Characteristics of the LoG Filter
The Laplacian of Gaussian (LoG) filter combines Gaussian smoothing with second-derivative edge detection to identify regions of rapid intensity change at tunable spatial scales.
Mathematical Definition
The LoG operator is defined as the Laplacian (∇²) applied to a Gaussian-smoothed image. Mathematically, it is the second derivative of a Gaussian kernel:
∇²G(x,y) = (x² + y² - 2σ²) / (σ⁴) * exp(-(x²+y²)/(2σ²))
- Gaussian smoothing suppresses noise before differentiation
- Second derivative detects intensity transitions as zero-crossings
- σ (sigma) controls the scale of analysis
- The kernel approximates the receptive fields of retinal ganglion cells in mammalian vision
Zero-Crossing Detection
Edges are located at zero-crossings in the LoG response — points where the filtered image transitions from positive to negative values.
- A zero-crossing indicates a local intensity inflection point
- Closed contours are guaranteed, unlike gradient-based methods
- Sub-pixel accuracy is achievable through interpolation
- This property makes LoG ideal for blob detection in radiomic texture analysis
In medical imaging, zero-crossings reliably delineate tumor boundaries across varying tissue contrasts.
Scale-Space Representation
Varying σ creates a scale-space — a multi-resolution representation of the image structure.
- Small σ (e.g., 1-2 px): Detects fine details, subtle texture variations, and micro-calcifications
- Large σ (e.g., 4-8 px): Captures coarse anatomical boundaries and large lesion contours
- Scale-space analysis enables blob detection at multiple sizes simultaneously
- The scale-normalized LoG (multiplied by σ²) ensures consistent response amplitude across scales
This multi-scale property is critical for radiomic feature extraction where tissue heterogeneity manifests at different spatial frequencies.
Difference of Gaussians Approximation
The LoG can be efficiently approximated by the Difference of Gaussians (DoG) — subtracting two Gaussian-smoothed images with different σ values.
- DoG ≈ LoG when σ₂/σ₁ ≈ 1.6
- Computationally cheaper than direct LoG convolution
- Enables real-time implementation in image processing pipelines
- Forms the basis of the SIFT (Scale-Invariant Feature Transform) keypoint detector
In PyRadiomics workflows, DoG approximations accelerate multi-scale feature extraction without sacrificing blob detection accuracy.
Mexican Hat Kernel Shape
The LoG kernel in two dimensions resembles a Mexican hat or sombrero — a central positive peak surrounded by a negative annular trough.
- Center-surround antagonism enhances local contrast
- The positive central region responds to bright blobs on dark backgrounds
- The negative surround suppresses gradual intensity ramps
- Kernel diameter is typically set to 6σ to capture >99% of the Gaussian energy
This center-surround structure makes LoG inherently sensitive to spherical or ellipsoidal structures, such as pulmonary nodules in CT scans.
LoG Filter vs. Other Edge Detection Methods
Comparative analysis of the Laplacian of Gaussian filter against other common edge detection operators for radiomics feature extraction.
| Feature | LoG Filter | Canny Edge | Sobel Operator |
|---|---|---|---|
Underlying Principle | Second-order derivative (zero-crossings) after Gaussian smoothing | Multi-stage first-order derivative with non-maximum suppression | First-order derivative approximation using 3x3 kernels |
Noise Sensitivity | Low (Gaussian pre-smoothing suppresses high-frequency noise) | Low (Gaussian smoothing is a built-in first step) | High (amplifies noise due to direct gradient computation) |
Edge Localization Precision | Sub-pixel accuracy at zero-crossings; may detect false edges at curved boundaries | Single-pixel response; excellent localization via hysteresis thresholding | Thick, multi-pixel edges; poor localization without additional thinning |
Scale-Space Capability | |||
Blob Detection (Spot-like Structures) | |||
Directional Selectivity | Isotropic (rotation-invariant; detects edges in all orientations equally) | Anisotropic (computes gradient magnitude and direction separately) | Anisotropic (separate horizontal and vertical kernels; diagonal via combination) |
Typical Radiomics Application | Blob-like tumor detection and multi-scale vessel enhancement | Organ boundary delineation and ROI contour initialization | Texture gradient computation for GLCM and GLRLM pre-processing |
Computational Complexity | O(k^2 * N) where k is kernel size; separable implementation possible | O(N) with fixed 5-step pipeline; moderate constant factor | O(N) with two 3x3 convolutions; lowest computational cost |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Explore the core mechanics and advanced applications of the Laplacian of Gaussian filter, a foundational tool for multi-scale edge detection and blob analysis in radiomic feature extraction.
The Laplacian of Gaussian (LoG) filter is a spatial band-pass filter that performs edge detection by combining Gaussian smoothing with second-derivative computation. It works by first applying a Gaussian kernel to suppress high-frequency noise, then computing the Laplacian operator—the sum of second-order partial derivatives—on the smoothed image. The result highlights regions of rapid intensity change where the second derivative crosses zero. Mathematically, the LoG kernel is defined as: LoG(x,y) = -1/(πσ⁴) * [1 - (x²+y²)/(2σ²)] * e^(-(x²+y²)/(2σ²)), where σ controls the scale of detection. The filter's characteristic 'Mexican hat' shape produces strong positive responses on the darker side of an edge and negative responses on the lighter side, with zero-crossings precisely locating edge boundaries at sub-pixel accuracy.
Related Terms
Core concepts in multi-scale image analysis and feature extraction that form the theoretical foundation for the Laplacian of Gaussian filter.
Difference of Gaussians (DoG)
A computationally efficient approximation of the LoG filter achieved by subtracting two Gaussian-blurred versions of an image at different scales. The DoG operator is calculated as:
- Mechanism: Subtracts a wide Gaussian (σ₂) from a narrow Gaussian (σ₁) to approximate the second derivative
- Scale Ratio: The optimal ratio of σ₂/σ₁ ≈ 1.6 closely matches the true Laplacian of Gaussian
- SIFT Application: Used as the keypoint detection stage in Scale-Invariant Feature Transform to identify blob-like structures
- Efficiency: Avoids computing second-order derivatives directly, making it faster for real-time computer vision pipelines
Scale-Space Theory
A formal framework for representing images at multiple levels of resolution, where the LoG filter serves as a canonical scale-normalized differential operator. Key principles include:
- Scale Parameter: The Gaussian standard deviation σ acts as a continuous scale parameter, with larger values suppressing fine detail
- Causality Requirement: No new structure is created as scale increases—only existing structures are simplified
- Scale Normalization: The LoG response must be multiplied by σ² to achieve scale-invariant detection, ensuring blobs of different sizes produce equivalent maxima
- Deep Radiomics Connection: Multi-scale LoG filtering enables extraction of texture features at tunable anatomical scales
Marr-Hildreth Edge Detector
A pioneering biological vision-inspired operator that formalized the LoG as the optimal edge detection filter. The method proceeds in three stages:
- Smoothing: Convolve the image with a Gaussian kernel to suppress noise and set the operating scale
- Laplacian: Apply the Laplacian operator to locate zero-crossings where intensity gradients are maximal
- Zero-Crossing Detection: Identify pixels where the LoG response changes sign, marking the precise locus of edges
- Closed Contours: Guarantees that detected edges form continuous, closed boundaries—a property not shared by gradient-based methods like Sobel or Canny
Blob Detection
The primary application of the LoG filter for identifying circular or elliptical structures of a specific scale in medical images. The Mexican hat kernel shape is optimized for this task:
- Positive Center: The excitatory central region responds to bright blobs on dark backgrounds
- Negative Surround: The inhibitory annulus suppresses uniform regions, creating a band-pass effect in the spatial frequency domain
- Radiomics Application: LoG blob detection identifies pulmonary nodules in CT, microcalcifications in mammography, and lesions in MRI
- Scale Selection: The σ that produces the maximum LoG response at a given location indicates the characteristic radius of the detected blob
Mexican Hat Wavelet
The visual and functional alias for the LoG kernel, named for its sombrero-like cross-sectional shape. As a wavelet, it satisfies the admissibility condition:
- Zero Mean: The integral over the kernel equals zero, enabling it to function as a band-pass filter
- Continuous Wavelet Transform: The LoG serves as the mother wavelet in scale-space filtering, with dilation generating a family of analysis kernels
- Ricker Wavelet: In geophysics and signal processing, the same function is called the Ricker wavelet, used for seismic trace analysis
- Second Derivative of Gaussian: Mathematically equivalent to the negative normalized second derivative of the Gaussian probability density function
Zero-Crossing Detection
The post-processing step that converts continuous LoG filter responses into discrete edge maps. The algorithm scans the filtered image for sign transitions:
- Sign Change: A zero-crossing occurs where the LoG response transitions from positive to negative (or vice versa) between adjacent pixels
- Sub-Pixel Accuracy: Linear interpolation between neighboring pixels can localize zero-crossings to sub-pixel precision
- Thresholding: Weak zero-crossings below a gradient magnitude threshold are suppressed to eliminate noise-induced edges
- Closed Contour Guarantee: Unlike gradient magnitude thresholding, zero-crossing methods inherently produce closed boundaries without edge-linking post-processing

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us