Cloud Vision Actions
Cloud Vision Actions are used to interact with the Google Cloud Vision API, enabling text recognition and extraction from images.
Actions
cloud_vision.image_to_text
Extracts text from an image using the Google Cloud Vision API.
Parameters:
image_path – Path of the image file to be processed.
credentials_path – Path of the Google Cloud Vision credentials file (.json
).
Return:
text_boxes – Dictionary containing detected text as keys and their bounding box coordinates as values, in the format:
where (x1, y1)
is the top-left coordinate and (x2, y2)
is the bottom-right coordinate of the text area.
Exceptions:
- ConnectionException – Raised if the connection to the Google Cloud Vision API fails or the credentials are invalid.
- ImageNotFoundException – Raised if the provided image file cannot be found.