Created
May 23, 2017 13:38
-
-
Save opparco/6026a7498a14bc586ac2e71a799ffcb0 to your computer and use it in GitHub Desktop.
ドット絵こんばーたをローカル環境で動かす
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# pixelate.py | |
# | |
# https://github.com/tsutsuji815/pixel_convert | |
# | |
# pip install opencv-python | |
# pip install Pillow | |
from pixel import make_dot | |
import cv2 | |
if __name__ == '__main__': | |
import sys | |
img_path = sys.argv[1] | |
img_res = make_dot(img_path, k=16, scale=3, blur=50, erode=1) | |
result_path = 'out.png' | |
cv2.imwrite(result_path, img_res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment