google-vision

How to use the Google Vision API for text detection from base64 encoded image?

浪尽此生 提交于 2019-12-11 07:26:37
问题 I am having a base64 encoded image. imageData = 'data:image/png;base64,iVBORw0rrfwfwHReger32QRQWr...' How I should proceed for text detection with google cloud vision python library? My Code looks like : from google.cloud import vision client = vision.Client() imageData = 'data:image/png;base64,iVBORw0rrfwfwHReger32QRQWr...' image = client.image(content=imageData) texts = image.detect_text() print texts[0].description 回答1: Use the Cloud Client library for Python vision as demonstrated here.

How to Detect Words with TextRecognizer? It can only detect TextBlocks

泄露秘密 提交于 2019-12-11 07:23:49
问题 I am able to detect TextBlock like Cyan color block in below image but I want to detect Word with TextRecogniger 回答1: If you have a look at the reference (https://developers.google.com/android/reference/com/google/android/gms/vision/text/TextBlock), you will see that in the recognized block you will have a list of lines which has a list of elements. Then you should get the word in your Processor class with something like this: @Override public void receiveDetections(Detector.Detections

How can I add zoom in/out gesture in Android vision CameraSource

最后都变了- 提交于 2019-12-11 04:37:59
问题 I'm trying to develop a simple camera app with face detection and i'm using android-vision sample from here https://github.com/googlesamples/android-vision/tree/master/visionSamples/FaceTracker Everything is working fine and i need to add zoom in/out feature in it. I searched SO but found nothing related to vision. Every answer is related to Camera2. 回答1: You might try startSmoothZoom: https://developer.android.com/reference/android/hardware/Camera.html#startSmoothZoom(int) You'd need to

Android Vision - Reduce bar code tracking window

隐身守侯 提交于 2019-12-09 09:25:41
问题 I'm trying to implement Google Visions scanner into an app im working on. By default its a full screen activity and barcodes are tracked over the entire screen. However, I need a fullscreen camera but with a limited scanning window. For example, the surface view for the camera needs to be fullscreen, it has 2 transparent overlays set to 35% of the screen height top and bottom leaving a 30% viewport in the center. I have changed the graphic overlay so it will only display in the middle

Google cloud: insufficient authentication scopes

痴心易碎 提交于 2019-12-08 10:07:02
问题 I am having difficulties sending requests to my spring boot application deployed in my Google Cloud Kubernetes cluster. My application receives a photo and sends it to the Google Vision API. I am using the provided client library (https://cloud.google.com/vision/docs/libraries#client-libraries-install-java) as explained here https://cloud.google.com/vision/docs/auth: If you're using a client library to call the Vision API, use Application Default Credentials (ADC). Services using ADC look for

Response 400 from Google Vision API OCR with a base64 string of specified image

孤人 提交于 2019-12-08 02:47:19
问题 I've read How to use the Google Vision API for text detection from base64 encoded image? but it doesn't help at all. Cloud client library is undesirable for me because I am doing many image processing (e.g. rotating, cropping, resizing, etc.) before and during OCR. Saving them as new files and re-read them as inputs of Google Vision API is rather inefficient. Hence, I went check the documentation of posting requests directly: Using Python to send requests Base64 Encoding Optical character

How turn on flashlight using Barcode Detection in Google Play services?

↘锁芯ラ 提交于 2019-12-08 00:44:23
问题 I'm trying to reimplement Redlaser barcode Scanner using Google play services. And face to the problem with flashlight. Android hardware.Camera object can't be using in common with CameraSource from gms.vision . Is there any opportunity to working with flashlight and Google barcode scanner? 回答1: Not sure I fully get what you're asking but my approach to this was to use the already created mCamerSource Object and setFlashMode() from there, this worked for me as I used a button to toggle the

How to stop scanning and store data from Google's Vision API?

末鹿安然 提交于 2019-12-07 15:17:08
问题 I'm using Google's Vision API BarcodeScanner on my project. I would like to interrupt scanning once a code has been scanned and store the content in another activity. How can i do that ? There are so many classes and 'interconnections' :x Thanks ! 回答1: If you are using CameraSourcePreview as in the sample code, you can call its "release()" method to shut down the camera and the associated barcode detector. If you are using the CameraSource directly without the preview, then you can call

Using Google Vision API with ARCore in Android

自作多情 提交于 2019-12-07 13:10:59
问题 I'm looking to build an app that detects certain objects and then overlays something using ARCore. Is it possible to use Google's Vision API for real-time detection of objects? If not, is there another library that I could use that has object detection, landmark detection, and/or OCR? 来源: https://stackoverflow.com/questions/56031856/using-google-vision-api-with-arcore-in-android

Google vision ocr : vertical and horizontal lines text recognition

我们两清 提交于 2019-12-07 12:41:23
问题 we are using google vision ocr for gathering text from receipts. In some cases the receipt have some text written in vertical , like vat information and some other. The question is that google vision read efficiently only the text in the main orientation (horizontal by example) and discards all the text written in the same receipt in vertical orientation instead in horizontal. Is there a parameter to set up for tell google vision to acquire also the text in vertical orientation? I have put