
The colors are picked by using an algorithm called a Growing Neural Gas. I use the same algorithm
on many other projects which do similar things.
From step 1, an image is loaded into a buffer, and its pixels are scanned. This is done
in a distributed manner to prevent skewing the color data. Each pixel is fed into the GNG as a 3D vector. The GNG then makes
a model of the distribution. The 'neurons' are connected together by similarity, and when the image is finished being
scanned, the neurons and connections are written out as nodes and edges to a .dot file. This file format is used by the
Graphviz suite made by AT&T Research. Dot is a program within that suite used for creating nice layouts from a list of raw nodes and
connections. The output from Dot is almost identical to what is displayed on these pages -- it is simply anti-aliased first with inkscape.
Click "Next" at the top to see the rest.
|