Giter VIP home page Giter VIP logo

camera2vision's People

Contributors

ezequieladrianm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camera2vision's Issues

cameraId was null

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)

Crashed when pressing 'Picture' for second time

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)

Face detection stops when I tilt my head too much

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.

Crash found on Camera2Source.stop

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)

Failed to create capture session; configuration failed

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?

Camera 'zoomed-in' in landscape mode with Camera2

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

Size returned as null on Sony Xperia z5 7.1.1

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

CameraSourcePreview sticked to the left

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?

Trying to integrate flash

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

Camera Permissions for new ActivityResultContracts.TakePicture()

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.