QCSunny Lab

Image Filter Lab (GPU Convolution)图像滤镜实验室(GPU 卷积)

Convolution, the operation underneath blur/sharpen/edge detection, made tangible: nine weights, one live preview. Edit the 3×3 kernel and the GPU re-filters the image as you type; presets (identity, box blur, sharpen, Sobel, emboss) show the classics.

Drop any image or start from the generated sample — the pixels are uploaded to a GPU texture and never leave the page; export the result as PNG.

Frequently asked questions

Why does the Sobel preset look gray and washed out?

Edge detection produces signed values around zero; the +0.5 offset maps them into the visible range. Negative weights are not just allowed — they are the whole point of edge kernels.

What is the divisor for?

It normalizes the kernel sum: 9 ones divided by 9 is a box blur (brightness preserved); divide by 1 for sharpen where the sum is already 1.

中文说明

卷积——模糊/锐化/边缘检测背后的那一个运算——变得可触摸:九个权重,一块实时预览。编辑 3×3 卷积核,GPU 随输入即时重滤;预设(恒等、盒式模糊、锐化、Sobel、浮雕)展示经典组合。

拖入任意图片或从内置样例开始——像素只上传到 GPU 纹理,从不离开页面;结果可导出 PNG。

常见问题

为什么 Sobel 预设看起来发灰?

边缘检测产生围绕零的有符号值;+0.5 偏移把它们搬进可见区间。负权重不仅允许——那正是边缘核的全部要点。

除数是干什么的?

归一化核内权重之和:九个 1 除以 9 是盒式模糊(保持亮度);锐化的和本来就是 1,除以 1 即可。