Developing OpenCV Plug-ins for RICOH THETA with no-camera-template

This example shows how to use an Android AVD to build a plug-in that runs inside the RICOH THETA V
camera. Even though I have a camera, I sometimes use the Android Virtual Device emulator for development instead of a physical camera. If you do not have a RICOH THETA V or Z1 handy,
you can still develop with the AVD emulator.

Code for the no-camera-opencv demo is available on GitHub. The code will run on both emulators and physical device cameras with only minor modifications.

As OpenCV uses the NDK, I first tried to use an arm64 system image instead of the x86 one. Unfortunately, this was too slow. The good news is that the same code ran on the x86 emulator with
only a minor change.

Using x86 Emulator

in build.gradle app

image

in Application.mk

image

This worked fine.

Using Physical Device RICOH THETA V

Application.mk
image

build.gradle app
image

Sync Gradle

Clean Project
Rebuild

Selected RICOH THETA V

works as expected

image

Running OpenCV on Physical Camera When Picture is Taken

This is a view from Vysor of the physical device RICOH THETA V. The picture was taken by pressing the physical camera button. The image is processed with OpenCV by using the Wi-Fi button on the side of the camera.

Running OpenCV on AVD emulator

Comment Out Camera-specific Code

Change Application.mk

Change APP_ABI: = arm64-v8a to

APP_ABI: = x86

Change build.gradle (app)

image

build

  • sync gradle
  • clean project
  • play (build and install)

Set Storage Permissions

image

Run App

Press Shutter

Press Process

This is equivalent to pressing the Wi-Fi button of the physical device camera.

Can we use the RICHO Theta Z1 camera as an virtual device like emulator in the android studio . We don’t have the physical camera present but we need to develop the android app which controls the richo theta device. Is that feasible , suggestions would be helpful

You need the physical device to access the web API. I can’t think of a way you can complete development without the physical device.

The API documentation is here.

Overview

Z1 sample DNG media is here
THETA Z1 Sample DNG RAW Images