Android Question Threading library and Camera2 preview

peacemaker

Well-Known Member
Licensed User
HI, All

There is an idea to use threading library with getting the preview frames from Camera2 code, to avoid preview interface freezing while each image is being got by a timer.
Can it help ?
 
Last edited:

peacemaker

Well-Known Member
Licensed User
simpler to use CameraEx which is faster in this case
What do you mean more excactly, Erel ?
What else excepting .GetPreviewBitmap can CameraEx2 help ?
Question of this topic is that getting preview bitmap makes camera's preview freezing.
 

peacemaker

Well-Known Member
Licensed User
Google Vision works better with the preview frames coming from CameraEx
Yes ! I know and use it now with FullHD frames it works OK each ~0.25 sec.
But there is a need to have max camera settings control via Camera2 API. But it's slower now (just getting FullHD frame bitmap is ~0.45 sec, without Vision work), and not usable as freezing. Camera1 code does not freeze visually at all.

So, question is to move fully to Camera2 API from Camera v.1 API, without any troubles.

Maybe CameraEx2 can provide the byte data for Vision? It seems, it may be, but the same slow, anyway conversion from the tv View.
 
Last edited:

peacemaker

Well-Known Member
Licensed User
But how to use Camera2 API without interface freezing during working with GetPreviewBitmap?
 

peacemaker

Well-Known Member
Licensed User
ImageReader of Camera2 has some handler, to be used in second thread for frames processing, they told.
What is CameraX ?
 
Top