写了一个好玩的脚本,图片转为文本文件

2018-04-25 13:22:20 +08:00
 hellolleh

Image transfer to txt

--

Usage

$ python3 img_to_txt.py [file/url] [size]

Example

$ python3 img_to_txt.py http://ocas9civ7.bkt.clouddn.com/jzm.jpg

This command executed, you will get a file in current folder named out.txt, and you will watch a string output in the console:

Github 地址

https://github.com/yaochao/img_to_txt

9268 次点击
所在节点    Python
55 条回复
lhx2008
2018-04-25 13:27:24 +08:00
+1,可以搞个 web 版的
NicholasWangC
2018-04-25 13:31:17 +08:00
好东西,我选 jp2a
silhouette
2018-04-25 13:31:55 +08:00
+1s
frank611
2018-04-25 13:33:42 +08:00
实现原理可以介绍下么?
duan602728596
2018-04-25 13:52:01 +08:00
吼啊
wanderlustLee
2018-04-25 13:54:44 +08:00
兄弟要被查水表了
ssshooter
2018-04-25 13:54:53 +08:00
Patrick95
2018-04-25 13:56:16 +08:00
图片转字符画的 Python 项目在 GitHub 上已经有好多好多啦。
pyufftj
2018-04-25 13:59:03 +08:00
这个人缺一副眼镜
hellolleh
2018-04-25 13:59:24 +08:00
@frank611 原理,很简单,通过图片的像素,转为响应的字符,颜色越深,字符越密集,所谓的密集就是 @#一类的字符,不密集就是.,;一类的字符。
Hopetree
2018-04-25 14:15:33 +08:00
可以,下午茶有了,记得来取
shijingshijing
2018-04-25 14:17:41 +08:00
月底了本来已经没名额了,楼主我还是想办法帮你弄了个名额,你在四月名单上了
lulinux
2018-04-25 14:22:31 +08:00
莫不是内个膜法大师?
meik2333
2018-04-25 14:25:07 +08:00
我之前也写了一个,把视频转换为字符画的:
https://github.com/MeiK-h/Video2Char
Tink
2018-04-25 14:31:49 +08:00
ivencooli
2018-04-25 14:55:49 +08:00
本来四月份的枪毙名单已经满了.我已经托关系把你放进去了
shijingshijing
2018-04-25 14:59:11 +08:00
@Tink 这个厉害了
Tink
2018-04-25 15:09:38 +08:00
@shijingshijing #17 233 试试

curl aoaoao.me:1926
moxiaonai
2018-04-25 18:47:17 +08:00
ob
2018-04-25 19:02:05 +08:00
还有动画版的

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/449707

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX