image_test.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:base_function 作者: Rockyzsu 项目源码 文件源码
def image_recognize():
    import pytesseract
    from PIL import Image

    class GetImageDate(object):
        def m(self):
            image = Image.open("data/0.jpg")
            text = pytesseract.image_to_string(image)
            return text

        def SaveResultToDocument(self):
            text = self.m()
            f = open(u"Verification.txt", "w")
            print text
            f.write(str(text))
            f.close()

    g = GetImageDate()
    g.SaveResultToDocument()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号