Click here to Skip to main content
14,971,099 members
Articles / Mobile Apps
Article
Posted 7 Apr 2019

Tagged as

Stats

3.2K views
2 bookmarked

Improve Photography Workflow with Loops and Color Processing

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
7 Apr 2019CPOL2 min read
Build specialized workflows for action and VR cameras

Image 1

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.

Image 2

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.

Image 3

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.

Java
theta.setOption(Options.COLOR_TEMPERATURE, 10000);

To trigger the change in color temperature underwater, I needed to use the buttons on the underwater case.

buttons

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.

Java
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.

led colors

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.

Image 6

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.

Image 7

History

Some underwater test shots were made prior to plug-in development.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Cloudster
United States United States
No Biography provided

Comments and Discussions

 
QuestionMessage Closed Pin
10-May-21 15:16
MemberClarissa Haynes10-May-21 15:16 
QuestionSource Code on GitHub Pin
Cloudster8-Apr-19 6:00
MemberCloudster8-Apr-19 6:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.