Concept

As the name implies, edge detection is a way to detect edges in images. The most common approach is to blur the input image, convole it with the sobel matrices to get the derivatives in x and y direction, calculate the magnitude of these, and the filter out by a threshold. For a more in-depth explanation, there are many in-depth articles about the sobel-operator.

Implementation (sobel.h , sobel.cpp)

We basically follow the standard implementation (which was originally written as an exercise for the programming 2 course), but instead of the actual image, we render 3 different additional images:
1: A depth image, in which the distance to the camera is encoded as a value (for display purposes we scale it to [0,1] and render it as grey-scale. the actual code uses the actual distance values)
2: A differential image (just a fancy name for an image in which each object is shaded in a solid but unique Color)
3: A normal Map, an image in which the surface normal of an intersection is encoded as an RGB-value, onn which we apply edge-detection on each color channel (and thus direction) separately
Together, with these images we're able to catch the outlines of our Objects with extreme accuracy, resulting in a well defined black outline.
We use this in the image to properly outline the Ladies, as well as the Motorcycle, tough the latter is not cell shaded, we tought it looks better that way.

The images we use for edge detection in the named order