A chat with Mikey about image processing over the weekend inspired me to play with some of the edge-detection code I wrote some time ago. It does (Sobel) edge detection on the separate RGB components of a video signal (from a little logitech webcam, using the qce-ga kernel module), colours the edges and merges each channel back to the original image to be displayed in an X window.

The edge detection algorithm is fast enough to process the 8-frame-per-second video in real time - it's quite cool to see the "line drawing" respond to actions in the scene.

The speckling on the right of the image is caused by camera noise - it'd be good to perform a dilation/erosion operation on the image before the edge detection (to remove small regions like this), but I haven't managed to do that fast enough to process the image on the fly... yet.