Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Choppy preview and video with image analysis

80 views
Skip to first unread message

Anton Ivanov

unread,
Apr 14, 2025, 11:25:38 AMApr 14
to Android CameraX Discussion Group
Hey,
We've got a problem with Samsung Galaxy A6+(SM-A605FN).
When ImageAnalysis is added tot the use cases the preview is choppy and the video recorded with VideoCapture use case is choppy as well.

If the image analysis use case is removed preview is fine and video as well.

Are there any suggestions on how to fix this or should I file a bug report?

choppy_a6+.mp4

Charcoal Chen

unread,
Apr 14, 2025, 10:37:52 PMApr 14
to Anton Ivanov, Android CameraX Discussion Group
Hi,

Thanks for reporting the issue.

We do not have the A6+ device. Could you help to do some testing on it for us to get some idea what the issue might be?
  1. Does the issue happen on the A6+ device only and can work well on the other devices?
  2. Does the issue happen if directly closing the image proxies received via ImageAnalysis' analyzer?
  3. Does the issue happen if binding Preview + ImageAnalysis only?
  4. Could you try to use ResolutionSelector to make the ImageAnalysis select the other different sizes to see whether the issue will be disappeared?
Thanks.


CONFIDENTIAL

This  e-mail  and  any  attachments  are  confidential  and  intended  solely  for  the  addressee  and  may  also  be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this e-mail or its attachments. Internet communications are not guaranteed to be secure or virus-free. Revolut does not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. Replies to this e-mail may be monitored by Revolut for operational or business reasons. Any  opinion  or  other  information  in  this  e-mail  or  its  attachments  that  does  not  relate  to  the  business  of Revolut is personal to the sender and is not given or endorsed by Revolut. Registered  Office: 7  Westferry  Circus,  Canary  Wharf, London,  E14  4HD,  United  Kingdom.  Main  Office: 7 Westferry  Circus,  Canary  Wharf, London,  E14  4HD, United  Kingdom. Revolut  Ltd  is  authorised  and regulated by the Financial Conduct Authority under the Electronic Money Regulations 2011, Firm Reference 900562.

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/240cf744-f8c7-4a59-b210-1a3a4b70e76bn%40android.com.

Anton Ivanov

unread,
Apr 15, 2025, 7:14:28 AMApr 15
to Android CameraX Discussion Group, charco...@google.com, Android CameraX Discussion Group, Anton Ivanov
Hey,

1. We have this confirmed only on the device mentioned in the topic but there's strong evidence that it might be present on other devices as well
2. That's how it currently works
3. The preview is still choppy
4. It doesn't seem to help

Thanks.

Charcoal Chen

unread,
Apr 16, 2025, 5:14:15 AMApr 16
to Android CameraX Discussion Group, anton....@revolut.com, Charcoal Chen, Android CameraX Discussion Group
Hi,

Thanks for providing the answers. 

This should be a device-specific issue. Usually, we'll try to find some workaround to see whether the issue can be avoided with some specific settings. But, according to the answers, the issue can happen even if binding Preview + ImageAnalysis only and can't be avoided by selecting different resolution for the ImageAnalysis UseCase, there might be no good way to workaround this issue from CameraX side. The possible approach for this issue is to make your app bind Preview only and get the image frames from the Preview to do analysis. (You might need to set OnFrameAvailableListener to the SurfaceTexture to get the images.) 

Anton Ivanov

unread,
Apr 16, 2025, 8:50:07 AMApr 16
to Android CameraX Discussion Group, charco...@google.com, Anton Ivanov, Android CameraX Discussion Group
Hey,
Thanks for your advice.
I shall create a ticket for this issue then. Unfortunately the device is quite old but we could assist you in obtaining it if needed.

Anton Ivanov

unread,
Apr 16, 2025, 10:22:50 AMApr 16
to Android CameraX Discussion Group, Anton Ivanov, charco...@google.com, Android CameraX Discussion Group
Also, could you elaborate a bit more on how exactly you propose to receive frames from Preview

Thanks.

Anton Ivanov

unread,
Apr 16, 2025, 11:40:25 AMApr 16
to Android CameraX Discussion Group, Anton Ivanov, charco...@google.com, Android CameraX Discussion Group
Update,
I was able to receive frames intended for rendering in preview via custom OpenGl renderer and copy them to Bitmap.
Please correct me if there's simplier way to do this.

Thanks.

Anton Ivanov

unread,
Apr 16, 2025, 11:49:37 AMApr 16
to Android CameraX Discussion Group, Anton Ivanov, charco...@google.com, Android CameraX Discussion Group

Charcoal Chen

unread,
Apr 16, 2025, 11:24:12 PMApr 16
to Anton Ivanov, Android CameraX Discussion Group
"receive frames intended for rendering in preview via custom OpenGl renderer and copy them to Bitmap."

Yes, this is exactly the approach to workaround the issue.
If there is any other questions, we can discuss it on https://issuetracker.google.com/issues/411033507.
Thanks.

Anton Ivanov

unread,
Apr 17, 2025, 12:48:05 PMApr 17
to Android CameraX Discussion Group, charco...@google.com, Android CameraX Discussion Group, Anton Ivanov
Thanks you,
asked a question in the issue thread.
Reply all
Reply to author
Forward
0 new messages