android-camerax

How to listen to the cameraX lens facing changes

孤街浪徒 提交于 2020-12-12 13:23:40
问题 Does camerax provide api for lens facing changes callback? After switching the lens facing camera I want to be notified when it has finished changing and the camera is ready to use. Currently I'm using this dependencies of camerax implementation "androidx.camera:camera-lifecycle:1.0.0-beta01" implementation "androidx.camera:camera-view:1.0.0-alpha08" implementation "androidx.camera:camera-extensions:1.0.0-alpha08" 回答1: Sounds like you need a signal for when the camera starts emitting frames.

How to listen to the cameraX lens facing changes

一个人想着一个人 提交于 2020-12-12 13:23:32
问题 Does camerax provide api for lens facing changes callback? After switching the lens facing camera I want to be notified when it has finished changing and the camera is ready to use. Currently I'm using this dependencies of camerax implementation "androidx.camera:camera-lifecycle:1.0.0-beta01" implementation "androidx.camera:camera-view:1.0.0-alpha08" implementation "androidx.camera:camera-extensions:1.0.0-alpha08" 回答1: Sounds like you need a signal for when the camera starts emitting frames.

How to listen to the cameraX lens facing changes

南楼画角 提交于 2020-12-12 13:23:19
问题 Does camerax provide api for lens facing changes callback? After switching the lens facing camera I want to be notified when it has finished changing and the camera is ready to use. Currently I'm using this dependencies of camerax implementation "androidx.camera:camera-lifecycle:1.0.0-beta01" implementation "androidx.camera:camera-view:1.0.0-alpha08" implementation "androidx.camera:camera-extensions:1.0.0-alpha08" 回答1: Sounds like you need a signal for when the camera starts emitting frames.

How to listen to the cameraX lens facing changes

我的梦境 提交于 2020-12-12 13:19:30
问题 Does camerax provide api for lens facing changes callback? After switching the lens facing camera I want to be notified when it has finished changing and the camera is ready to use. Currently I'm using this dependencies of camerax implementation "androidx.camera:camera-lifecycle:1.0.0-beta01" implementation "androidx.camera:camera-view:1.0.0-alpha08" implementation "androidx.camera:camera-extensions:1.0.0-alpha08" 回答1: Sounds like you need a signal for when the camera starts emitting frames.

“Not Bound To A Valid Camera” CameraX Error

99封情书 提交于 2020-12-12 06:28:30
问题 I was trying to follow the "Getting Started with CameraX" codelab from google and I tried to do it in Java instead of Kotlin but when I ran it and tried to take a picture it gave me an error that says not bound to a valid camera. I can't find where the error is in the code. I checked the logcat and it says that there could be a problem with the surface that it might not be valid but I am not sure how to fix that can someone help me please. I will include what I have in my XML file and the

Android: How to crop images using CameraX?

◇◆丶佛笑我妖孽 提交于 2020-12-11 00:55:19
问题 I want to take a photo and crop out a square of 25x25 dp from the center using CameraX. I have read that cropping is possible using ImageCapture but unfortunately there are almost no similar examples out there so far. val imageCaptureConfig = ImageCaptureConfig.Builder().apply { setTargetAspectRatio(Rational(1, 1)) setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY) }.build() val imageCapture = ImageCapture(imageCaptureConfig) btn_take_photo.setOnClickListener { imageCapture.takePicture(

Android: How to crop images using CameraX?

我们两清 提交于 2020-12-11 00:49:58
问题 I want to take a photo and crop out a square of 25x25 dp from the center using CameraX. I have read that cropping is possible using ImageCapture but unfortunately there are almost no similar examples out there so far. val imageCaptureConfig = ImageCaptureConfig.Builder().apply { setTargetAspectRatio(Rational(1, 1)) setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY) }.build() val imageCapture = ImageCapture(imageCaptureConfig) btn_take_photo.setOnClickListener { imageCapture.takePicture(

Convert CameraX Captured ImageProxy to Bitmap

余生长醉 提交于 2020-12-04 06:37:25
问题 I was working with CameraX and had hard time converting captured ImageProxy to Bitmap. After searching and trying, I formulated a solution. Later I found that it was not optimum so I changed the design. That forced me to drop hours of work. Since I (or someone else) might need it in a future, I decided to post here as a question and post and answer to it for reference and scrutiny. Feel free to add better answer if you have one. The relevant code is: class ImagePickerActivity :