How to use the Image Convolution Kernel Visualizer
- 1. Load an imageOpen a photo from your device, or use the built-in sample.
- 2. Choose a kernelPick a preset like Sobel X, or edit the nine numbers.
- 3. Apply and compareSee input and output side by side and download the PNG.
How convolution works
A kernel is a small grid of weights. For every pixel, the tool multiplies the 3 × 3 neighbourhood by the kernel, adds the results and divides by a normaliser: output = Σ (pixel × weight) ÷ divisor. This is done separately for red, green and blue, then clipped to 0–255.
Worked example with the sharpen kernel [0, −1, 0; −1, 5, −1; 0, −1, 0] on a patch whose centre is 50 and whose neighbours are all 10: 5 × 50 − 4 × 10 = 210. The bright centre becomes even brighter than its surroundings, which is exactly what sharpening means.
Kernels to try and the CNN link
- Box and Gaussian blur average neighbours; the divisor is the kernel sum (9 and 16).
- Sobel X / Y respond to vertical and horizontal edges; their weights add to 0, so flat areas turn black.
- Laplacian finds edges in every direction.
- Emboss gives a raised, 3-D look.
A convolutional neural network learns kernels like these by itself. Its first layers often end up looking like edge and colour detectors, and deeper layers combine them into shapes and objects. In code: cv2.filter2D(img, -1, kernel) in OpenCV, or Conv2D in Keras with learned weights. Large photos are scaled to 800 pixels on the long side so the browser stays fast; your image is never uploaded. Count the weights in a full CNN with the parameter count calculator.
Frequently asked questions
Why is my edge-detection output mostly black?
Edge kernels add up to zero, so flat areas become 0 (black). Only edges stay bright.
Does this upload my photo?
No. The image is processed with the canvas in your browser.
Is the Image Convolution Kernel Visualizer free?
Yes, the Image Convolution Kernel Visualizer is free. The first time you apply your first kernel, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.