Hi Everyone,
I am new to tensoflow and android development.
I imported the tensorflow pose estimation model example from github and I am trying to add a “Flash/Torch” button to the model. Does anyone have any advice? or can point me in the right direction?
Any help will be appreciated, Apologies for asking a noob question.
Kind Regards
Hi @Stefan1,
The pose estimation model in the github does not have the said integrated feature. However you can integrate your "Flash/Torch " UI interface to the code. These are the steps :
- To use the camera and control the flashlight first add necessary permissions in your
AndroidManifest.xml
.
<uses-permission android:name="android.permission.CAMERA />
<uses-permission android:name="android.permission.FLASHLIGHT/>
- Add a button to your layout file for toggling the flashlight
<Button
android:id="@+id/flash_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Flash" />
-
Initialize the Camera Manager and the flash button. See the guide
-
Last, Based on your project modify the code to make compatible between camera functionality and TF model.
Thank You