import tesserocr
from PIL import Image

#新建Image对象
image = Image.open('code.png')
#调用tesserocr的image_to_text()方法,传入image对象完成识别
result = tesserocr.image_to_text(image)
print(result)
a=''
for line in result:
  if line.split():
    line = line.rstrip()
    a=a+line
print(a)



# if result == '4VC7':
#     print('true')
# else:
#     print('false')

相关文章:

  • 2022-12-23
  • 2021-12-07
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-11
  • 2022-12-23
  • 2021-10-22
  • 2022-01-18
  • 2022-01-09
  • 2021-10-29
相关资源
相似解决方案