Word肖像可视化 [英] Word Portraits visualization

查看:142
本文介绍了Word肖像可视化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我停止了这个可视化,它被称为Word Portrait:

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

我的问题是:如何做这样的事情?有没有一个教程或论文描述这个?

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

推荐答案

我更新看到这个,但我在ASCII艺术转换器过去是相似的。所以从我的角度来看,我看到这样:

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. 采取灰度图像并分割它(具有固定宽高比的矩形区域)

  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


  • 太小的矩形不可读

  • 太大的矩形丑陋(见最大的GENIUS)

通过文本替换矩形片段

字体大小受填充区域(矩形大小)的限制,因此文本将适合。文字的平均颜色应与矩形片段的平均颜色相同

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 paper_pixels 是渲染文本短语中的像素数。如果要实现彩色图像,那么只需单独计算R,G,B值,并将其混合在一起,或按照颜色和强度进行分割。

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

请参阅图像到ASCII艺术转换,它可能帮助你得到一些新的想法...

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

这篇关于Word肖像可视化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆