Introduction
For specialized workflows, standard camera applications often lack features that prevent photographers from exploring creative ideas. This article shows how to add features to an Android-based camera to make it more useful for scuba diving. The techniques can be adapted for most VR cameras using Google's Optical Spherical Camera API or any camera running Android internally, including mobile phones with cameras.
Background
Using underwater cases, you can easily operate cameras in environments at 3 atmospheres. The pressure on the camera usually does not present a problem. The light from the sun filtering in through the ocean does create a problem as the red wavelength of light is absorbed by the ocean.
As I'm using a VR camera that takes pictures in 360 degrees, I can't use a light rig underwater to provide light with sufficient red wavelengths. To solve the problem, I looked at the API of the Android-based camera that I am using.
Using the Code
I first did tests on land using the API to adjust color temperature.
In my case, the API was very simple as I used an open source third-party library called theta4j web API. It's just one line.
theta.setOption(Options.COLOR_TEMPERATURE, 10000);
To trigger the change in color temperature underwater, I needed to use the buttons on the underwater case.
To grab the button, I used a library. The only slightly tricky part was that I needed to put the command on a separate thread. This is also the case for the example above of setting the color temperature. In the example below, the thread is run with colorExecutor.submit
. It uses the new Java 8 lambda expression syntax.
if (keyCode == KeyReceiver.KEYCODE_MEDIA_RECORD) {
colorExecutor.submit(() -> {
try {
theta.setOption(WHITE_BALANCE, WhiteBalance.COLOR_TEMPERATURE);
} catch (IOException e) {
e.printStackTrace();
}
switch (colorTemperature) {
case 2500 :
colorTemperature = 6500;
notificationLed3Show(LedColor.YELLOW);
try {
theta.setOption(Options.COLOR_TEMPERATURE, 6500);
} catch (IOException e) {
e.printStackTrace();
}
break;
Controlling LEDs
The camera that I'm using doesn't have a screen. To show the current color status, I'm adjusting the color of an LED.
Points of Interest
In most circumstances, standard software works great to take pictures. In challenging light and pressure conditions, specialized software helps. The software was easier to build than I expected. Having a full Android OS in the RICOH THETA V was a big advantage as I could use Android Studio and Java.
As I'm not a scuba diver myself, I realized that talking to people in the field was extremely valuable. I learned more in a 30 minute discussion about the workflow for scuba divers than I would have gathered from months of research online.
I also got to learn more about what my son does for work.
One of the big things I learned was that different environments cause light and color to react differently. Software can adjust the color easily.
Currently, the test shot below is a bit blue. However, I hope to see the results of the plug-in color adjustment in his future dives.
History
Some underwater test shots were made prior to plug-in development.