ezequieladrianm / camera2vision Goto Github PK
View Code? Open in Web Editor NEWAndroid Face Detector
License: Apache License 2.0
Android Face Detector
License: Apache License 2.0
when i record a video or take a picture, the resulting image is inverted (flip of 90deg)
how to solve it please ?
I'm getting a stretched preview with AutoFitTextureView on devices with notch. It doesn't happen every time, which is odd.
It someone has come across this let me know.
Regards!
samsung s3 express
03-17 00:25:00.378 27764-27764/com.example.ezequiel.camera2 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ezequiel.camera2, PID: 27764
java.lang.IllegalArgumentException: cameraId was null
at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:445)
at com.example.ezequiel.camera2.others.Camera2Source.openCamera(Camera2Source.java:667)
at com.example.ezequiel.camera2.others.Camera2Source.start(Camera2Source.java:530)
at com.example.ezequiel.camera2.others.CameraSourcePreview.startIfReady(CameraSourcePreview.java:126)
at com.example.ezequiel.camera2.others.CameraSourcePreview.access$200(CameraSourcePreview.java:21)
at com.example.ezequiel.camera2.others.CameraSourcePreview$2.onSurfaceTextureAvailable(CameraSourcePreview.java:166)
Camera 1 not detecting face.
Can be possible to save the face detected video with faces marks?
Face is not getting detected for particular preview sizes. One of them is 2048x1080 which I want to have as my preview size. Please help me with this issue.
My application was crash and I don't know why we execute (call createCaptureSession
function) before check null?
Sometimes, that is the reason why application crash.
its very good work but it doesnt record the graphics which is the whole point of the google vision api
and it doesnt record video
The sample worked flawlessly except for one small bug,
When I am trying to multiple pictures, and while pressing 'picture' it crashed in the second attempt,
The error was,
java.lang.IllegalStateException: maxImages (2) has already been acquired, call #close before acquiring more.
at android.media.ImageReader.acquireNextImage(ImageReader.java:501)
at com.example.ezequiel.camera2.others.Camera2Source$PictureDoneCallback.onImageAvailable(Camera2Source.java:1446)
The class com.randolabs.ezequiel.camera2.databinding.ActivityMainBinding is missing, the project can not build.
When I tilt my head around the z axis (eulerZ increases, while eulerY is the same), then the face recognition stops the markers are not drawn on my face anymore.
This happens with an angle of 45 degrees. Any Idea why that is happening? I'm wondering, because my face is still fully visible.
I'm getting a inconsistent crash on camera2Source when scanning barcode.
It is quite too common in Honor 9 lite (Android : N )device and I'm also getting on other devices, but it is hard to reproduce.
This is the crash log I have got from firebase
Fatal Exception: java.lang.IllegalStateException
buffer is inaccessible
java.nio.DirectByteBuffer.get (DirectByteBuffer.java:219)
com.xxxx.xxxx.xxxx.camera2.Camera2Source.stop (Unknown Source:34)
com.xxxx.xxxx.xxxx.camera2.Camera2Source.stop (Unknown Source)
com.xxxx.xxxx.xxxx.camera2.Camera2Source$2.onImageAvailable (Unknown Source:15)
android.media.ImageReader$ListenerHandler.handleMessage (ImageReader.java:812)
android.os.Handler.dispatchMessage (Handler.java:108)
android.os.Looper.loop (Looper.java:166)
android.os.HandlerThread.run (HandlerThread.java:65)
I can not make your Camera2Vision code work on Raspberry Pi 3 with the camera v2 in Android Things v1.0.1, it is giving the following error:
06-29 17: 08: 14.578 10191-10242 / com.example.ezequiel.camera2 E / CameraCaptureSession: Session 0: Failed to create capture session; configuration failed
You could help me?
When we use the sample in landscape mode, the whole sample starts to act weird and the camera preview seems to be zoomed in, I tried the same with Camera1 mode manually overriden, it worked fine, there is something wrong with Camera2 implementation in landscape mode.
Otherwise the code is really great and helpful
i am trying to run the app on a sony Xperia z5. once the camera is launched i get the following exception
E/Camera2Source: Camera Error: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.android.gms.common.images.Size.getWidth()' on a null object reference
at com.orbis.bioselfielib.others.Camera2Source.setUpCameraOutputs(Camera2Source.java:857)
at com.orbis.bioselfielib.others.Camera2Source.openCamera(Camera2Source.java:791)
at com.orbis.bioselfielib.others.Camera2Source.start(Camera2Source.java:613)
at com.orbis.bioselfielib.others.CameraSourcePreview.startIfReady(CameraSourcePreview.java:139)
at com.orbis.bioselfielib.others.CameraSourcePreview.access$200(CameraSourcePreview.java:21)
at com.orbis.bioselfielib.others.CameraSourcePreview$2.onSurfaceTextureAvailable(CameraSourcePreview.java:179)
this is happening after
Size largest = getBestAspectPictureSize(map.getOutputSizes(ImageFormat.JPEG));
largest is happening to be null
i tried adding the following
if (largest == null)
{
DisplayMetrics metrics = mContext.getResources().getDisplayMetrics();
largest = new Size (metrics.heightPixels , metrics.widthPixels);
}
but the preview is not smooth as on other devices. any solution i can work with
While using Camera2Source, i am unable to get the faceSmiling probability, but with Camera1 i am getting the values
When I track one face it's ok, but when another face is in the picture the first landmarks points freezes on the same spot. I'm using Huawei P10 and the camera2 api.
Have you experienced something similar?
I'm trying to add some custom layout for the CameraSourcePreview, and I got problem sticking it into the center and making it full screen, does it by default stick to the left? I tried everything in the xml file and change the width as well in CameraSourcePreview.java, however I couldn't find what makes the layout sticking to the left. Any Idea?
I am trying to integrate flash (user selects to capture an image with the flash on or off). I have noticed if the flash is run, and after the image is captured with the flash (it has run a pre-capture as well) the preview becomes dim after the flash. I am wondering if the line
1052 in Camera2Source.java:
mCaptureSession.setRepeatingRequest(mPreviewRequest, mCaptureCallback, mBackgroundHandler);
Should be
mCaptureSession.setRepeatingRequest(mPreviewRequestBuilder.build(), mCaptureCallback, mBackgroundHandler);
As mPreviewRequest only gets set once on createCameraPreview.
Camera2Basic also has the mPreviewRequest passing in, so I wanted to verify why this has to the previewrequest set on start up and not the updated one. I using Pixel3
Hi All,
We are currently in the process of migrating our camera functionality to use ActivityResultContracts.TakePicture(). This requires us to remove all the Camera permission declared in Manifest.
Would the CameraSource
still operate without the Camera permission?
I follow your example and try to apply the barcode pdf417 detection, it is not working as expected. The pdf417 barcode doesn't get detected very well(QR code works great, but not pdf417 format, i think it is due to threading issue...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.