← Back to Gallery

XDoG Sketch Effect

Extended Difference of Gaussians for stylized edge drawing

Original

XDoG Result

XDoG Parameters

XDoG(x) = (1 + p) · Gσ(x) - p · G(x)

About XDoG (Extended Difference of Gaussians)

XDoG is an extension of the classic Difference of Gaussians (DoG) edge detection method. While standard DoG approximates the Laplacian of Gaussian, XDoG adds parameters for artistic control, enabling stylized sketch-like rendering.

Parameters:
σ (Sigma): Base blur amount - larger values detect thicker edges
k (Sigma Ratio): Ratio between the two Gaussian blurs
p (Sharpness): Edge contrast amplification
ε (Epsilon): Threshold for binary output
φ (Phi): Soft threshold sharpness

The thresholding step uses a smooth transition: T(u) = 1 if u ≥ ε, else 1 + tanh(φ · (u - ε))