A toy command-line utility to approximate an image using a fixed set of glyphs.
glyphify <glyphs> <image>
For a start, lets redraw an image with just zeros and ones:
glyphify matrix examples/rose.jpg
The dot glyphset has just a single dot glyph, and more than the default 2500 of these are needed to compose a larger picture:
glyphify dot examples/landscape.jpg -n 20000
For a very sharp image and complex glyphs we need more extensive search and a looser acceptance condition:
glyphify math examples/euler.jpg -q 30000 --min_value -2.7
You could also add --min_opacity 1
to avoid the symbolic background. Or try
glyphify --help
for a full list of options.
Make sure you have LuaJIT and Torch installed and type:
luarocks install glyphify
The code is licensed under MIT. The included glyphs were extracted from DejaVu Serif font which is covered by a generous license.