Google Cloud Vision
App · 5 actions
Extract text, labels and other annotations from images and documents.
Actions
| Action | What it does |
|---|---|
| Annotate an image | Read text or detect objects and other features. |
| Annotate document pages | Extract document text from up to five pages of a Cloud Storage file. |
| Annotate image URLs | Apply the same detection features to a batch of image URLs. |
| Get extraction status | Read progress for an asynchronous Vision job. |
| Start document text extraction | Start extracting text and write the output to Cloud Storage. |
Annotate an image
Read text or detect objects and other features.
Inputs
- Image URL
image_urltextRequired - An HTTPS image URL or a Cloud Storage URI.
- Features
featureslistRequired - Choose the types of annotations to return.One or more of:
FACE_DETECTION(Face detection),LANDMARK_DETECTION(Landmark detection),LOGO_DETECTION(Logo detection),LABEL_DETECTION(Label detection),TEXT_DETECTION(Text detection),DOCUMENT_TEXT_DETECTION(Document text detection),SAFE_SEARCH_DETECTION(Safe search detection),IMAGE_PROPERTIES(Image properties),CROP_HINTS(Crop hints),WEB_DETECTION(Web detection),OBJECT_LOCALIZATION(Object localization). - Language hints
language_hintslist - Language codes to help text recognition.
- Max results
max_resultsnumber - Maximum results per supported annotation type.At least 1.
Outputs
dataobject- The response from Google Cloud Vision.
Example output
{
"data": {
"responses": [
{
"cropHintsAnnotation": {},
"error": {},
"faceAnnotations": [
{}
],
"fullTextAnnotation": {},
"imagePropertiesAnnotation": {},
"labelAnnotations": [
{}
],
"landmarkAnnotations": [
{}
],
"localizedObjectAnnotations": [
{}
],
"logoAnnotations": [
{}
],
"safeSearchAnnotation": {},
"textAnnotations": [
{}
],
"webDetection": {}
}
]
}
}Annotate document pages
Extract document text from up to five pages of a Cloud Storage file.
Inputs
- Source
sourcetextRequired - The gs:// URI of a file in Cloud Storage.
- Mime type
mime_typetextRequired - The file format.One of:
application/pdf,image/tiff,image/gif. - Pages
pageslist - Page numbers to read. Leave empty to read the first five pages.
Outputs
dataobject- The response from Google Cloud Vision.
Example output
{
"data": {
"responses": [
{
"responses": [
{
"cropHintsAnnotation": {},
"error": {},
"faceAnnotations": [
{}
],
"fullTextAnnotation": {},
"imagePropertiesAnnotation": {},
"labelAnnotations": [
{}
],
"landmarkAnnotations": [
{}
],
"localizedObjectAnnotations": [
{}
],
"logoAnnotations": [
{}
],
"safeSearchAnnotation": {},
"textAnnotations": [
{}
],
"webDetection": {}
}
],
"totalPages": 1
}
]
}
}Annotate image URLs
Apply the same detection features to a batch of image URLs.
Inputs
- Image URLs
image_urlslistRequired - Up to 16 HTTPS image URLs or Cloud Storage URIs.
- Features
featureslistRequired - Choose the types of annotations to return.One or more of:
FACE_DETECTION(Face detection),LANDMARK_DETECTION(Landmark detection),LOGO_DETECTION(Logo detection),LABEL_DETECTION(Label detection),TEXT_DETECTION(Text detection),DOCUMENT_TEXT_DETECTION(Document text detection),SAFE_SEARCH_DETECTION(Safe search detection),IMAGE_PROPERTIES(Image properties),CROP_HINTS(Crop hints),WEB_DETECTION(Web detection),OBJECT_LOCALIZATION(Object localization). - Language hints
language_hintslist - Language codes to help text recognition.
- Max results
max_resultsnumber - Maximum results per supported annotation type.At least 1.
Outputs
dataobject- The response from Google Cloud Vision.
Example output
{
"data": {
"responses": [
{
"cropHintsAnnotation": {},
"error": {},
"faceAnnotations": [
{}
],
"fullTextAnnotation": {},
"imagePropertiesAnnotation": {},
"labelAnnotations": [
{}
],
"landmarkAnnotations": [
{}
],
"localizedObjectAnnotations": [
{}
],
"logoAnnotations": [
{}
],
"safeSearchAnnotation": {},
"textAnnotations": [
{}
],
"webDetection": {}
}
]
}
}Get extraction status
Read progress for an asynchronous Vision job.
Inputs
- Operation ID
operation_idtextRequired - The full operation name from the extraction step or its ID.
Outputs
dataobject- The response from Google Cloud Vision.
Example output
{
"data": {
"done": true,
"error": {},
"metadata": {},
"name": "example",
"response": {}
}
}Start document text extraction
Start extracting text and write the output to Cloud Storage.
Inputs
- Source
sourcetextRequired - The gs:// URI of the input file.
- Mime type
mime_typetextRequired - The file format.One of:
application/pdf,image/tiff. - Destination
destinationtextRequired - The gs:// folder for the output JSON files.
Outputs
dataobject- The response from Google Cloud Vision.
Example output
{
"data": {
"done": true,
"error": {},
"metadata": {},
"name": "example",
"response": {}
}
}