0
OCR用GoogleのCloud Vision APIを使用します。 Pythonのサンプルコードhereを使用して、我々が持っている:私は私のAPIキーを入れてくださいGoogle Cloud Vision APIではAPIキーはどこにありますか?
def detect_text(path):
"""Detects text in the file."""
client = vision.ImageAnnotatorClient()
with io.open(path, 'rb') as image_file:
content = image_file.read()
image = types.Image(content=content)
response = client.text_detection(image=image)
texts = response.text_annotations
print('Texts:')
for text in texts:
print('\n"{}"'.format(text.description))
vertices = (['({},{})'.format(vertex.x, vertex.y)
for vertex in text.bounding_poly.vertices])
print('bounds: {}'.format(','.join(vertices)))
を?私は(明らかに)それなしでは認証できません。 docsから