Hacker News new | past | comments | ask | show | jobs | submit login

Simple solution: feed the image to http://github.com/csdvrx/derasterize

(You may need to edit the characters supported to recognize things like the spades, diamonds and hearts I see on the page)

> So then we can loop over every permutation of background color, foreground color, and character and compare it to the image’s character and pick the one that has the lowest number of mismatched pixels - ideally 0.

This is also the technique used in derasterize, even if we wanted to try funnier things, like a Hough transform to spots the circles (application: a bloom-filter like approach to try the things like ° o O just right where they are needed) or a FFT to isolate zones by grainyness and apply different criterias for a more perceptive approach (application: the Sixel lemur example has fine hair, very thin in pixels but important to keep if the pixels create a line of high intensity given the background color)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: