识别助手手写字体的文字软件高精度版

行业软件 2020-04-04 18:02:37

识别助手手写字体的文字软件高精度版

""" 调用通用文字识别(高精度版) """

# client.basicAccurate(image)
@staticmethod
def gettext(filePath):
#print(filePath)
image = get_text.get_file_content(filePath)
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
options["probability"] = "true"

""" 带参数调用通用文字识别(高精度版) """
response = client.basicAccurate(image, options)
#print(response)
#data = response['words_result'][0]['words']
content = []
for info in response['words_result']:
#print(info['words'])
content.append(info['words'])
return content

if __name__ == '__main__':
get_text.gettext('D:/PycharmProjects/baiduaipOcr/example.jpg')