Created
May 2, 2017 09:25
-
-
Save mstfldmr/3c812f9e0cb110e328ce7c56740a51bc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from captcha.image import ImageCaptcha | |
from scipy import misc | |
from matplotlib import pyplot as plt | |
import numpy as np | |
capgen = ImageCaptcha() | |
x = np.random.randint(0,99999) | |
im_bytes=capgen.generate(str(x)) | |
img = misc.imread(im_bytes) | |
plt.imshow(np.mean(img,axis=2)) | |
plt.title(str(x)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment