Lumas
Lumas

Reputation: 41

Google Vision API with Google Cloud Storage

I thank you ahead for your advice and help.

I am currently trying to use GCP functions such as Vision API and Google Cloud Storage.

Here is my questions

  1. Is it possible to upload image saved on local desktop to Google Cloud Storage through base 64 encoding?

  2. If possible, Is it also possible to call the GCP Vision API for the image stored in GC Storage?

  3. After getting returned values from the API call, Is it possible to modify the original image in the storage? like, after getting the text position(JSON) on the image from Document_text_detection function I want to draw some boxes on the original image and save the modified image on the storage.

If you have any related resources please enlighten me!!

thank you again!

Upvotes: 0

Views: 257

Answers (1)

Pavan Kumar Kattamuri
Pavan Kumar Kattamuri

Reputation: 335

You can use Cloud Functions to automate this process.

  1. Create a Cloud Function which will be triggered by Storage event
  2. Cloud function calls the Vision API for this image, retrieve the response back
  3. Do whatever processing you want on the original image using these results and save it back in another bucket(to prevent Cloud Function getting triggered on the modified image)

Upvotes: 0

Related Questions