Image Kernels Explained Visually
setosa.io
setosa.io
A cool fact about the Gaussian filter is that it's separable - you can convolve in the X direction (using a 1 * n kernel), and then convolve the result again along the Y direction (using a m * 1 kernel) - the final result will be the same as convolving using a single m * n kernel, but can be done in O(N) time rather than O(N^2) (you only have m+n multiplications per pixel rather than m * n per pixel).
Not every filer is separable - it's only possible an n * m filter can be expressed as the product of a 1 * m and a n * 1 matrix.
Another cool fact is that you can perform convolution in as a point-wise multiplication in Fourier space (see http://en.wikipedia.org/wiki/Convolution_theorem).
* The linked demo really focuses only on layer 1. See Layers >=2 plotted here: http://arxiv.org/pdf/1311.2901v3.pdf
* DeepViz is a nice tool: https://github.com/bruckner/deepViz
* Another tool one can use to play with convolutional kernels is ShaderToy ( https://www.shadertoy.com/ ). Here's a Gaussian blur: https://www.shadertoy.com/view/XdfGDH
* If you like playing with kernels in shaders, see also Brad Larson's GPUImage: ( https://github.com/BradLarson/GPUImage ) -- the demo app has a bunch of standard kernels.
Just for fun, convolutional shader porn: https://www.shadertoy.com/view/4d2Xzc
-.5 | 1.5 | -.5
1.5 | -3 | 1.5
-.5 | 1.5 | -.5
It produces a cool digital edge blurring effect. What's that called?Try the "edge detection" example with -3 instead of -4, and it looks very similar to yours.
http://www.tannerhelland.com/4660/dithering-eleven-algorithm...
It's referred to as "convolution" in the image processing community too.
http://en.wikipedia.org/wiki/Convolution
Now, to what's happening, you're basically applying a FIR filter to each pixel, so that each one depends also on the frequency information of adjacent pixels (in 2 dimensions)
If someone wants to know more: http://en.wikipedia.org/wiki/Finite_impulse_response http://en.wikipedia.org/wiki/Z-transform
[1] http://en.wikipedia.org/wiki/Gaussian_blur
[2] https://developer.apple.com/library/ios/documentation/Perfor...
Does anyone know which lib (if any) he's using or how it's done? Read the source, couldn't figure it out.