Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Image filter & edge lab

See how image filters and edge detection work: try blur, sharpen and Sobel kernels or your own, inspect the sum at any pixel, and step through Canny.

Your browser cannot show the picture.



        
        

Tap the picture to see the maths at one pixel.

How to use

  1. Start with the test picture or choose your own (it stays on your device).
  2. Filters: pick a kernel, or choose "Your own 3 × 3" and type nine numbers. Each pixel becomes the weighted sum of its neighbours, divided and shifted as shown.
  3. Tap any pixel to see the nine grey values, the weights and the sum.
  4. Canny edge detector: step through the seven stages and move the blur and the two thresholds to see how edges appear and disappear.

Keyboard and touch

TabMove between kernel cells, lists and sliders
← → on a sliderChange blur or thresholds
Tap the pictureInspect one pixel

Tips

  • If the weights add up to 1 (after dividing), the picture keeps its brightness: blurs and sharpen do this. Edge kernels add up to 0, so flat areas turn black (or grey with the +128 shift).
  • Sobel x finds vertical edges (brightness changing left to right); Sobel y finds horizontal ones.
  • More blur in Canny ignores fine texture and noise; less blur keeps small details.
  • Raise the high threshold to keep only strong edges; lower the low threshold to let edges continue through faint parts.
  • For photo looks and saving full-size pictures, use our Photo effects lab.

About this lab

A convolution kernel is a small grid of weights. For every pixel, the lab multiplies the pixel and its neighbours by the weights, adds them up, divides and adds an offset; pixels at the border reuse the nearest edge pixel. The Gaussian kernels use binomial weights that approximate a bell curve.

The Canny edge detector (John Canny, 1986) turns the picture grey, smooths it with a Gaussian blur, measures the brightness slope with the Sobel kernels, keeps only the peak of each slope across the edge (non-maximum suppression), and finally keeps strong edges plus any weaker edge pixels connected to them (hysteresis). Pictures are worked on at up to 560 pixels across. Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product