Can someone explain sharpen in a non-technical way. So, I don't mean that you need to multiply every pixel with 5 and subtract it with the pixel left, under, above and right.
Consider this filter in 1D (for the sake of simplicity):
[-1 1 0]
This filter responds to pixel differences, i.e. edges (left pixel * (-1) + center pixel * 1 + right pixel * 0) which is (center pixel - left pixel).
Response of this filter is positive on rising edges and negative on falling edges.
The filter is not symmetric and hence it will "shift" the image to the left. To make this filter responding to "edge on the left" and "edge on the right" equally, we have to compensate it by similar filter:
[-1 1 0] + [0 1 -1] = [-1 2 -1]
Now this can produce "edge image". We will enhance the edges by adding them to the original image:
[-1 2 -1] + [0 1 0] = [-1 3 -1]
This kernel have sum of 1 and does not produce negative values. It is the desired sharpening kernel.
Summary: Sharpening = edge detection + original image.
Another good explanation is that you enlarge the amount of energy in your image, and then subtract only the low frequencies from your image, thus making the high frequencies more dominant:
4 * [0 1 0] - [1 1 1] = [-1 3 -1] Image Low frequency
It is an old technique known as unsharp masking, known from the age of non-digital photography.
In your case, the filter is 2D, which makes it:
5* [0 0 0 [0 1 0 0 1 0 - 1 1 1 0 0 0] 0 1 0]
As @Libor points out, this operation should not change the total energy. Thus, the sum of the kernel is 1.
For those who are interested, I also explained it in a bit more mathematical way in here. Basically, I show there using inverse matrices that sharpening is the inverse operation of smoothing.
In a fully non-technical way, here is how the sharpen filter could be described:
- an image can be decomposed intuitively in two parts: a low resolution part (that can be ccalled low pass filtered or blurred), and a high resolution part (a.k.a. the details, that include fine details, object boundaries detected by Canny or Sobel operators, etc.)
- given an image, it is simple to build the low resolution part by blurring the image. Intuitively, blur conveys the idea of destroying (hiding) fine details
- given an image, its details can be retrieved by computing the difference between the input image and its blurred version
- finally, once one has an image and its details, the details can be added again to the image in order to emphasize them.
The convolution kernel given in the link in your question does these operations at once and takes care of the proper normalization of the values so that th eoutput dynamic range matches with the input dynamic range.