

A Python-based ASCII generator
source link: https://www.tuicool.com/articles/hit/UruIjmI
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

[PYTHON] ASCII generator
Introduction
Here is my python source code for ASCII generator. with my code, you could:
- Given input image, you could generate ASCII art stored under text format (.txt)
- Given input image, you could generate ASCII art stored under image formats (.png, .jpg, ...). In each format, there are 2 options: Black background and white characters, or vice versa
- Given input video, you could generate ASCII art stored under video formats (.avi, .mp4, ...)
Video to video
By running the sript video2video.py with different values for background and mode , we will have following outputs:
Input video
White-background simple-character ASCII output
Black-background simple-character ASCII output
White-background complex-character ASCII output
Black-background complex-character ASCII output
Image to text
By running the sript img2txt.py with different values for mode , we will have following outputs:
Input image
Simple character ASCII output
Complex character ASCII output
Image to image
By running the sript img2img.py with different values for background and mode , we will have following outputs:
Input image
White-background simple-character ASCII output
Black-background simple-character ASCII output
White-background complex-character ASCII output
Black-background complex-character ASCII output
Requirements
- python 3.6
- cv2
- PIL
- numpy
Recommend
-
124
readme.md cows
-
120
README.md [PYTHON] ASCII generator Introduction Here is my python source code for ASCII generator. with my code, you could:
-
56
README.md [PYTHON] ASCII generator Introduction Here is my python source code for ASCII generator. with my code, you could:
-
21
Overview Introduction _ _ _ _ _ _ | | | | ___| | | ___ | | | | |_| |/ _ \ | |/ _ \| | | | _ | __/ | | (_) |_|_| |_| |_|\___|_|_|\___/(_|_) ASCII art has a long history in the hacker culture...
-
5
V2EX › Python Python ascii()函数的逆操作 MiketsuSmasher · 1 天前 · 515 次点击
-
13
Damn Simple PHP ASCII Art Generator So yesterday I was bored and asked my friend what I should do. She replied "I don't know, draw ASCII art or something!" and sitting there with the terminal open I kind of wondered what it would...
-
8
Welcome to Simple Table (stable) What is 'stable'? stable can create ascii table from; structs struct arrays json encoded byte arrays string interface maps string interface ma...
-
5
In this Python tutorial, you will learn how to get the ASCII value of a character and vice-versa. Table Of Contents Let’s dive into the tutorial. Get ASCII value...
-
11
Python Program to print ASCII Value of a CharacterSkip to content
-
8
术→技巧, 研发 使用Python将图片转化为ASCII字符...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK