【问题标题】:How to search numbers, letters as well as alphanumeric from an image?如何从图像中搜索数字、字母和字母数字?
【发布时间】:2020-03-23 18:29:52
【问题描述】:

我想做的是图像识别

  1. 给定图像 (5000 × 3500) 尺寸(白色背景)

  2. 图像将有几何图形以及字母数字

  3. python 会做识别。

【问题讨论】:

    标签: python-3.x scipy python-imaging-library image-recognition scipy.ndimage


    【解决方案1】:

    只需使用pytesseract 库即可解决您的问题。

    首先使用以下 pip 命令安装必要的库:
    pip install pytesseract, Pillow

    成功完成后,就可以运行以下代码了。

    try:
        from PIL import Image
    except ImportError:
        import Image
    import pytesseract
    
    print(pytesseract.image_to_string(Image.open('test.png')))
    

    【讨论】:

      猜你喜欢
      • 2016-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多