google-vision

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

New Android Face API limitations

你。 提交于 2019-12-04 17:09:21
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. 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 size lower, enabling smaller faces to be detected. See the setMinFaceSize method here: https://developers

How to generate an Barcode and convert it to Bitmap using new Google Vision API?

落花浮王杯 提交于 2019-12-04 06:31:21
How to generate an Barcode and convert it to Bitmap using new Google Vision API? Barcode barcode = new Barcode(); Barcode.Email email = new Barcode.Email(); email.address = "my_email@gmail.com"; email.subject = "My Subject; email.body = "My body content."; barcode.email = email; //Implement conversion Bitmap barcodeImage = barcodeToBitmap(barcode);// I do know this part. You can detect your barcodes using Google Vision API and then use ZXing to generate the barcodes. You could try something like this, it uses zxing library: public static Bitmap getBitmap(String barcode, int barcodeType, int

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

Limit Detection Area in Vision API

旧巷老猫 提交于 2019-12-03 11:58:31
问题 It seems I've found myself in the deep weeds of the Google Vision API for barcode scanning. Perhaps my mind is a bit fried after looking at all sorts of alternative libraries (ZBar, ZXing, and even some for-cost third party implementations), but I'm having some difficulty finding any information on where I can implement some sort of scan region limiting. The use case is a pretty simple one: if I'm a user pointing my phone at a box with multiple barcodes of the same type (think shipping labels

Take picture with drawable/paint on face using vision api

﹥>﹥吖頭↗ 提交于 2019-12-03 11:38:14
问题 What I am trying? I am trying to take picture with drawable/paint on face but, i am not able to get both on same picture. What I have tried? I have tried using CameraSource.takePicture but i am just getting face without any drawable/paint on it. mCameraSource.takePicture(shutterCallback, new CameraSource.PictureCallback() { @Override public void onPictureTaken(byte[] bytes) { try { String mainpath = getExternalStorageDirectory() + separator + "TestXyz" + separator + "images" + separator; File

Limit Detection Area in Vision API

扶醉桌前 提交于 2019-12-03 03:31:56
It seems I've found myself in the deep weeds of the Google Vision API for barcode scanning. Perhaps my mind is a bit fried after looking at all sorts of alternative libraries (ZBar, ZXing, and even some for-cost third party implementations), but I'm having some difficulty finding any information on where I can implement some sort of scan region limiting. The use case is a pretty simple one: if I'm a user pointing my phone at a box with multiple barcodes of the same type (think shipping labels here), I want to explicitly point some little viewfinder or alignment straight-edge on the screen at

Take picture with drawable/paint on face using vision api

风格不统一 提交于 2019-12-03 02:02:27
What I am trying? I am trying to take picture with drawable/paint on face but, i am not able to get both on same picture. What I have tried? I have tried using CameraSource.takePicture but i am just getting face without any drawable/paint on it. mCameraSource.takePicture(shutterCallback, new CameraSource.PictureCallback() { @Override public void onPictureTaken(byte[] bytes) { try { String mainpath = getExternalStorageDirectory() + separator + "TestXyz" + separator + "images" + separator; File basePath = new File(mainpath); if (!basePath.exists()) Log.d("CAPTURE_BASE_PATH", basePath.mkdirs() ?

Does CameraSource.stop() require to be called from UI Thread?

醉酒当歌 提交于 2019-12-02 18:06:54
问题 I am working on an android app that uses Google Barcode Scanner API from Mobile Vision. The purpose of app is to detect barcode and then take some action based on the data associated with barcode. As soon as first barcode is detected, I want to stop the camera source so that the detection shouldn't continue. When I try to execute cameraSource.stop() inside receiveDetections(Detector.Detections<Barcode> detections) callback, the thread gets blocked and there is a lot of log output in logcat.

Does CameraSource.stop() require to be called from UI Thread?

对着背影说爱祢 提交于 2019-12-02 07:39:42
I am working on an android app that uses Google Barcode Scanner API from Mobile Vision. The purpose of app is to detect barcode and then take some action based on the data associated with barcode. As soon as first barcode is detected, I want to stop the camera source so that the detection shouldn't continue. When I try to execute cameraSource.stop() inside receiveDetections(Detector.Detections<Barcode> detections) callback, the thread gets blocked and there is a lot of log output in logcat. Since this callback is not executed in UI thread, UI remains unblocked. I tried executing cameraSource