A machine learning approach to ASCII art rendering