Google OCR

by Zerohertz
Verified

ocr

Extract text from images using Optical Character Recognition (OCR) powered by the Google Cloud Vision API. Input an image file path to retrieve the text content, with optional JSON results saving.

Instructions

Perform Optical Character Recognition (OCR) on the provided image file. Args: path (str): The absolute file path to the image on which OCR will be performed. Returns: str: The extracted text from the image. Raises: Exception: If an error occurs during the OCR process, it will be logged. Notes: - The function uses Google Cloud Vision API for text detection. - If SAVE_RESULTS is enabled, the OCR results will be saved as a JSON file in the same directory as the input image, with the same name but a .json extension.

Input Schema

NameRequiredDescriptionDefault
pathYes

Input Schema (JSON Schema)

{ "properties": { "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "ocrArguments", "type": "object" }

You must be authenticated.

Other Tools from Google OCR

Related Tools

ID: 7xv6wlib4l