This is a program to convert raster images to sketchy looking vector drawings.
To find lines in the image the program derives two maps from it, one containing the derivative of the pixels in X, the oder in Y direction.
These two maps are used to find the stroke direction by calculating the vector perpendicular to the derivative.
The two derivative maps are combined into a singe map that is used to find edges which are then traced in the stroke direction determined in the previous step.
Afterwards a cleanup method is applied to the lines which removes doubled lines and distributes the density of the removed lines evenly across the new lines.
This way the image does not get significantly lighter even when removing most of the lines.
Conversion time for a 2.5 mega pixel image is about 1-2 seconds.
Input images are read in ppm format to make it easier to use the program with other image filters like the netpbm tools.
License: GPL V3.0