Word Portraits visualization [closed]
Asked Answered
D

1

2

I stopped by this visualization and it's called Word Portrait:

enter image description here

My question is: how to do something like this? Is there a tutorial or a paper that describes this?

Delicate answered 22/5, 2014 at 10:54 Comment(0)
O
3

I newer saw this but I did bitmap to ASCII art converter in the past which is similar. so from my point of view I see it like this:

  1. take gray-scale image and segmentate it (by rectangle areas with fixed aspect ratio)

    Aspect ratio is given by input text phrase and Font used. This will give you list of rectangles with similar colors so compute average color for them. Also a good idea is to limit min and max size of segments

    • too small rectangles are unreadable
    • too big rectangles are ugly (see the biggest GENIUS)
  2. replace rectangle segments by text

    Font size is limited by filled area (rectangle size) so text will fit into it. Average color of text should be the same as average color of rectangle segment

    text_color=rectangle_avg_color*(ink_pixels+paper_pixels)/ink_pixels
    

    ink_pixels and paper_pixels are the count of pixels in rendered text phrase. If you want to implement colored images then just compute R,G,B values separately and blend it together or segmentate by colors and intensities at once

See Image to ASCII Art conversion it may help you got some new ideas ...

Occasionally answered 23/5, 2014 at 8:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.