Get Started

Image Description
theta360.guide October 3, 2019

Thank you for making the journey. There are many different APIs and ways of connecting to the RICOH THETA and accessing media.

Wi-Fi API with Access Point (AP) Mode

The most common method is to use the Wi-Fi API and create a mobile app to take pictures using Wi-Fi.

You can immediately test it out with a web browser by first connecting your computer or phone to the camera hotspot and the point your browser to: http://1912.168.1.1/osc/info

For the rest of the commands, use Postman or curl. For testing purposes, you can save the commands to a bash script. For POST commands, you may need to specify the following in your header Content-Type: application/json; charset=utf-8 Most people do not have problems with AP mode, so let's jump ahead.

Wi-Fi API with Client Mode

An alternative to connecting your mobile phone directly to the THETA, is to connect both your mobile phone and the THETA to the same Wi-Fi router.
Client Mode

This will also work with laptops or desktop computers connected using Wi-Fi or Ethernet.

To support this mode, your application needs to use digest authentication. Community discussion.

  def takePicture():
  url = THETA_URL + 'commands/execute'
  payload = {"name": "camera.takePicture"}
  req = requests.post(url,
                      json=payload,
                      auth=(HTTPDigestAuth(THETA_ID, THETA_PASSWORD)))
            

You can get the camera IP address with discovery. Example script using Zerconf.

curl example.
curl -H "Content-Type:application/json" -D - --digest -u "THETAYL00101082:00101082" -X POST 'http://192.168.2.101/osc/state'

Use Digest Authentication for client mode applications - RICOH THETA Wi-Fi API

Ethernet

You can use Ethernet to connect the camera.
Client Mode
For timelapse pictures, you can power the camera indefinitely using Ethernet and a Y-splitter. You can also isolate the THETA on a separate subnet to conform to IT security policies.
Client Mode

Real Y-splitter in the field. Photo by Kev091190.

Client Mode

Plug-in

The THETA V and THETA Z1 run the Android OS inside camera. You can build your own application to take full advantage of camera hardware features. There are many ways to access the APIs using a plug-in.
  • android.hardware.Camera API
  • Web API using THETA internal web server to localhost:8080
  • third-party community Android libraries such as theta4j by community member shrhdk.

Go to the plugin category for more information. Many innovative uses of the plug-in can be seen on the Dream and Build 2019 contest site.

Client Mode

There are more than 30 example plug-ins with source code available. TensorFlow and OpenCV run great inside the camera.

Hundreds of articles on THETA development are in the community.

Unity

Most developers use Unity to live stream from the camera into HTC Vive or Oculus Rift headsets. There are many articles in the Unity Development category.

Photo contributed by zimmermegan during her first stage of development.

Image Description

Example script by RicoB.

  using UnityEngine;

  public class getRicohStream : MonoBehaviour
  {

      static WebCamTexture ricohStream;
      string camName = "RICOH THETA Z1 FullHD"; // Name of your camera. 
      public Material camMaterial;  // Skybox material

      void Start()
      {

          if (ricohStream == null)
              ricohStream = new WebCamTexture(camName, 3840, 1920); // Resolution you want

          if (!ricohStream.isPlaying)
              ricohStream.Play();

    if (camMaterial != null)
              camMaterial.mainTexture = ricohStream;

      }

  }        
      

Steps by RicoB to use his script.

  1. Create a new Material and name it ricoh360_skybox (for example). Change its Shader to “Skybox/Panoramic”.
  2. Open Window -> Rendering -> Lighting Settings. Then just drag that new Material you created into the “Skybox Material” box.
  3. Create a new script and call it “getRicohStream” (You can change it, but don’t forget to change the class name too).
  4. Save script
  5. In Unity, create an empty gameobject and attach the script to it.
  6. Drag in the “ricoh360_skybox” material in the “Cam Material” field under the script component of your new gameobject.
  7. Press Play.

Contribute

Contribute your tip to the community.
theta360guide logo .GUIDE

© 2022 Oppkey, Inc. All rights reserved