google-cloud-vision

Google Cloud Vision API - TEXT_DETECTION

99封情书 提交于 2019-12-23 12:06:23
问题 When i try to recognize a text in image, like the italian word "Perchè", Vision API get back the word "Perche" (give back the "e" and not the correct one "è"). I don't want to use languageHints to try to obtain better results because i've to do OCR Recognition across different language. What is the problem here? 回答1: This is known issue with the Cloud Vision API when you don't use language hints. You can see the actual bug report here. It is in state accepted , but there seems to be radio

Text extraction - line-by-line

夙愿已清 提交于 2019-12-23 10:58:26
问题 I am using Google Vision API, primarily to extract texts. I works fine, but for specific cases where I would need the API to scan the enter line, spits out the text before moving to the next line. However, it appears that the API is using some kind of logic that makes it scan top to bottom on the left side and moving to right side and doing a top to bottom scan. I would have liked if the API read left-to-right, move down and so on. For example, consider the image: The API returns the text

Python resize image and send to google vision function

懵懂的女人 提交于 2019-12-22 12:20:12
问题 Since google vision has some restrictions on input image size, I want to first resize input image and then use the detect_labels() function. Here's their sample code def detect_labels(path): """Detects labels 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) labels = image.detect_labels() print('Labels:') for label in labels: print(label.description) they use io to open the image

Google Cloud vision API: “Request had insufficient authentication scopes.”

本小妞迷上赌 提交于 2019-12-19 07:29:28
问题 Hi I'm trying to use google's cloud vision API, specifically this example: https://cloud.google.com/vision/docs/label-tutorial#label_tutorial_1 I followed this tutorial: https://cloud.google.com/vision/docs/getting-started#set_up_a_service_account for setting up a service account but when I run my code I get: googleapiclient.errors.HttpError: <HttpError 403 when requesting https://vision.googleapis.com/$discovery/rest?version=v1 returned "Request had insufficient authentication scopes."> Can

Google cloud vision not accepting base64 encoded images python

陌路散爱 提交于 2019-12-19 03:22:00
问题 I'm having a problem with base64 encoded images sent to Google Cloud Vision. Funny thing is that if I send the image via URI, it works fine, so I suspect there is something wrong the way I'm encoding. Here's the deal: from google.cloud import vision import base64 client = vision.ImageAnnotatorClient() image_path ='8720911950_91828a2aeb_b.jpg' with open(image_path, 'rb') as image: image_content = image.read() content = base64.b64encode(image_content) response = client.annotate_image({'image':

How to properly set up Google cloud vision on my localhost in PHP?

依然范特西╮ 提交于 2019-12-13 20:20:02
问题 I want to use Google cloud Vision for detecting image properties. I have created an account with Google Cloud and found the exact solution on one of their code snippet here (https://cloud.google.com/vision/docs/detecting-properties#vision-image-property-detection-gcs-php). I copied and adjust it to what I want to achieve. I installed their package using composer google/cloud-vision . So here is my code: <?php namespace Google\Cloud\Samples\Vision; use Google\Cloud\Vision\VisionClient;

How to call for “Label Detection” and “Safe Search Detection” at a time on Google Cloud Vision API

拟墨画扇 提交于 2019-12-13 03:57:34
问题 I would like to ask you the the following thing about Vision API. The following picture indicates that I can take on "Free with Label Detection, or $1.50", if I will use "Label Detection". But, I didn't find out how to use both of them at the same time in a tutorial on "Label Detection" and "Safe Search Detection" both. Can I use both of services at a time in Python? If so, how can I call for them? I will really appreciate that if you tell me. 回答1: In case you want to send both types at the

Detecting content in Google Cloud Vision for .NET does nothing/hangs app

这一生的挚爱 提交于 2019-12-13 03:55:49
问题 I just started playing around with Google Cloud Vision a bit. I wanted to detect text in an image. Inspired by the official docs (e.g. https://cloud.google.com/vision/docs/detecting-text and https://cloud.google.com/docs/authentication/production) I created a new project, attached the Vision API to it, created a service account and downloaded the credentials/key-JSON file, set up an VS project and got all relevant packages from NuGET. My code looks like this: using System; using System

Google Cloud Vision Api only return “name”

跟風遠走 提交于 2019-12-13 03:40:08
问题 I am trying to use Google Cloud Vision API. I am using the REST API in this link. POST https://vision.googleapis.com/v1/files:asyncBatchAnnotate My request is { "requests": [ { "inputConfig": { "gcsSource": { "uri": "gs://redaction-vision/pdf_page1_employment_request.pdf" }, "mimeType": "application/pdf" }, "features": [ { "type": "DOCUMENT_TEXT_DETECTION" } ], "outputConfig": { "gcsDestination": { "uri": "gs://redaction-vision" } } } ] } But the response is always only "name" like below: {

How to use google cloud vision along with unity for recognising text using mobile camera?

ぐ巨炮叔叔 提交于 2019-12-13 03:26:31
问题 I am testing on a project on how to read text from objects and pictures using google cloud vision.Using mobile camera(iphone,ipad preferably or android phones)I would like to get the required text.Samsung bixby application is an example.After some reading I found out about OpenCV for unity and Google cloud vision.OpenCV for unity is around 95$.For testing I cannot use it.So I took the other option. I downloaded this project. Github project .I created a google cloud vision api key and added to