您好,登錄后才能下訂單哦!
import copy
from PIL import Image,ImageEnhance
im = Image.open('d:/workspace/captcha/0.png')
im = im.convert('RGB')
im4 = Image.open('d:/1.gif')
class ImageSequence:
def init(self, im):
self.im = im
def getitem(self, ix):
try:
if ix:
self.im.seek(ix)
return self.im
except EOFError:
raise IndexError # end of sequence
imS = ImageSequence(im4)
from PIL import ImageDraw,ImageFont
from pytesseract import pytesseract as pt
path = "D:\workspace\captcha\"
img = Image.open(path+"34.png")
img = img.convert("L")
s = pt.image_to_string(img,lang="dt",config="-psm 7")
print(s)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。