XDoG: Computation of Aesthetically Pleasing Lines
April 13th, 2026
A better approach for changing images to aesthetically pleasing drawings
As I said in a previous post, I am learning to draw. Drawing by hand is going pretty well, but learning to draw on a computer is proving more difficult. I understand what layers are and what masks are, but I am still learning to plan out my drawing in terms of layers and masks. I started with sketching, and still struggle with color and composition.
For that reason, I decided to take what I learned in my last post about hatching to see if I could use structural tensors to create more robust approach for turning images into decent sketches.
Below is an interactive demo of X-DoG/F-DoG (without extensions) for you to use. It has WebGL and WebGPU support (as a learning opportunity) so it’s very fast, even on large images. I have built some extensions, like multi-scale tensor/detail extraction, and color retention but they aren’t ready to be published yet.
If you want to read about the algorithm itself, you can read the original XDoG: An eXtended difference-of-Gaussians compendium including advanced image stylization paper.
Drop an image here or click to upload
Supports JPG, PNG, WebP