
Show HN: ASCII Art with Overstrike - inguz
https://github.com/hughpyle/ASR33/blob/master/asciiart/README.md
======
cryptonector
Overstrike makes ASCII the first multi-byte encoding of an internationalized
character set (for the Latin family of scripts anyways).

I'm not kidding. The ASCII character set was actually designed to permit
overstriking to yield a variety of characters such as, e.g., &aacute;. But of
course, this follows from the fact that the typefaces used in typewriters were
so designed. Historically that is how people wrote characters like &aacute;
and &ccedil; back in the age of typewriters. This is also why Spanish rules
made accents on capital letters optional: it wasn't easy to typeset those on
typewriters.

The way to encode &aacute;, then, was: a BS ' (a, backspace, apostrophe).

Do I have sources for this? I've lost track of them, and I'm not going to look
just now...

~~~
inguz
There's a text-printer 'Cedilla'
([https://www.irif.fr/~jch/software/cedilla/](https://www.irif.fr/~jch/software/cedilla/))
that uses this composition across large parts of Unicode - to quite good
effect it seems.

The Teletype doesn't do backspace (!) but can do carriage-return... so e.g. to
print "Björk" , the text is: BJORK(CR)(space)(space)(quote). I have a Teensy
microcontroller that already handles some ANSI-escape characters, and
implements the 'backspace' ^[[D this way
([https://github.com/hughpyle/ASR33/blob/master/firmware/ansi_...](https://github.com/hughpyle/ASR33/blob/master/firmware/ansi_escape.cpp)).
Next on the backlog is "bold", using a similar strategy. Fun times :)

------
clusmore
This is awesome. You might want to add "Printed" to the front of your title,
because I've seen quite a few ASCII art projects before and almost skipped
over this, but the fact that it's printed is quite novel to me at least.

------
333c
The "sub-character pixels" are such a clever idea! Nice work.

~~~
dukoid
Shameless plug: Done here for displaying images in modern terminals:
[https://github.com/stefanhaustein/TerminalImageViewer](https://github.com/stefanhaustein/TerminalImageViewer)

I was wondering if I should try this for a more complete set of unicode
characters (opposed to just block graphics), but I'd need find a good way to
match slightly off positioning. Perhaps just register the same character
multiple times, shifted by one px in each direction?

~~~
inguz
Nice!

------
symisc_devel
[https://art.pixlab.io](https://art.pixlab.io) does something similar using ML
oriented approach (decision tree).

~~~
inguz
Very interesting - thanks for the link. (This is exactly what I hoped HN would
show me!)

Several interesting things there. The use of Structured Similarity Index
(SSIM) is probably better/faster than the Histogram of Oriented Gradients
(HOG) that my project uses. And then, at runtime, I'm still doing a brute-
force match (which is really slow) -- clearly there are big performance gains
to be made by training a classifier.

Their results are really good!

~~~
inguz
After some more investigation... their paper is interesting. But: it's $25 to
download their model file, and the trainer code and training dataset aren't
published. Oh well.

------
newsch
Wow, those are some impressive results! I've been wanting to do some ascii art
on a dot-matrix printer for a little while now, and I was thinking of
something similar to your "sub-pixel rendering" but had no idea how to
research/implement it. I look forward to reading through your code and
references more, and I really appreciate the history that you've written up
here.

------
nebgnahz
Related and fun:
[https://www.cse.cuhk.edu.hk/~ttwong/papers/asciiart/asciiart...](https://www.cse.cuhk.edu.hk/~ttwong/papers/asciiart/asciiart.html)

~~~
inguz
Very very cool. I love their approach of looking for similarity metrics that
are less sensitive to local misalignment, and this is something I'me very
interested in exploring in the future.

I'm not completely convinced by their distinction between "tone-based" and
"structure-based", though. When they talk about structure, it seems to
primarily mean 'edges'. Instead maybe a more useful distinction would be
between "local optimization" (at the level of a single printed character), and
optimizing "globally" or over a wider area of the image, and so allowing an
iterative optimizer to find a really compact representation.

~~~
inguz
A little more digging turned up a recent paper that uses Histogram of Oriented
Gradients (HOG) along with neural-network training:
[http://www.jsoftware.us/vol13/355-SE3002.pdf](http://www.jsoftware.us/vol13/355-SE3002.pdf)

------
terramex
You chose some great albums covers to showcase your project!

~~~
inguz
Thanks :)

------
kcmastrpc
Sweet!

