TensorFlow Tutorial Step 4: Modify PluginLibrary
Published in
2 min readNov 15, 2018
Adapt the RICOH THETA PluginLibrary to work with TensorFlow
Previous Steps
- Overview of steps
- Step 1: Setup
- Step 2: Incorporate PluginLibrary
- Step 3: Detect Objects and take picture
Start
Please reference the GitHub repository at the tag above.
Overview
Call another plug-in (File Cloud Upload) and add the functionality to upload to Google Photos.
Work Content
Follow the embedded comments in “Step 4” from the code on GitHub with the tag above.
Fix plug-in library
- Enable it to work even if you call
startActivityForResult
- Contents of
onResume
toonCreate
- Contents of
onPause
toonDestroy
How to disable upload to Google Photos
If you want to disable upload to Google Photos, change the following in CameraActivity.java
ENABLE_CLOUD_UPLOAD = false; // in CameraActivity.java
Case of normal plug-in
- Completion by itself
- Initialization with
onResume
- Terminate processing with
onPause
Case of Connecting with Another Plug-in
- Avoid influencing the shooting application as much as possible. When linking with another plug-in, call
onStop
withstartActivityForResult
- Make sure to terminate the plug-in with the long press of the mode button
- Do not perform background processing at
onPause()
- Terminate HandlerThread
Review of Key Points from the TensorFlow Tutorial Series
When using the Camera API
sendBroadcast(new Intent("com.theta360.plugin.ACTION_MAIN_CAMERA_CLOSE"));Camera.Parameters.set("RIC_SHOOTING_MODE", "RicMoviePreview1024");
When using the THETA Microphone
AudioManager.setParameters("RicUseBFormat=false");
Application Ideas
- computational photography
- Edge computing
- Machine learning
- IoT