google-vision

camera2 output to Bitmap

倖福魔咒の 提交于 2019-12-07 12:02:46
问题 I'm trying to use Google Mobile Vision API with the camera2 module and I'm having a lot of trouble. I'm using Google's android-Camera2Video example code as a base. I've modified it to include the following callback: Camera2VideoFragment.java OnCameraImageAvailable mCameraImageCallback; public interface OnCameraImageAvailable { void onCameraImageAvailable(Image image); } ImageReader.OnImageAvailableListener mImageAvailable = new ImageReader.OnImageAvailableListener() { @Override public void

Android cameraSource.stop() causing app to freeze

守給你的承諾、 提交于 2019-12-07 01:42:23
问题 I am building an app that has a qr scanner using the google vision api. I am having trouble stopping the camera after the qr code is read. the flow is MainActivity -> QrActivity once the qr-code received a detection the app should return to the main activity. If i do not call cameraSource.release() it works fine but the device heats up a lot and has a significant impact on battery drain. however if i release the camera source the mainActivity becomes un-responsive and the app will crash. Why

Preview size for barcode scanner from vision api

三世轮回 提交于 2019-12-06 19:31:51
问题 I'm using the barcode-reader example from Google's Android Vision API. The preview size doesn't seem to fill up the whole space available (I'm using a Nexus 4 and there is a white unused space to the right of preview, about 1/3 of the width). I would like to be able to run this example on various devices and always have it fill up the whole space available. So the bit I've been playing with is: CameraSource.Builder builder = new CameraSource.Builder(getApplicationContext(), barcodeDetector)

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

不问归期 提交于 2019-12-06 11:42:05
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 recognition (OCR) , and here are minimum codes to make the failure: import base64 import requests import

New Android Face API limitations

╄→尐↘猪︶ㄣ 提交于 2019-12-06 10:57:56
问题 I have been testing the new Face API realesed for android, and noticed even with "ACCURATE_MODE" enabled, it doesn't detect faces that old FaceDetector API used to detect, Also i would like to know the effect of Bitmap coding "RGB_565" vs "ARGB_888" in producing the results. 回答1: Update: The issue was that the face detector is set to only detect faces that are at least 10% by default (as a performance optimization). The new Google Play Services 8.4 release supports setting this minimum face

Google Vision api :How to detect face detected is either an image face or real live face?

怎甘沉沦 提交于 2019-12-06 08:38:59
I am using google vision api for face detection in my app. its working fine but in my case i need to deal with only real human faces. but my app is considering there faces in photo as a face. but i want to detect which is photo and which is live image. below is the class of face graphics private class GraphicFaceTracker extends Tracker<Face> { private GraphicOverlay mOverlay; private FaceGraphic mFaceGraphic; GraphicFaceTracker(GraphicOverlay overlay) { mOverlay = overlay; mFaceGraphic = new FaceGraphic(overlay); } /** * Start tracking the detected face instance within the face overlay. */

Google vision ocr : vertical and horizontal lines text recognition

蹲街弑〆低调 提交于 2019-12-06 01:27:11
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 online an example with an image with text in two orientations . https://drive.google.com/file/d/0B8kZz

Using Google Vision API with ARCore in Android

自作多情 提交于 2019-12-05 23:41:37
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

camera2 output to Bitmap

白昼怎懂夜的黑 提交于 2019-12-05 19:21:10
I'm trying to use Google Mobile Vision API with the camera2 module and I'm having a lot of trouble. I'm using Google's android-Camera2Video example code as a base. I've modified it to include the following callback: Camera2VideoFragment.java OnCameraImageAvailable mCameraImageCallback; public interface OnCameraImageAvailable { void onCameraImageAvailable(Image image); } ImageReader.OnImageAvailableListener mImageAvailable = new ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(ImageReader reader) { Image image = reader.acquireLatestImage(); if (image == null)

After some time barcode scanner throws java.lang.UnsatisfiedLinkError

只愿长相守 提交于 2019-12-05 02:06:27
问题 I have a barcode scanner using the new android vision library that worked perfectly on my device and on several others. But suddenly it stops working and I see the following exception in the log: No implementation found for com.google.android.gms.vision.barcode.internal.NativeBarcode[] com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector.recognizeBufferNative(int, int, java.nio.ByteBuffer, com.google.android.gms.vision.barcode.internal.NativeOptions) (tried Java_com_google