CameraX Image Capture use case without preview

269 views
Skip to first unread message

Jia Sheng Xia

unread,
Sep 16, 2022, 3:28:50 AM9/16/22
to Android CameraX Discussion Group
Hi, in previous versions of CameraX I was successfully using only two use cases for my application written in Java: ImageCapture and ImageAnalysis.
Now, with version 1.2.0-beta01 (but also with 1.1.0), I'm having some trouble with ImageCapture callbacks: OnImageCapturedCallback and OnImageSavedCallback (not simultaneously).

Here is some logs I've seen before the expected but never seen onCaptureSuccess/onImageSaved or onError:

D/CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=90, sourceRotationDegrees=270, isOppositeFacing=false, result=0
D/ImageCapture: Send image capture request [current, pending] = [0, 1]
D/ImageCapture: issueTakePicture


After some tests I discovered that with Preview use case ImageCapture behaves actually how I expect:

D/CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=90, sourceRotationDegrees=270, isOppositeFacing=false, result=0
D/ImageCapture: Send image capture request [current, pending] = [0, 1]
D/ImageCapture: issueTakePicture
D/Camera2CameraImpl: {Camera@450165f[id=1]} Issue capture request
D/CaptureSession: Issuing capture request.
D/Camera2CaptureRequestBuilder: createCaptureRequest
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2080000
D/DEBUG: onCaptureSuccess: got ImageProxy!!!


Is this expected? Has Preview use case been required by ImageCapture?

Thank you.

Leo Huang

unread,
Oct 19, 2022, 1:00:55 AM10/19/22
to Android CameraX Discussion Group, jiash...@gmail.com
Hi, 
Do you mean the OnImageCapturedCallback and OnImageSavedCallback do not come when only using ImageCapture + ImageAnalysis?

If so, this could be a device specific issue. Could you provide the device brand and model name? and also see if the same issue happens on other devices. Thanks.


jiash...@gmail.com 在 2022年9月16日 星期五下午3:28:50 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages