ASCII characters are not pixels: a deep dive into ASCII rendering. https://alexharri.com/blog/ascii-rendering
ASCII characters are not pixels: a deep dive into ASCII rendering

A look at how I used shape vectors to achieve sharp, high-quality ASCII rendering.

@pervognsen wow, very nice, when I'm actually doing terminal rendering these days 🤩

@pervognsen I had a similar thing. From the commit message:

This utility splits the input image to some number of font cell sized blocks. Then, for each block it searches for two dominant colors. When the colors are found, it iterates through every character in font to find one that gives the best approximation of the original image block.

It was offline, so brute force search was ok. K-means were used to find the two colors, in Lab.

@wolfpld For animation with content like your image I can imagine it'd get really noisy (temporally unstable) since you're undersampling so much relative to the high frequency content in the source image. The case in the article is only really optimizing for solid shapes with sharp edges. I'm curious how the article's method would fare with something like that tree--maybe it's okay?

@pervognsen Well, there's the aalib, and libcaca (http://caca.zoy.org/wiki/libcaca) if you also want color. These were everywhere back when people still thought this Windows 95 everything is graphics thing will not catch on – video players, quake ports, and so on.

I only took a cursory look at the article, so I can't comment too much about the method, but it doesn't look that temporally stable to me. The stability that is there is due to limited amount of characters used.

libcaca – Caca Labs

@wolfpld To be clear, I meant that I don't think the high quality in the article would hold up for high frequency textured images, i.e. it would not be temporally stable.

@pervognsen I see he uses 6 sampling areas to approximate the letter shape. This is basically blurring, so the highest frequencies go away.

In my solution I used a proxy 8x8 font with which I calculated error for every pixel of the block. This was not ideal, as in the actual game you had a selection of variety of high-resolution monospace fonts. The font in game also has a shadow, and that had to be included in the error calculation.

@pervognsen "Sometimes magic is just someone spending more time on something than anyone else might reasonably expect." - Teller.
@pervognsen Nice to see some more scientific approaches to this. Mine have always been more like "I feel this should work better" and then experimenting. https://solhsa.com/textfx/
solhsa.com - stuff

@pervognsen is it so hard to find pictures of Saturn that we need to use AI to generate them?
@cuddle_puddle @pervognsen It’s not like ESA and NASA provide public domain images of every planet and a tonne of galaxies in 8k… oh wait they do.
@pervognsen Am I the only one who immediately got "A pixel is not a little square" ticks from reading the title?