十行代码实现营业执照的OCR识别
作者:互联网
# -*- coding: utf-8 -*- from aip import AipOcr """ 你的 APPID AK SK """ APP_ID = 'xxx' API_KEY = 'xxx' SECRET_KEY = 'xxx' client = AipOcr(APP_ID, API_KEY, SECRET_KEY) def get_file_content(filePath): with open(filePath, 'rb') as fp: return fp.read() img_loc ='./1611310671779.jpg' image = get_file_content(img_loc) message = client.businessLicense(image) words_result = message['words_result'] for i in words_result: print(i + ':' +str(words_result[i]['words']))
标签:xxx,words,image,营业执照,十行,AipOcr,result,KEY,OCR 来源: https://www.cnblogs.com/gelc-sgcc/p/14314761.html