peacemaker Expert Licensed User Longtime User Sep 19, 2019 #1 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: Sep 19, 2019
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 ?
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2019 #2 Might help however it will be difficult to implement it correctly. It will be simpler to use CameraEx which is faster in this case. Upvote 0
Might help however it will be difficult to implement it correctly. It will be simpler to use CameraEx which is faster in this case.
peacemaker Expert Licensed User Longtime User Sep 19, 2019 #3 Erel said: simpler to use CameraEx which is faster in this case Click to expand... 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
Erel said: simpler to use CameraEx which is faster in this case Click to expand... 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.
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2019 #4 Google Vision works better with the preview frames coming from CameraEx. They don't need to be copied and the raw data doesn't need to converted to a Bitmap object. With that said, the problem in your code is probably related to the huge preview size you are using. Upvote 0
Google Vision works better with the preview frames coming from CameraEx. They don't need to be copied and the raw data doesn't need to converted to a Bitmap object. With that said, the problem in your code is probably related to the huge preview size you are using.
peacemaker Expert Licensed User Longtime User Sep 19, 2019 #5 Erel said: Google Vision works better with the preview frames coming from CameraEx Click to expand... 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: Sep 19, 2019 Upvote 0
Erel said: Google Vision works better with the preview frames coming from CameraEx Click to expand... 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.
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2019 #6 Currently Camera2 doesn't support accessing the raw preview data. Last edited: Sep 20, 2019 Upvote 0
peacemaker Expert Licensed User Longtime User Sep 19, 2019 #7 But how to use Camera2 API without interface freezing during working with GetPreviewBitmap? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 20, 2019 #8 It is not possible. Upvote 0
peacemaker Expert Licensed User Longtime User Sep 20, 2019 #9 ImageReader of Camera2 has some handler, to be used in second thread for frames processing, they told. What is CameraX ? Upvote 0
ImageReader of Camera2 has some handler, to be used in second thread for frames processing, they told. What is CameraX ?
Erel B4X founder Staff member Licensed User Longtime User Sep 22, 2019 #10 peacemaker said: What is CameraX ? Click to expand... CameraX is a new Google SDK based on Camera2. I did check it a few weeks ago and it was in beta state and unstable. It will be wrapped at some point. Upvote 0
peacemaker said: What is CameraX ? Click to expand... CameraX is a new Google SDK based on Camera2. I did check it a few weeks ago and it was in beta state and unstable. It will be wrapped at some point.
M mjcoon Well-Known Member Licensed User May 6, 2023 #11 Hi, has anyone heard of progress with this? (I have only just discovered CameraX.) Upvote 0