尝试使用pytesseract函数(image_to_string)从图像中提取文本,其中一幅图像以某些不同的语言提取文本

时间:2019-04-24 11:57:48

标签: python tesseract

尝试从屏幕快照图像中提取文本,它适用于最大图像,但是对于某些提取某些不同语言的文本

from PIL import Image
import pytesseract
output=pytesseract.image_to_string(PIL.Image.open(r'C:\Users\ab2\Desktop\Use_case\default.png').convert("RGB"), lang='eng')

预期:

Your iphone could not be activated because the activation server is temporarily unavailable. Try connecting your iPhone to iTunes to activate it, or try again in a couple of minutes.

实际:

w

( am cu-nu Not Activate Whune

Your wihrme um‘ um no ac|vvaled
hm, mu m» ,mmmon «ewev vs‘
1emmr,m\\,r mwmxame Try
conn£chr\u JULJ vP\7:me fin mums to
acma(r3r\ m u», again m a Couple‘ 0!
mmu(e~.

H (his woman pnwsv; Lomact
Ar3p\e Supp'.rV.'.1lunp\e cum:<upDur\

H, Aunm

0 个答案:

没有答案