The main sketching code comes from CLD.zip, from http://www.cs.umsl.edu/~kang/Papers/kang_npar07.html - there's a PDF on that page that explains the algorithm, as well as the original CLD.zip. Changes I made to CLD.zip are below. CImg is on Sourceforge: http://cimg.sourceforge.net/reference/group__cimg__tutorial.html I've modified the original program to have access to the CImg library, which at the moment is only supplying code to load images, but other features of this package may be used later, such as direct camera input. The CImg code is entirely within one .h file. The simplest command line is: g++ -o main *.cpp -I/usr/X11R6/include -L/usr/X11R6/lib -lpthread -lX11 which is also in the Makefile. The modified program writes an ascii text file containing the graphic image, which you then should convert to the format of your choice using the "convert" utility from the ImageMagick suite (to be found at: http://www.imagemagick.org/script/index.php with extra useful info at http://www.fmwconcepts.com/imagemagick/tidbits/index.php ) CHANGES needed to get CLD to compile: