0
ID証明書などの情報を文書から抽出するために、Google Cloud Vision Python APIを使用してOCRを実行しています。テキストが集中している部分だけが保持されるように画像をトリミングする方法はありますか?私はcropHintを使ってみましたが、単に枠線を削除しました。OCR with Google Cloud Vision python API
私のコード内の関数は多少のようである:
def detect_text(path):
"""Detects text in the file."""
vision_client = vision.Client()
with io.open(path, 'rb') as image_file:
content = image_file.read()
image = vision_client.image(content=content)
texts = image.detect_text()