ScientiaLux
strataquest Glossary Filters Overview
BOM Group

Filters Overview

Reference for additional BOM filtering operations

View
Definition
A reference covering the BOM filter operations that apply spatial convolution and neighborhood processing — a kernel (weight matrix) slides across the image computing each output pixel from its local neighborhood. Linear filters (Gaussian, average) compute weighted sums; non-linear filters (anisotropic diffusion) use iterative, gradient-dependent operations. These operations form the pre-processing foundation for all downstream detection and segmentation in StrataQuest.
Linear Convolution vs. Non-Linear Processing
Weighted kernel sum vs. iterative or rank-order operations
Kernel Size & the Smoothing Trade-Off
Larger kernels smooth more but sacrifice fine detail
Separable Kernels for Efficiency
2D Gaussian decomposes into two 1D passes for O(n) cost
Pre-Processing Pipeline Role
Filters prepare images for detection and segmentation

Operations Reference

FilterTypeDescription
AnisotropicNon-linear, iterativePerona-Malik anisotropic diffusion. Iteratively smooths image while preserving edges — diffusion coefficient is reduced near strong gradients. More iterations → smoother regions, sharper edges.
AverageLinear (box filter)Replaces each pixel with the unweighted mean of its neighborhood. Simplest smoothing filter. Faster than Gaussian but produces more blurring artifacts and frequency-domain ringing.
CustomLinear (user-defined)Convolves image with a user-specified kernel matrix. Enables any linear filtering operation — emboss effects, specialized edge detectors, matched filters for specific structures.
LaplaceLinear (2nd derivative)Isotropic second-order derivative operator. Responds to intensity changes in all directions. Produces zero crossings at edges. Very sensitive to noise — usually applied after Gaussian smoothing (LoG).
Membrane detectorOrientedSpecialized filter optimized for detecting thin linear structures (cell membranes). Uses oriented directional responses to enhance membrane-like features regardless of orientation.
SharpLinear (enhancement)Enhances edges by adding a scaled Laplacian to the original: f_sharp = f − k·∇²f. The scaling factor k controls enhancement strength.
UnsharpLinear (enhancement)Subtracts a blurred copy from the original to enhance local contrast: f_sharp = f + k·(f − f_blurred). The blur radius and scaling factor k control the effect.
Simplified

Beyond the main filters: Anisotropic smooths while keeping edges (iterative, edge-aware). Average is simple blur (fast but blocky). Custom lets you define your own filter. Laplace detects rapid intensity changes in all directions. Membrane detector finds thin membrane-like lines. Sharp enhances edges. Unsharp mask boosts local contrast.

Image Processing Foundation

Spatial filtering is one of the most fundamental operations in image processing. Every filter discussed here operates by moving a small window (the kernel) across the image and computing a new pixel value from the neighborhood — a process called spatial convolution for linear filters, or neighborhood processing more generally (Gonzalez & Woods, §3.4).

Convolution & the Kernel Model

In spatial convolution, a kernel w of size m×n is centered on each pixel. The output is the weighted sum: g(x,y) = Σ Σ w(s,t) · f(x+s, y+t), where f is the input image. The kernel encodes what the filter does — a uniform kernel averages (box filter), a bell-curve kernel smooths (Gaussian), a derivative kernel detects edges (Sobel, Laplacian). At image boundaries, pixels outside the frame must be handled: common strategies include zero-padding (treat as black), reflection (mirror the edge), and replication (repeat the boundary pixel).

Linear vs. Non-Linear Filters

Linear filters satisfy superposition: filtering the sum of two images equals the sum of filtering each separately. The Gaussian filter uses bell-curve weights controlled by σ (standard deviation) — larger σ produces broader, stronger smoothing. The average (box) filter uses uniform weights — simple but creates frequency-domain ringing artifacts absent in the Gaussian. The median filter (covered in its own term) ranks neighborhood pixels and selects the middle value — a non-linear operation that is superior for removing salt-and-pepper noise while preserving edges, described by Solomon & Breckon as one of the "workhorse operators" of image processing. Anisotropic diffusion (Perona-Malik) is iterative and non-linear: the diffusion coefficient decreases near strong gradients, allowing smoothing within regions while preserving edges — conceptually, diffusion "stops at boundaries."

Separability & Computational Cost

A 2D kernel is separable if it can be expressed as the outer product of two 1D vectors. The Gaussian kernel is separable: a k×k 2D convolution decomposes into a k×1 vertical pass followed by a 1×k horizontal pass. This reduces the cost from O(k2N) to O(2kN) operations, where N is the number of pixels — a significant speedup for large kernels. The box filter is also separable, and constant-time algorithms exist that compute box-filter output independent of kernel size using integral images (summed-area tables).

Frequency Domain Interpretation

Every spatial filter has a frequency-domain equivalent. Smoothing filters are low-pass — they attenuate high-frequency detail (noise, edges) while preserving low-frequency structure. Sharpening filters (Sharp, Unsharp) are high-pass or high-boost — they amplify edges and fine detail. The Laplacian is a second-derivative operator that responds to all rapid intensity changes. The convolution theorem states that spatial convolution is equivalent to multiplication in the frequency domain: filtering in the spatial domain produces the same result as multiplying the Fourier transforms of the image and kernel, then transforming back (Gonzalez & Woods, §4.7). This equivalence is the theoretical foundation for understanding filter behavior.

Simplified

Every filter works by sliding a small window (kernel) across the image and computing a new value from the neighborhood. Linear filters compute weighted averages — Gaussian uses bell-curve weights for smooth blurring, Average uses uniform weights for simple blurring, Laplace uses derivative weights for edge detection. Non-linear filters like Anisotropic diffusion adapt their behavior based on image content, smoothing flat regions while preserving edges. The Gaussian kernel's separability is key to efficiency: a single 2D pass can be split into two faster 1D passes.

When to Use Which

Noise Reduction

Average — fastest option, use when speed matters and edge preservation doesn't. Anisotropic — best edge preservation among iterative methods, but requires tuning iteration count and diffusion parameters. For most purposes, prefer Gaussian (fast, smooth output) or Bilateral (edge-preserving) from the standalone filter terms.

Edge and Feature Enhancement

Unsharp mask — enhances local contrast by boosting differences from a blurred version. Excellent for sharpening slightly out-of-focus acquisitions or enhancing dim membrane signals. The blur radius should match the scale of features to enhance.

Sharp — similar effect to unsharp mask but uses the Laplacian directly. Less controllable than unsharp mask for most use cases.

Feature Detection

Laplace — second-order derivative, responds to all edges regardless of direction. Best used as part of a LoG (Laplacian of Gaussian) pipeline: apply Gaussian first to suppress noise, then Laplace. Zero crossings in the output indicate edge locations.

Membrane detector — specialized for thin linear structures. Use this when the standard Sobel-based approach misses fine membranes or produces too many false responses from non-membrane edges.

Custom Processing

Custom kernel — when none of the built-in filters match your needs. Examples: 1D directional smoothing, matched filters for specific dot patterns, or experimentally optimized kernels for particular tissue types.

Simplified

For noise: use Gaussian or Bilateral (standalone terms) in most cases; Average only when speed is critical. For sharpening: Unsharp mask is the most controllable option. For membrane enhancement: try the Membrane detector when Sobel-based approaches fall short. Custom kernel is your escape valve for specialized needs.

Connected Terms

Share This Term
Term Connections