Questions tagged [android-camerax]

If your issue is related to observed behavior, rather than API usage, please include information about the specific device (even if the device is an emulator).

807 questions
0
votes
2 answers

how can I freeze cameraX preview in Android?

I want the camera to freeze preview when the image capture button is pressed. I have looked at other stack-overflow questions but they they are outdated. cameraX version I am using: 1.0.0-beta03 Any help will be appreciated. Thanks
Amrit
  • 87
  • 1
  • 4
  • 8
0
votes
0 answers

Weird compile errors implementing OnImageCapturedCallback() for taking picture with androidx

All the examples of invoking the Android camera with androidx.camera.core.ImageCapture are in Kotlin or are really out of date, and I am getting weird compilation errors with Java. androidx.camera.core.ImageCapture imageCapture; ... protected void…
Mark L
  • 3
  • 2
0
votes
1 answer

ImageCapture doesn't care about zoomRatio on Camera

I'm willing to implement zoom feature in my app with CameraX API. I followed this medium post to implement pinch to zoom and it works. The problem is when I retrieve the captured image in onCaptureSuccess callback, The image is not zoomed. Here is…
0
votes
0 answers

Crash of application using CameraX : java.lang.IllegalArgumentException

I'm building an application that recognize basic emotions on user's face. For this app, I'm using CameraX and Firebase. When I want to launch an activity that uses CameraX, the app is crashing, and I have the following error : ---------…
Noucho
  • 11
0
votes
1 answer

CameraX camera-core:1.0.0-beta01 crashed at Camera2Config.java defaultConfig()

Recently, I tried CameraX camera-core:1.0.0-beta01. Gradle: android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.example.dryeyescreener" minSdkVersion 27 targetSdkVersion…
0
votes
1 answer

Java, Android, camerax programming. Error: cannot find symbol. symbol: class Builder

I am try to take a picture with an Android smartphone by using the camerax libary from Android. I am following their tutorial to capture images. First I need to initalize the ImageCapturer: ImageCapture imageCapture = new ImageCapture.Builder() …
Lupos
  • 896
  • 12
  • 40
0
votes
1 answer

How do you properly use setTargetAspectRatio?

I am relatively new to developing on android and I am trying to implement a camera feature. I am using this page as a guide https://www.journaldev.com/30132/android-camerax-overview. The section of code below is what I am having trouble…
0
votes
1 answer

Android CameraX stuck with two use cases

I'm novice in Android development (more Python and ML engineer) but wanted to try this example from TensorFlow: TF Lite Transfer Learning. I succesfully run it on Android Studio but spotted that I cannot do anything with the app as it works…
0
votes
0 answers

Mediapipe samples are not compatible with latest versions of 'androidx.camera'

I'm trying to use this framework with own model and it works well. My issue is about versions of androidx.camera, I faced with issue that CameraXPreviewHelper depends on old version of camera-core. androidx.camera:camera-core:1.0.0-alpha06 This…
0
votes
1 answer

CameraX: How to call the analyze method with an image

I'm attempting to analyze the latest image attained with Android's CameraX. At this stage, I'm using the androidx.camera:camera-camera2 1.0.0-alpha05 release. In my MainActivity.java I don't know how to get the latest image into the analysis…
undeze
  • 19
  • 1
  • 6
0
votes
1 answer

Android glTexSubImage2D with GL_TEXTURE_EXTERNAL_OES problem (OpenGL + OpenCV + CameraX)

I am writing an app utilizing CameraX to capture the camera feed, OpenCV to modify the frames and the OpenGL to render them on a GLSurfaceView. My current approach was to render the original frames from CameraX, construct a pixel buffer, an OpenCV…
0
votes
0 answers

Render SurfaceTexture on GLSurfaceView - Android

I have a CameraX Preview that provides me with a SurfaceTexture with the camera feed: Preview preview = new Preview.Builder().build(); preview.setPreviewSurfaceProvider((resolution, surfaceReleaseFuture) -> { SurfaceTexture…
0
votes
1 answer

CameraX crashing randomly with IllegalStateException

I'm using CameraX API in my app. I have bound a Preview UseCase and an ImageAnalysis UseCase to an Activity lifecycle like preview.previewSurfaceProvider =…
user10891762
0
votes
1 answer

Access Image Data Buffer in CameraX

I use the new CameraX API for taking a picture like this : imageButton.setOnClickListener{ val file = File(externalMediaDirs.first(), "${System.currentTimeMillis()}.jpg") imageCapture.takePicture(executor,…
ebeninki
  • 909
  • 1
  • 12
  • 34
0
votes
1 answer

OnImageCapturedListener of CameraX gives an error

I am testing the new CameraX API and I have the following line of code: imageCapture.takePicture(executor, object:ImageCapture.OnImageCapturedListener{ // do some work when image is captured }) But the argument…
ebeninki
  • 909
  • 1
  • 12
  • 34