home page
Message Board
About us
Friendly Links
Search
one
Using idle mobile phones to build a local WEB environment+ngrok intranet penetration to achieve external network access
49675 Reading
two
Xiaomi 8 installs Google Play service suite
32601 Reading
three
The single player landlords' non networked green version is suitable for the elderly
25565 Reading
four
Chinese and English names of 224 countries in the world
22874 Reading
five
Emlog, wordpress, typecho articles, whether Baidu has included detection codes
17116 Reading
Default classification
Source code tutorial
Life essay
Code Notes
Sign in
Search
Tag Search
SSL
vps
CentOS
AppNode
Intranet penetration
Node.js
Hairpin
GitHub
python
Google Voice
Local environment
Linux panel
Google Play
MarkDown
Vue
yarn
Small shop
Applet
Remote Desktop
frp
www.9ywk.com
Accumulated writing
seventy-five
Articles
Accumulated receipt
sixty-four
Comments
home page
column
Default classification
Source code tutorial
Life essay
Code Notes
page
Message Board
About us
Friendly Links
Search to
two
Article and
Results for
2020-12-21
Convert video to character video through Python
{dplayer src="
https://cdn.9ywk.com/wx/ywx.mp4
"/} Principle: Export every picture of the video, convert every picture to ASCII code, synthesize the converted ASCII code picture to video, Python installation can refer to this article
https://www.9ywk.com/Python.htmlPython
The library to be installed opencvpip3 install opencv pythonbillowpip3 install pillow After installing the library, place the video in the folder of the py script and modify the video_
If the parameter after path is your video path name, you can run if__
name__ == '__
main__':
video_
path = 'video/heiren.mp4'
save_
pic_
path = 'cache_
pic'
save_
charpic_
path = 'cache_
The default exported video for char is. avi format. You can modify about 107 lines of code, such as mp4video_
Writer=VideoWriter ('video/new_char_video. mp4 ', source code
https://github.com/hongcyu/char_painting
Finally, it is explained that the script does not process audio, but can be processed by other software.
Reference:
https://hongcyu.cn/posts/opencv-pictovideo.html
December 21, 2020
1201 Reading
0 Comments
0 likes
2020-12-20
Windows Install Python
Python installation
https://www.python.org
Download the Python program on the official website to install it. Tick both option boxes below, and then click Customize installation to enter the next step Add Python
To PATH # Add an environment variable, check the Install for all users option, and leave the other options as default. Click Browse, and select the installation directory according to your needs,
Click Install to install part of the command CMD window Execute python - V to view the version where python views the installation location pip list or pip freeze to view the installed library pip uninstall library name uninstall the installed library pip list -- updated to view the updatable third-party library pip install -- upgrade library name Update the library if it appears is not an internal or external command
Check whether the system variable is added. Generally, the system variable path will be automatically added: My Computer - Properties - Advanced System Settings - Environment Variables - System Variables - Pathip The installation of the library is slow?
The libraries we install are all downloaded from foreign sources. Sometimes the download is only tens of kb/s for line and other reasons. We can switch the source to domestic sources for download.
Common domestic source of pip: Alibaba Cloud
https://mirrors.aliyun.com/pypi/simple/
University of Science and Technology of China
https://pypi.mirrors.ustc.edu.cn/simple/
Douban
https://pypi.douban.com/simple/
Tsinghua University
https://pypi.tuna.tsinghua.edu.cn/simple/
University of Science and Technology of China
https://pypi.mirrors.ustc.edu.cn/simple/
When using, add the - i parameter, for example: pip install library name-i
https://mirrors.aliyun.com/pypi/simple/
December 20, 2020
1192 Reading
0 Comments
0 likes
//