android-vision

Crop face from the CameraSource

自作多情 提交于 2019-12-05 08:07:28
I am implementing the example given in google-vision face tracker . MyFaceDetector class: public class MyFaceDetector extends Detector<Face> { private Detector<Face> mDelegate; MyFaceDetector(Detector<Face> delegate) { mDelegate = delegate; } public SparseArray<Face> detect(Frame frame) { return mDelegate.detect(frame); } public boolean isOperational() { return mDelegate.isOperational(); } public boolean setFocus(int id) { return mDelegate.setFocus(id); } } FaceTrackerActivity class: private void createCameraSource() { imageView = (ImageView) findViewById(R.id.face); FaceDetector faceDetector

Detect Eye Blink Using Google Vision API

*爱你&永不变心* 提交于 2019-12-05 07:21:18
问题 i'm using the vision API for face detection, now i want to implement eye blink but still vision api detect eye while one eye is off. please help me how to implement eye blink feature. 回答1: The "eye open probability" values from the face are the key to detecting the blink. In addition, you can use a Tracker to keep track of the eye state over time, to detect the sequence of events that indicate a blink: both eyes open -> both eyes closed -> both eyes open Here's an example tracker: public

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

Does Machine Vision API work offline?

[亡魂溺海] 提交于 2019-12-05 01:39:29
Does the Google Mobile Vision ( https://developers.google.com/vision/ ) API work offline? Or does it need Internet connectivity? The sample app does not require any Internet permission. Which means the API works entirely offline. I am looking for a positive confirmation of this. PS. Also I am looking for more information on this API. For example, does it use neural networks? If so what algorithms were used? I can not find any detail discussion anywhere. The API does an initial library download the first time that it is used, and then works offline from that point on. I tried the official

How to install the barcode scanning library without a google account?

感情迁移 提交于 2019-12-05 00:46:49
I would like to install the android-vision portion of google play services on devices that are not allowed to have a google account signed in. Traditionally, the android-vision library is downloaded through the play store as an update to google play services. According to this , the package name should be com.google.android.gms.vision.barcode. I used adb to list all packages installed on my rooted nexus device that has the barcode scanning library downloaded and the package was not in the list. I was hoping to pull the package itself and then distribute it. Thank you for your time and effort.

How to create Bitmap from grayscaled byte buffer image?

怎甘沉沦 提交于 2019-12-04 18:51:00
问题 I am trying to get frame image to process while using new Android face detection mobile vision api. So I have created Custom Detector to get Frame and tried to call getBitmap() method but it is null so I accessed grayscale data of frame. Is there a way to create bitmap from it or similiar image holder class? public class CustomFaceDetector extends Detector<Face> { private Detector<Face> mDelegate; public CustomFaceDetector(Detector<Face> delegate) { mDelegate = delegate; } public SparseArray

Android Face Detection API - Stored video file

六眼飞鱼酱① 提交于 2019-12-04 12:08:02
I would like to perform face detection / tracking on a video file (e.g. an MP4 from the users gallery) using the Android Vision FaceDetector API. I can see many examples on using the CameraSource class to perform face tracking on the stream coming directly from the camera (e.g. on the android-vision github ), but nothing on video files. I tried looking at the source code for CameraSource through Android Studio, but it is obfuscated, and I couldn't see the original online. I image there are many commonalities between using the camera and using a file. Presumably I just play the video file on a

Scanning QR code using Android's Mobile Vision API

折月煮酒 提交于 2019-12-03 23:05:16
I followed this tutorial on how to build an Android app that can scan QR codes. Here's the full code. I added the Google Play services using grade like so compile 'com.google.android.gms:play-services:7.8.0' . AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="bitinvent.io.qrscanner" > <meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.CAMERA"/>

Detect Eye Blink Using Google Vision API

徘徊边缘 提交于 2019-12-03 21:48:32
i'm using the vision API for face detection, now i want to implement eye blink but still vision api detect eye while one eye is off. please help me how to implement eye blink feature. The "eye open probability" values from the face are the key to detecting the blink. In addition, you can use a Tracker to keep track of the eye state over time, to detect the sequence of events that indicate a blink: both eyes open -> both eyes closed -> both eyes open Here's an example tracker: public class BlinkTracker extends Tracker<Face> { private final float OPEN_THRESHOLD = 0.85; private final float CLOSE

After some time barcode scanner throws java.lang.UnsatisfiedLinkError

僤鯓⒐⒋嵵緔 提交于 2019-12-03 16:27:19
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_android_gms_vision_barcode_internal_NativeBarcodeDetector_recognizeBufferNative and Java_com_google