Android Question Threading library and Camera2 preview

Status
Not open for further replies.

peacemaker

Expert
Licensed User
Longtime 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

Expert
Licensed User
Longtime 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.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime 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:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
But how to use Camera2 API without interface freezing during working with GetPreviewBitmap?
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
ImageReader of Camera2 has some handler, to be used in second thread for frames processing, they told.
What is CameraX ?
 
Upvote 0
Status
Not open for further replies.
Top