Epson Moverio Pro BT-2000, Moverio Pro BT-2200 Developer's Manual

Page 1
BT-2000/2200
Developer's Guide
Revision history
MOVERIO Pro Developer's Guide (Rev.1.4)
Page 2
Revision
Item
Mainly revised content
Rev.1.3
4.1
Adding caution when changing key assign
6
Adding EDof mode and auto exposure function
11
Adding GPS Assist
Rev.1.4
-
Adding description to support BT-2200
Cautions
BT-2000 and BT-2200 use common system software. This document will be described
hereafter by only BT-2000, but please be aware that it is also common to BT-2200.
MOVERIO Pro Developer's Guide (Rev.1.4)
Page 3
Note the following points when using this guide.
The content of this guide may change without prior notice.
1. Reprinting part or all of this guide without prior permission from Seiko Epson, or reprinting for any other purposes is
strictly prohibited.
2. Programs and usage instructions used in this guide are for reference only, Seiko Epson cannot be held responsible for
any infringements (including industrial property rights) or damage caused to third parties. Furthermore, this guide does not imply consent to licensing for third parties or industrial property rights for Seiko Epson.
3. This document does not relate to products that require a high level of reliability, such as life support equipment.
Epson accepts no responsibility if this product is used for such circumstances.
©Seiko Epson Corporation 2017. All right reserved.
MOVERIO Pro Developer's Guide (Rev.1.4)
Page 4
Contents
1. Introduction _______________________________________________ 1
1.1. Product Summary and Functions _____________________________________________________2
1.2. Main System Specifications __________________________________________________________3
1.3. Basic Information for App Development _______________________________________________4
1.4. Other Main Functions _______________________________________________________________5
2. Developing Apps ___________________________________________ 6
2.1. Pre-Caution for Developing Apps______________________________________________________7
2.2. Summary of Developing Apps _________________________________________________________8
2.3. Introduction to the Android SDK ______________________________________________________9
2.4. ADB driver settings _______________________________________________________________ 12
2.5. Connecting the BT-2000 to a computer _______________________________________________ 18
2.6. Including the SDK provided by EPSON ______________________________________________ 20
3. Display control ___________________________________________ 24
3.1. Display control summary___________________________________________________________ 25
3.2. Full screen display function ________________________________________________________ 26
3.3. Switch between 2D/3D display function ______________________________________________ 27
3.4. Backlight control __________________________________________________________________ 29
3.5. Mute function _____________________________________________________________________ 30
3.6. See-through function ______________________________________________________________ 32
4. UI control ________________________________________________ 33
4.1. UI control summary _______________________________________________________________ 34
4.2. Application interface list ___________________________________________________________ 38
4.3. Application interface details ________________________________________________________ 39
5. Voice commands __________________________________________ 41
5.1. Pre-cautions for developing Voice commands Apps ____________________________________ 42
5.2. Voice commands summary _________________________________________________________ 43
5.3. Application interface function summary _____________________________________________ 44
5.4. Application interface list ___________________________________________________________ 45
5.5. Application interface details ________________________________________________________ 47
MOVERIO Pro Developer's Guide (Rev.1.4)
Page 5
5.6. Sample code ______________________________________________________________________ 55
5.7. Others ___________________________________________________________________________ 57
6. Camera control ___________________________________________ 64
6.1. Pre-cautions for developing camera Apps_____________________________________________ 65
6.2. Function summary ________________________________________________________________ 66
6.3. Available parameters ______________________________________________________________ 67
6.4. Image organization and format _____________________________________________________ 68
6.5. Depth data characteristics _________________________________________________________ 69
6.6. Application interface function summary _____________________________________________ 71
6.7. Application interface list ___________________________________________________________ 72
6.8. Application interface details ________________________________________________________ 74
6.9. Depth Information Acquisition Flow Details _________________________________________ 104
6.10. Sample Code ___________________________________________________________________ 106
6.11. Remarks ______________________________________________________________________ 109
6.12. Android standard camera API Camera.Parameters Class ___________________________ 110
7. Sensor control ___________________________________________ 113
7.1. Sensor control summary __________________________________________________________ 114
7.2. Using the sensor _________________________________________________________________ 117
7.3. Using SensorEventListener _______________________________________________________ 118
7.4. Sample code _____________________________________________________________________ 120
8. Bluetooth/BLE __________________________________________ 121
8.1. Pre-cautions for developing Apps using BLE_________________________________________ 122
8.2. Summary _______________________________________________________________________ 123
8.3. Usage method ___________________________________________________________________ 125
8.4. Remarks & Restrictions for BLE App Development __________________________________ 131
8.5. Import module ___________________________________________________________________ 132
8.6. Application interface list __________________________________________________________ 133
8.7. Supported GATT procedure table __________________________________________________ 135
8.8. Application interface details _______________________________________________________ 136
8.9. BLE Processing Sample Code ______________________________________________________ 168
9. Power control ____________________________________________ 178
9.1. Power control summary ___________________________________________________________ 179
9.2. Acquiring Battery Information _____________________________________________________ 180
MOVERIO Pro Developer's Guide (Rev.1.4)
Page 6
10.Self-diagnostic function ___________________________________ 181
10.1. Self-diagnostic function _________________________________________________________ 182
11. GPS Assist ______________________________________________ 185
11.1. GPS Assist function summary ___________________________________________________ 186
11.2. Precaution and limitation of using /developing GPS Assist function __________________ 187
11.3. How to use ____________________________________________________________________ 188
11.4. Setting method ________________________________________________________________ 189
11.5. Application interface function summary __________________________________________ 190
11.6. Application interface detail ______________________________________________________ 191
11.7. How to use API for GPS assist ___________________________________________________ 193
MOVERIO Pro Developer's Guide (Rev.1.4)
Page 7

1. Introduction

MOVERIO Pro Developer's Guide (Rev.1.4) 1
Page 8

1.1. Product Summary and Functions

The BT-2000/2200 is a smart headset for business use. The same optical see-through
technology as the consumer orientated MOVERIO BT-200 has been adopted. This allows
information to be displayed across a wide viewing area while keeping eye movement to a
minimum, thereby reducing fatigue and making it suitable for use at work. This also allows you
to view your surroundings while projecting an image, which adds an aspect of safety.
The weight of the product is supported by the entire head, allowing you to work for long periods
of time without feeling fatigued. You can work while checking images in a hands-free
environment.
MOVERIO Pro Developer's Guide (Rev.1.4) 2
Page 9

1.2. Main System Specifications

Item
Specifications
Model number
MOVERIO Pro BT-2000/2200
Main processor
OMAP4460 (dual core ARM Cortex A9)
System clock
Max 1.2 GHz (Auto adjusts according to the system load and temperature)
System software
Android 4.0.4
Internal storage (emmc)
8 GB (2 GB reserved for the system)
Main memory
1 GB
Power
Battery operated/AC power operated
External memory
MicroSD/MicroSDHC supported (32 GB max.)
No. of pixels in LCD panel
960x540 (QHD)/16:9/Refresh rate 60 Hz
Virtual screen size
80" (for virtual viewing distance of 5 m)
Color reproduction
24 bit full color (16,770,000 colors)
3D display
Available (only for side by side)
User interface
Audio commands: supports Japanese and English Hardware keys: Power, lock, D-pad/OK key and A, B, X, Y keys Others: Headset tap input function
Camera
Built-in headset, stereo camera
Sensor
IMU (Gyro/acceleration)/geomagnetic built-in headset
Wi-Fi
IEEE 802.11a/b/g/n, Wi-Fi Direct
Wi-Fi Security
WEP WPA – Enterprise, Personal WPA2 – Enterprise, Personal EAP Types EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC
VPN
PPTP
Bluetooth
A2DP, HSP, HID, OPP, SPP, BLE support
GPS
GPS function, GPS Assist function
*Safety shield is applying ANSI/ISEA Z87.1 (2015 version).
MOVERIO Pro Developer's Guide (Rev.1.4) 3
Page 10

1.3. Basic Information for App Development

Item
Description
CPU/ABI
ARMv7 armeabi
Android API level
15
Device screen density
mdpi
Screen type
Tablet UI
Screen orientation
Fixed at Landscape (without sensor rotation)
USB vendor ID
0x04B8
HOME, MENU, and BACK keys are supported by hardware keys
■ Touch screen and track pad are not used
■ Except for Wi-Fi, data communication, such as 3G, is not supported
This is not a Google Certified device, meaning the following services which require Google
Certification are not available:
- Google Play
- Google location information service
- Additional services only available on Google Certified devices.
MOVERIO Pro Developer's Guide (Rev.1.4) 4
Page 11

1.4. Other Main Functions

Function
Android standard API
EPSON original API
3.Display control
4.UI control
5.Voice command
6.Camera control
7.Sensor control
8.Bluetooth/BLE
9.Power control
10.Self-Diagnostic
11.GPS Assist
BT-2000 can use below functions. As well as the standard Android API, there are functions that
need EPSON original API. Please refer below charts.
Chart1.4.1 Table of each function and which API to use
The following chapters explain how to use these from an app.
For EPSON original API that needs special caution, please refer Chapter 2.1. Pre-Caution for
Developing Apps.
MOVERIO Pro Developer's Guide (Rev.1.4) 5
Page 12

2. Developing Apps

MOVERIO Pro Developer's Guide (Rev.1.4) 6
Page 13

2.1. Pre-Caution for Developing Apps

BT-2000 is using Android platform, but considering the products use purpose, it is applying own
functions. Therefore it is necessary to control by EPSON own API. There are some cases that
Android emulator or Android applications that operated with Android Smartphones may not
operate. Please take attention when transplanting APK or diverting source code. Below API needs
attention specially, please refer details at each chapter.
Module lists that need attention for developing Apps.
Camera ・・・ Chapter 6 Camera control
BLE ・・・ Chapter 8 Bluetooth/BLE
MOVERIO Pro Developer's Guide (Rev.1.4) 7
Page 14

2.2. Summary of Developing Apps

The BT-2000 has adopted Android as the system software. Therefore, you can develop apps for
the BT-2000 in the same environment as developing apps for Android smartphones. However,
when connecting the BT-2000 with the app development computer, or when using functions
unique to the BT-2000, you need to have the PC settings compatible with BT-2000.
This chapter explains the following procedures necessary to develop apps for the BT-2000.
■ Introduction to the Android SDK
■ ADB driver settings
Connecting the BT-2000 to a computer
■ Including the SDK provided by EPSON
MOVERIO Pro Developer's Guide (Rev.1.4) 8
Page 15

2.3. Introduction to the Android SDK

The introduction to the Android SDK assumes the following steps will be performed in a
Windows7 environment.

2.3.1. Acquiring Android Studio

Download Android Studio from the following Website.
https://developer.android.com/sdk/index.html

2.3.2. Acquiring and installing JDK

Download the JDK (7 or later) from the following Website, and then install.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
(Not sure if it’s a good idea to include the link above as it may change over time)

2.3.3. Installing Android Studio

Follow the directions provided by the installer to install Android Studio.
Example) C:\Users\User name\AppData\Local\Android\sdk
* From here on, instructions assume Android Studio is installed in the folder above.
MOVERIO Pro Developer's Guide (Rev.1.4) 9
Page 16

2.3.4. Installing Platform-tools, SDK Platform, and USB Driver

Execute "C:\Users\User name\AppData\Local\Android\sdk\SDK Manager.exe".
* When you start SDK Manager, the dialog "No packages found" may be displayed.
This occurs when the proxy is not set correctly, and information cannot be updated.
Close all dialogs except for "Android SDK Manager", and then set the proxy in [Tools] -
[Options]. When Proxy settings are unknown, please contact network administrator for
Connecting method to external network using Proxy
MOVERIO Pro Developer's Guide (Rev.1.4) 10
Page 17
Select the following necessary files in the SDK Manager, and then install.
[Tools] - [Android SDK Platform-tools]
■ [Android 4.0.3] - [SDK Platform]
■ [Extras] - [Google USB Driver」
Select the above, click [Install], and then select Accept all.
This completes the introduction to the Android SDK.
Next, we will explain how to connect the BT-2000 to the app development computer, and setting
up the ADB driver.
MOVERIO Pro Developer's Guide (Rev.1.4) 11
Page 18

2.4. ADB driver settings

> bcdedit -set testsigning on
Select
Select
Select
Here we will explain how to connect the BT-2000 to the app development computer, and set the
ADB driver.
When using Windows8 OS or later, it is required to operate by test mode to install ADB driver.
When using Windows7 OS or before, proceed to 2.4.2 When using Windows7 OS or before”.

2.4.1. When using Windows8 OS or later

2.4.1.1. Operate by test mode
1) Run the command prompt as administrator, and run below command.
When below error occur by running above command, please refer to
2.4.1.2 When failing test mode command”.
2) Select Setting」→「Change PC Setting from the charm.
3) Select Update and recovery」→「Recovery」→「Restart now.
4) Select Trouble shoot」→「Advanced options from the menu.
MOVERIO Pro Developer's Guide (Rev.1.4) 12
Page 19
5) It will reboot after selecting Windows [Startup Settings].
Select
6) [Startup Settings] screen will show after reboot, so select [Disable Driver Signature
Enforcement].
For procedure from here, please proceed to next chapter2.4.2When using When using Windows
7 OS or before”.
MOVERIO Pro Developer's Guide (Rev.1.4) 13
Page 20
2.4.1.2. When failing test mode command
Select
Select
Select
Select
Test mode command failure is due to lock by Secure Boot.
Please disable Secure Boot by below method.
1)Select Settings」→「Change PC Settings from charm.
2)Select Update and recovery」→「Recovery」→「Restart now.
3)Select Trouble shoot」→「Advanced options」→「UEFI firmware Settings.
4) Find Secure Boot Control and change to Disabled.
MOVERIO Pro Developer's Guide (Rev.1.4) 14
Page 21
5) Save the change and reboot
6) After PC rebooted, operate command prompt by Administrator privileges and run test mode
command.
To make Secure Boot on again, please set by below procedure.
1) Proceed procedure 1) 3) when disabled the setting.
2) Find Secure Boot control and change to Enabled.
3) Save the change and reboot.
7) Execute the procedure of 2.4.1.1 agin.
MOVERIO Pro Developer's Guide (Rev.1.4) 15
Page 22

2.4.2. When using Windows 7 OS or before

;EPSON MOVERIO BT-2 series MTP
%SingleAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C06
%CompositeAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C06&MI_01
; EPSON MOVERIO BT-2 series PTP
%SingleAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C07
%CompositeAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C07&MI_01
2.4.2.1. Editing the Google USB Driver
Settings for the BT-2000 are added to the Google USB Driver installed in the previous item.
Open [C:\Users\User name\AppData\Local\Android\sdk\extras\google\usb_driver\android_winusb.inf]
in a text editor, and then add the following 6 lines to 2 points in the [Google.NTx86] and the
[Google.NTamd64].
MOVERIO Pro Developer's Guide (Rev.1.4) 16
Page 23
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. # USE 'android update adb' TO GENERATE. # 1 USB VENDOR ID PER LINE.
0x04B8
Omit
Omit
2.4.2.2. Vendor ID setting
Set ADB as the vendor ID.
Start the command prompt, run " cd C:\Users\User name\AppData\Local\Android\sdk\tools " and
change the work folder.
Execute the android.bat, and handle the "update adb" argument as shown below.
The file is created in [C:\Users\User name\.android\adb_usb.ini]
Open this file (adb_usb.ini) in notepad, and add the vendor ID (0x04B8) as shown below.
This completes setting up the ADB driver in the app development environment.
The next section explains how to connect the BT-2000 to a computer.
MOVERIO Pro Developer's Guide (Rev.1.4) 17
Page 24

2.5. Connecting the BT-2000 to a computer

This section explains how to connect the BT-2000 to a computer after the ADB driver setting has
been completed.

2.5.1.1. BT-2000 settings

Start the BT-2000, and then select "Settings" - "Developer options" - "USB debugging".

2.5.1.2. Install the BT-2000 driver

Connect a USB cable to the computer on which the BT-2000 is running and the ADB driver
settings are complete.
If the computer does not respond, disconnect the USB cable, restart the BT-2000, and then
reconnect the USB cable.
When "New device detected" is displayed on the computer, select [Control Panel] - [Hardware
and Sound] - [Device Manager].
Right-click [bt2pro] from [Other devices], and then select Update Driver Software.
MOVERIO Pro Developer's Guide (Rev.1.4) 18
Page 25
Select [Browse my computer for driver software].
Select the driver from the following path.
C:\Users\User name\AppData\Local\Android\sdk\extras\google\usb_driver
When [Android Composite ADB Interface] is displayed in [Android Device] as shown below, ADB
connection is available.

2.5.1.3. Checking the connection

You can check if the computer and the BT-2000 are connected by using the ADB check command. Start the command prompt, run "cd C:\Users\ User name \AppData\Local\Android\sdk\tools ", and move the folder.* It is useful to maintain the environment variable path mentioned above. When you execute "adb devices" the message "0123456789ABCDEF2 device" is displayed. ADB connection is complete.
* If this is not displayed, reconnect the BT-2000 to the USB port, and rerun the "adb devices"
command.
MOVERIO Pro Developer's Guide (Rev.1.4) 19
Page 26

2.6. Including the SDK provided by EPSON

2.6.1. Cautions for using SDK provided by EPSON

Please make sure to confirm the version of SDK provided by EPSON and the version of system
software inside BT-2000.
If the version of SDK provided by EPSON used for Apps development and the version of system
software is not matching, due to the difference of API included, developed Apps may not operate.
User using system software version R1.0.4
When updating OS from R1.0.4 to R1.2.1 or later, adding callback API process which is newly
added is required.
This phenomenon may occur in below Apps.
Apps using Voice command class(VoiceCommandClientCallbacks)
If it happens, please solve by below procedure.
1) Change the SDK of Apps development environment to SDK that matching system
software version.
2) Revise the source code according to SDK and re-build.
MOVERIO Pro Developer's Guide (Rev.1.4) 20
Page 27

2.6.2. How to use SDK provided by EPSON

allprojects { repositories { jcenter() }
gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs.add('-Xbootclasspath/p:C:/Users/<user name>/AndroidStudioProjects/<application name>/app/libs/H725Ctrl.jar') } }
}
The following procedures assume app development in Android Studio.
1) Display Project View of Android Studio, and then create libs folder from
[File]-[New]-[Directory].
2) C:\Users\<user name>\AndroidStudioProjects\<application name>\app\libs will be
created, and put H725Ctrl.jar to this folder.
When created project folder is C:\Users\<user name>\AndroidStudioProjects
Explanation from now on is based on that project is at C:\Users\<user
name>\AndroidStudioProjects\<application name>.
3) Press Sync Project with Gradle Files button where it is above of AndroidStudio, reflect
Gradle change to the project.
4) Open build.gradle(Project: <application name>) in the left window of AndroidStudio,
and then edit as below.
MOVERIO Pro Developer's Guide (Rev.1.4) 21
Page 28
5) Once, run Clean Project from Build items of AndroidStudio.
SDK settings are completed by above.
On edit display, EPSON original API like getSupportedEpsonCameraModes() are still not solved,
but please ignore and run app, and install application to the equipment. Unsolved method will
operate normally.
MOVERIO Pro Developer's Guide (Rev.1.4) 22
Page 29

2.6.3. To solve unsolved situation by Android Studio

By below method, you can solve the unsolved situation temporary and use code completion
function.
1) Open C:\Users\<user name>\AndroidStudioProjects\<application name>\app\app.iml
2) Move line of
<orderEntry type="library" exported="" name="H725Ctrl" level="project" />
to the line above
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK"/>
This will increase the priority of H725Ctrl.jar in AndroidStudio, and can solve the unsolved
situation temporary and use code completion function.
Limited items
Due to AndroidStudio specification, after running like rebuild and update gradle contents,
app.iml will be updated too and EPSON original API will return to unsolved situation. Please
proceed above 1), 2) again. Run after build will not be affected.
MOVERIO Pro Developer's Guide (Rev.1.4) 23
Page 30

3. Display control

MOVERIO Pro Developer's Guide (Rev.1.4) 24
Page 31

3.1. Display control summary

This chapter explains the display control function for the BT-2000.
The BT-2000 is a smart headset with an optical see-through
function.
You can overlay information on the display using an optical
technique that provides clear images, without disturbing the
view of the user's surroundings. It is also possible to project more information since the device
uses a see-through system allowing images to be projected for both eyes, as opposed to the
single image one-eye type. The advantage with this device is that eye movement is kept to a
minimum, thereby reducing fatigue and making it suitable for use at work.
You can also flip-up the MOVERIO Pro display, which allows you to set the display section by
holding it with one hand when you want to superimpose video or images on your current work
space.
The following section explains the functions and usage methods available.
Full screen display function
Switch between 2D/3D display function (API)
Mute function (API)
Backlight control
See-through function
MOVERIO Pro Developer's Guide (Rev.1.4) 25
Page 32

3.2. Full screen display function

Window win = getWindow(); WindowManager.LayoutParams winParams = win.getAttributes(); winParams.flags 0x80000000 win.setAttributes(winParams);
import android.view.Window; import android.view.WindowManager;
Enable full screen
display
(hide status bar)
Disable full screen
display
(show status bar)
The MOVERIO Pro BT-2000 is based on Android 4.0 Tablet UI. This specification does not
normally allow full display in applications in Android 4.0 Tablet UI; however, you can follow the
steps below to enable full display by specifying a unique flag in the app.
■ Executing full screen in applications Execute the following process in onCreate() for each Activity.
For apps with multiple Activities, execute the above process for each Activity.
■ Add an import definition
MOVERIO Pro Developer's Guide (Rev.1.4) 26
Page 33

3.3. Switch between 2D/3D display function

Left eye image
Right eye image
Total 960
480 pixels
480 pixels
540 pixels
The BT-2000 allows you to display 3D content using Side by side.
The side by side method places images on the left and right of the screen.
When realizing the side by side system with QHD size screen, you need to arrange images from
left to right by reducing 960 x 540 by half(480 x 540 pixels) to create one frame of a QHD
image.
You can use the following interface to separate images for the left and right eyes in the side by
side system, and output each display.
Inport file
jp.epson.moverio.H725.DisplayControl
Constructor
DisplayControl(Context context)
MOVERIO Pro Developer's Guide (Rev.1.4) 27
Page 34
Interface
int setMode(int DisplayMode, Boolean toast)
Parameter
DisplayMode : 2D/3D mode situation
2D Mode : DisplayControl.DISPLAY_MODE_2D
3D Mode : DisplayControl. DISPLAY_MODE_3D
toast : Switch display/un-display of OSD of 2D/3D
Display : true
Un-display : false
MOVERIO Pro Developer's Guide (Rev.1.4) 28
Page 35

3.4. Backlight control

3.4.1. Adjust backlight brightness

When changing the backlight display built-into the headset, you can change the transparency of
the displayed image.
When the brightness is low, the image is more transparent, and when the brightness is high, the
image is more opaque.
Import file
jp.epson.moverio.H725.DisplayControl
Constructor
DisplayControl(Context context)
Interface
Display brightness settings
int setBacklight(int backlight)
Display brightness acquisition
int getBacklight()
Parameter
backlight: Brightness level 0 (dark) to 20 (bright)
Return value
Run result 0 (Success), -1(Failure)
MOVERIO Pro Developer's Guide (Rev.1.4) 29
Page 36

3.5. Mute function

3.5.1. Display mute

The mute function allows you to temporarily stop displaying images.
Use the following interface to activate and then deactivate mute.
Import file
jp.epson.moverio.H725.DisplayControl
Constructor
DisplayControl(Context context)
Interface
int setMute(boolean mute)
Parameter
mute: Mute ON (TRUE)/OFF (FALSE)
Return value
Execution result 0 (normal value), any other value (error)
MOVERIO Pro Developer's Guide (Rev.1.4) 30
Page 37

3.5.2. Audio mute

The audio mute function allows you to temporarily stop outputting audio.
Use the following interface to activate and then deactivate mute.
Import file
jp.epson.moverio.H725. AudioControl
Interface
int setMute(boolean mute)
Parameter
mute: Mute ON (TRUE)/OFF (FALSE)
Return value
Execution result 0 (normal value), any other value (error)
Attentions
When using int setMute(boolean mute), designate below permission to the Manifest file of App.
<uses-permission
android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-permission>
MOVERIO Pro Developer's Guide (Rev.1.4) 31
Page 38

3.6. See-through function

Object you want to display
Displayed scene
Real scene view
MOVERIO Pro is a device that uses projection technology.
Projection is displayed by reflecting light through an Active Matrix LCD panel into a light-guided
panel. It is possible to create a half-mirror version (whereby not all the pixels are needed)
allowing images to be arranged over a real-life scene giving a sense of transparency, and creating
a more vivid augmented reality experience.
To create this transparent background effect, so visual elements (text, graphics…) stand out
vividly, the background will need to be set to black when drawing on the projection, so you
display the target section overlapping with the actual images.
(In this situation, we recommend that you do not use the shade.)
The following steps allow you to create this AR effect using the see-through function.
1) Execute full screen support. To reduce the feeling of being in a screen, remove everything except for the necessary image (status bar etc).
2) Make the background black. Make everything black except for the object you want to display. In theory, the black section should keep out external light.
MOVERIO Pro Developer's Guide (Rev.1.4) 32
Page 39

4. UI control

MOVERIO Pro Developer's Guide (Rev.1.4) 33
Page 40

4.1. UI control summary

Button name
Function
Power
Turn the device ON/OFF
Key lock
Enable/disable button input
A button
Back
B button
Home
X button
Menu
Y button
MultiFunctionOSD display (See table 4-2)
D-pad up
Upper input
D-pad down
Lower input
D-pad left
Left input
D-pad right
Right input
Select/OK key
Confirm
LED indicator
Key lock button D-pad (up, down, left, right)
D-pad (select/OK)
Power button
A button
B button
X button
Y button
The user interface for the BT-2000 is composed of 11 hardware buttons; power, key lock, A, B, X, Y, D-pad (up, down, left, right), and the select/OK key. This section explains the functions called when these buttons are pressed, as well as the key assignment change function that is unique to the BT-2000.

4.1.1. Hardware button types and functions

The BT-2000 comes with the hardware buttons shown in figure 4-1. The functions for each
button are shown in table 4-1.
MOVERIO Pro Developer's Guide (Rev.1.4) 34
Figure 4-1 BT-2000 built-in hardware button
Table 4-1 Button name and its function
Page 41
Table 4-2: MultiFunctionOSD display function
MultiFunction operations
Number of times button pressed
Function
Adjustment method
Press once
adjust volume
D-pad up/right: Volume Up
D-pad down/left: Volume Down
Press twice
Adjust brightness
D-pad up/right: Increase screen brightness
D-pad down/left: Decrease screen
brightness
Press three times
Switch between 2D/3D
D-pad up/right: Set 2D
D-pad down/left: Set 3D

4.1.2. Software keyboard

BT-2000 has iWnnIME as standard character input function. When inputting character, below
keyboard will be displayed and can control by D-pad key.
English keyboard
Limited items
SYM key cannot be used by D-pad key. Please connect and use mouse for using 「SYM」 key.
MOVERIO Pro Developer's Guide (Rev.1.4) 35
Page 42

4.1.3. BT-2000 change key assignment function

Button name
Function
Button name
Function
Power
Turn the device
ON/OFF
Power
Turn the device ON/OFF
Key lock
Enable/disable
button input
Key lock
Enable/disable button
input
A button
Back
A button
F1
B button
Home
B button
F2
X button
Menu
Change
mode
X button
F3
Y button
Multi Function OSD
Display
Y button
F4
D-pad up
Move up
D-pad up
Move up
D-pad down
Move down
D-pad down
Move down
D-pad left
Move left
D-pad left
Move left
D-pad right
Move right
D-pad right
Move right
select/OK key
Confirm
select/OK key
Confirm
Hardware button
Default mode Key event
User mode Key event
A button
KeyEvent.KEYCODE_BACK
KeyEvent.KEYCODE_F1
B button
KeyEvent.KEYCODE_HOME
KeyEvent.KEYCODE_F2
X button
KeyEvent.KEYCODE_MENU
KeyEvent.KEYCODE_F3
Y button
( Reserved in the system )
KeyEvent.KEYCODE_F4
D-pad up
KeyEvent.KEYCODE_DPAD_UP
D-pad down
KeyEvent.KEYCODE_DPAD_DOWN
D-pad left
KeyEvent.KEYCODE_DPAD_LEFT
D-pad right
KeyEvent.KEYCODE_DPAD_RIGHT
select/OK key
KeyEvent.KEYCODE_DPAD_CENTER
The BT-2000 allows you to change the functions assigned to the hardware buttons mentioned
above. The standard hardware button assignments are applied in Default mode, the changed
hardware button assignments are applied in User mode.
Default mode User mode
Events called when buttons are pressed
The following key events are generated.
MOVERIO Pro Developer's Guide (Rev.1.4) 36
Page 43
■Using the change function for key assignments
By changing the key assignments, the key codes called when you press the A, B, X, or Y buttons are not the standard Back, Home, or Menu buttons in Android, instead, the key codes are changed to F1 to F4. Therefore, you can include optional functions to the F1 to F4 codes making use of the A, B, X, and Y buttons as with the application's original function.
■ Specifications for status transitions in key assignment mode
Status transitions (where the value of the key is changed) for the key assignment mode cannot be set in the app; they should be set in the system. Management of key assignment mode must be done by last application before switched. For example, when the key assignment mode for application A is set to User mode, and then a different application B is started, the key assignment mode for application B is also set to User mode.
Specifications for status transitions in key assignment mode when using iWnnIME
The BT-2000 is equipped with a standard iWnnIME text input system. This system uses the Back, Menu, and D-pad keys for input, and automatically changes the key assignments to Default mode when starting up the BT-2000. When closing an app, the key assignment mode changes to the mode set in iWnnIME for the last app that was started, however operations are not guaranteed when an error occurs or if the app does not close normally. When an app is constructed with multiple source calls, and calls that apply not just iWnnIME, we recommend managing the key assignment status according to each app that is started.
Notes on switching key assignment during key operation Switching key assignment during pressing and holding the key may cause the wrong key events to be recognized as it pressed. Dont call the switching API when the key is pressed for a long time.
Notes on function assignment to the simultaneous key press If you hold down "up"+"down"+"OK" or "left"+"right"+"OK" at the same time, the key lock will operate. Please do not assign function to press this button simultaneously.
MOVERIO Pro Developer's Guide (Rev.1.4) 37
Page 44

4.2. Application interface list

NO.
Function name
Function summary
Notes
1
getKeyAssignMode
Acquires the mode for the current key
assignment.
2
setKeyAssignMode
Set and apply a key assignment mode.
Tables 4-3 provide a list of application interfaces for changing key assignments.
You also need to import the following models to use each API.
android.btutil.KeyAssign
Table 4-3 android.btutil.KeyAssign for application interface list
MOVERIO Pro Developer's Guide (Rev.1.4) 38
Page 45

4.3. Application interface details

Model
Explanation
Int
- KEYASSIGN_MODE_DEFAULT: Default mode
- KEYASSIGN_MODE_USER: User mode
static int getKeyAssignMode (void);
int mode;
/*Acquire the current mode*/
mode = KeyAssign.getKeyAssignMode ();
if (mode == KeyAssign.KEYASSIGN_MODE_USER) {
/*Process*/
}

4.3.1. getKeyAssignMode

Function
Acquire the mode for the current key assignment.
Format
Parameter
None.
Return value
Usage procedure
MOVERIO Pro Developer's Guide (Rev.1.4) 39
Page 46

4.3.2. setKeyAssignMode

Model name
Explanation
int mode
Key assignment mode to be set. You can specify the value using a macro for the following android.btutil.KeyAssign classes.
- KEYASSIGN_MODE_DEFAULT (or 0)
- KEYASSIGN_MODE_USER (or 1)
boolean setKeyAssignMode(int mode);
/*Set user mode*/
KeyAssign.setKeyAssignMode (KeyAssign.KEYASSIGN_MODE_USER);
Function
Set key assignment mode and apply to the system.
Format
Parameter
Return value
true: setting succeeded
false: setting failed
Use procedure 1
MOVERIO Pro Developer's Guide (Rev.1.4) 40
Page 47

5. Voice commands

MOVERIO Pro Developer's Guide (Rev.1.4) 41
Page 48

5.1. Pre-cautions for developing Voice commands Apps

Please make sure to confirm the version of SDK provided by EPSON and the version of system
software inside BT-2000.
If the version of SDK provided by EPSON used for Apps development and the version of system
software is not matching, due to the difference of API included, developed Apps may not operate.
User using system software version R1.0.4
When updating OS from R1.0.4 to R1.2.1 or later, adding callback API process which is newly
added is required.
This phenomenon may occur in below Apps.
Apps using Voice command class(VoiceCommandClientCallbacks)
If it happens, please solve by below procedure.
1) Change the SDK of Apps development environment to SDK that matching system software
version.
2) Revise the source code according to SDK and re-build.
MOVERIO Pro Developer's Guide (Rev.1.4) 42
Page 49

5.2. Voice commands summary

The BT-2000 voice command will select the voice information file(lms file), and recognizes the
voice included in this information, and returns the corresponding ID. Voice is inputted using a
microphone, and the device recognizes the voice that has been registered*.
By mounting a process in the application for each ID acquired by callback, voice input can be used
as a trigger.
* Only vocabulary that is included in the voice information file can be recognized, this differs from
the standard sound recognition software that uses network access to confirm words.
MOVERIO Pro Developer's Guide (Rev.1.4) 43
Page 50

5.3. Application interface function summary

You can use the following functions by using audio command API.
(1) Connect to a service class that provides audio command functions.
(2) Disconnect from a service class that provides audio command functions.
(3) Acquire an interface to control audio commands.
(4) Register a callback.
(5) Cancel a callback.
(6) Set parameters used for the audio recognition start conditions.
(7) Enable audio input status.
(8) Disable audio input status.
(9) Receive the recognition result of voice commands
(10) Receive the situation of if voice commands can receive the input
To use API, execute VoiceCommandClient.bindToRemoteRunningService() first and connect to a
service class that provides a voice command function. Next, execute
VoiceCommandClient.registerCallback() to register a callback to receive recognition results.
When connection to the service is complete, execute getVoiceCommandSystemInterface() to
acquire the interface for controlling the voice command function.
MOVERIO Pro Developer's Guide (Rev.1.4) 44
Page 51

5.4. Application interface list

NO.
Function name
Function summary
1
setSnr
Set parameters used for the voice recognition start
conditions. Set the recognition start conditions according to the amount (S/N ratio) of surrounding voice (noise) compared with the input voice.
2
getSnr
Acquire the current value for the set S/N ratio.
3
setAmp
Set parameters used for the voice recognition start
conditions. Set the recognition start conditions according to the amplitude for the input voice.
4
getAmp
Acquire the setting for the amplitude of the current input
voice.
5
start
Enable voice input.
6
stop
Disable voice input.
NO.
Function name
Function summary
1
registerCallback
Register a callback to acquire the recognition
results for a voice command.
2
unRegisterCallback
Cancel a callback to acquire the recognition
results for a voice command.
3
getVoiceCommandSystemInterface
Acquire an IVoiceCommandInterface class as
the interface to control voice commands.
4
bindToRemoteRunningService
Connect to a service class of voice commands.
5
unBindFromRemoteRunningService
Disconnect from a service class of voice
commands.
Tables 5-1 and 5-2 provide a list of application interfaces for using the voice command function.
You also need to import the following models to use each API.
android.media.epson.IVoiceCommandInterface
android.media.epson.IVoiceCommandServiceCallbacks
android.media.epson.VoiceCommandClient
android.media.epsonVoiceCommandClientCallbacks
Table 5-1 android.media.epson.IVoiceCommandInterface for application interface list
Table 5-2 android.media.epson. VoiceCommandClient for application interface list
MOVERIO Pro Developer's Guide (Rev.1.4) 45
Page 52
Table5-3 android.media.epson. VoiceCommandClientCallbacks application interface list
NO.
Function name
Function summary
1
onServiceConnected
Called after connection to service class
implementing callback of voice command function has completed.
2
onServiceDisconnected
Called when service controlling voice
command is stopped for some reasons.
3
onVoiceCommand
Callback for receiving voice command
recognition result.
4
onSpeakable
Callback for receiving if voice command
system is accepting voice input or not
MOVERIO Pro Developer's Guide (Rev.1.4) 46
Page 53

5.5. Application interface details

Model
Explanation
boolean
Success: true, Failure: false
Model
Explanation
float
The current S/N ratio value used as the recognition start condition.
boolean setSnr (float snr) throws RemoteException;
float getSnr() throws RemoteException;

5.5.1. setSnr

Function
Set parameters used for the voice recognition start conditions. Set the recognition start
conditions according to the amount (S/N ratio) of voice (noise) being input in the usage environment.
Format
Parameter
Value of the S/N ratio to be set. Minimum: 0, Maximum: 255.99, default: 10.0 If the value is too large, the app should not be influenced by surrounding noise, however the user will need to talk loudly to trigger a response.
For recommended value, refer to 5.7.2 Recommended value of voice recognition
starting condition.
Return value

5.5.2. getSnr

Function
Acquire the set S/N ratio.
Format
Parameter
None.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 47
Page 54

5.5.3. setAmp

Model
Explanation
boolean
Success: true, Failure: false
boolean set Amp (int amp) throws RemoteException;
Function
Set parameters used for the voice recognition start conditions. Set the amplitude value as
one of the recognition start conditions.
Format
Parameter
Value of the amplitude to be set. Minimum: 0, Maximum: 32767, default: 1024 If the value is too large, the app should not be influenced by surrounding noise, however the user will need to talk loudly to trigger a response.
For recommended value, refer to 5.7.2 Recommended value of voice recognition
starting condition.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 48
Page 55

5.5.4. getAmp

Model
Explanation
Int
Receive the value for the amplitude as the input voice recognition start condition.
Model
Explanation
boolean
Success: true, Failure: false
int getAmp() throws RemoteException;
boolean start(String path) throws RemoteException;
Function
Acquire the set amplitude value.
Format
Parameter
None.
Return value

5.5.5. start

Function
Format
Parameter
Enable voice input status.
Absolute path to the lms file. When null is specified, the lms file stored in the system is automatically selected and set (the default lms file will be used) based on the region information for the operating system of the BT-2000.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 49
Page 56

5.5.6. stop

Model
Explanation
boolean
Success: true, Failure: false
boolean stop(void) throws RemoteException;
void registerCallback(VoiceCommandClientCallbacks cb)
Function
Format
Parameter
Return value
Disable voice input.
None.

5.5.7. registerCallback

Function
Register a callback to acquire the recognition results for a voice command.
Format
Parameter
VoiceCommandClientCallbacks class object
Return value
None
MOVERIO Pro Developer's Guide (Rev.1.4) 50
Page 57

5.5.8. unRegisterCallback

Model
Explanation
IVoiceCommandInterface
Interface for voice command control
void unRegisterCallback()
IVoiceCommandInterface getVoiceCommandSystemInterface()
Function
Cancel a callback to acquire the recognition results for a voice command.
Format
Parameter
None.
Return value
None.

5.5.9. getVoiceCommandSystemInterface

Function
Acquire a class as the interface to control voice commands.
Format
Parameter
None.
Return value
Cautions
Execute inside or after VoiceCommandClientCallbacks.onServiceConnected().
MOVERIO Pro Developer's Guide (Rev.1.4) 51
Page 58

5.5.10. bindToRemoteRunningService

void bindToRemoteRunningService(Activity activity);
void unBindFromRemoteRunningService(Activity activity)
Function
Connect to a service class that provides voice command functions.
Format
Parameter
An Activity object connected to the voice command service.
Return value
None.

5.5.11. unBindFromRemoteRunningService

Function
Disconnect from a voice command service.
Format
Parameter
An Activity object connected to the voice command service.
Return value
None.
MOVERIO Pro Developer's Guide (Rev.1.4) 52
Page 59

5.5.12. onVoiceCommand

Model
Explanation
int id
ID number of the detected word
String word
Character string of the detected word
void onVoiceCommand(int id, String word)
Function
When detecting word that voice command system detected, callback returning ID of
the word and character string.
Format
Parameter
Return value
None
MOVERIO Pro Developer's Guide (Rev.1.4) 53
Page 60

5.5.13. onSpeakable

Model
Explanation
boolean on
true: Voice input acceptable situation false: Voice input not acceptable situation
void onSpeakable(boolean on)
Function
Callback noticed when voice command system voice receiving situation has changed.
Format
Parameter
Return value
None
MOVERIO Pro Developer's Guide (Rev.1.4) 54
Page 61

5.6. Sample code

package com.epson.moverio.bt2pro.sample.vcmd; import android.media.epson.IVoiceCommandInterface; import android.media.epson.VoiceCommandClient; import android.media.epson.VoiceCommandClientCallbacks; import android.os.Bundle; import android.os.RemoteException; import android.app.Activity; import android.content.Context; import android.view.View; import android.widget.Button; import android.widget.Toast;
public class MainActivity extends Activity implements VoiceCommandClientCallbacks { private Context mContext = null; private Button mStartButton = null; private Button mStopButton = null; private VoiceCommandClient mVoiceCommandClient = null; private IVoiceCommandInterface mVoiceCommandSystem;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mContext = getApplicationContext();
mVoiceCommandClient = new VoiceCommandClient(); mVoiceCommandClient.bindToRemoteRunningService(this);
mStartButton = (Button) findViewById(R.id.start); mStartButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { mVoiceCommandSystem.start("/system/vendor/bin/epe_au01_j1.lms"); } catch (RemoteException e) { e.printStackTrace(); } } });
mStopButton = (Button) findViewById(R.id.stop); mStopButton.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { try { mVoiceCommandSystem.stop(); } catch (RemoteException e) { e.printStackTrace(); } } }); } @Override protected void onResume() { super.onResume(); mVoiceCommandClient.registerCallback(this); } @Override protected void onPause() {
MOVERIO Pro Developer's Guide (Rev.1.4)
55
Page 62
super.onPause(); mVoiceCommandClient.unRegisterCallback(); } @Override protected void onDestroy() { super.onDestroy(); mVoiceCommandClient.unBindFromRemoteRunningService(this); } @Override public void onServiceConnected() { mVoiceCommandSystem = mVoiceCommandClient.getVoiceCommandSystemInterface(); } @Override public void onServiceDisconnected() { } @Override public void onVoiceCommand(int id, String word) { Toast.makeText(MainActivity.this, "MainActivity ID:"+id+"
"+word, Toast.LENGTH_SHORT).show(); } @Override public void onSpeakable(boolean speakable){ Toast.makeText(MainActivity.this, "RA: " + speakable, Toast.LENGTH_SHORT).show(); } }
MOVERIO Pro Developer's Guide (Rev.1.4) 56
Page 63

5.7. Others

Noise level(dB)
Noisiness
S/N ratio
Amplitude
35dB
Silent
10
1000
55dB
Little noisy
15
1500
70dB
Noisy
15
2500
S/N ratio
Amplitude
Default value
10
1024

5.7.1. Timing for reflecting the setting for the voice recognition start conditions

When audio input recognition switches from disabled to enabled, the voice recognition start
conditions are reflected in the system.
Therefore, if you change the recognition start conditions when audio input is enabled, once call
IVoiceCommandInterface.stop(), disable audio input and call IVoiceCommandInterface.setSnr() to
set the voice recognition starting condition. After IVoiceCommandInterface.start() is called,
setting is then reflected by the system.

5.7.2. Recommended value of voice recognition starting condition

When recognition errors occur often due to noise of using environment, recognition errors can be
reduced by changing the voice recognition starting condition according to the noisinessnoise
level.
Recommended value for each noise level is as below. This parameter is a setting value to have
better voice recognition under white noise or machine noise. Optimum value is different by the
noise type, so please set according to the actual used environment. For setting method, refer to
5.4 Application interface list.
For default value, refer to 5.5.1 setSnr and 5.5.3 setAmp.
MOVERIO Pro Developer's Guide (Rev.1.4) 57
Page 64

5.7.3. Running voice command and video recording together

IDnumber
Voice input
IDnumber
Voice input
IDnumber
Voice input
2
Menu
19
Display Off
33
Action 3
3
Next
21
Blue
34
Action 4
4
Return
22
Red
35
Action 5
5
Enter
23
Green
51
Zoom In
6
Start
24
Yellow
52
Zoom Out
7
Stop
31
Action1
101
Version
18
Display On
32
Action 2
IDnumber
Voice input
IDnumber
Voice input
IDnumber
Voice input
1
Home
15
Go Left
42
Item 2
8
Try again
16
Go Up
43
Item 3
9
Finish
17
Go Down
44
Item 4
10
Connect
21
Blue
45
Item 5
11
Shoot
22
Red
101
Version
12
Rotate
23
Green
13
Setting
24
Yellow
14
Go Right
41
Item1
Due to Android 4.0 specification, voice command and video recording cannot run together.
For video recording, please finish voice command.

5.7.4. Voice information files (lms file) list and vocabulary list

- /system/vendor/bin/epe_au01_E1.lms default lms fileFor English
- /system/vendor/bin/epe_au01_E2.lms
epe_au01_E1.lms
epe_au01_E2.lms
MOVERIO Pro Developer's Guide (Rev.1.4) 58
Page 65

5.7.5. Voice command API usage flow example

See the sample source for voice commands for more details.

5.7.6. Callback onSpeakable for receiving speaking timing

In voice command system, when noise is inputted and judged as speech from S/N ratio or
Amplitude value (Amp value), it enters into recognition process, and will not accept voice input
for a moment. Also after recognizable word is detected, it will be in transferring process to be in
recognition acceptable situation again, so there is a period that cannot accept voice input. By
showing this period as GUI, it can improve voice command convenience. In details, , implement
VoiceCommandClientCallbacks interface of
Android.media.epson.VoiceCommandClientCallbacksand define onSpeakable(), then can receive
speech acceptable timing.
Application to set S/N ratio and amplitude(AMP value) accorded to the environment
If onSpeakable is called when there is no speech situation, three is a possibility of reacting to
surround noise. Therefore, using onSpeakble receiving value as index, set S/N ratio and Amp
value to make value received from onSpeakable becomes always true while not speaking. By this
way, it is possible to set S/N, amplitude (AMP value) more suitable for using environment.
MOVERIO Pro Developer's Guide (Rev.1.4) 59
Page 66

5.7.7. Sample App

This chapter explains about voice command sample App that is pre-installed inBT-2000.
1. App information
App nameVoiceCommandSample.apk
Icon image
2. Summary
BT-2000 has function to recognize voice inputted from voice input equipment like headset
microphone included, judge applicable word exist or not inside registered voice information
file(lms), and notice ID and character string to App according to the judgment. This App is a
sample App using this voce command function.
MOVERIO Pro Developer's Guide (Rev.1.4) 60
Page 67
3. Function
ⅰ.Voice information(lms)file change
BT-2000 has voice information file written in 5.7.4 Voice information file(lms file) list and
vocabulary list inside the system.By specifying these, it is available to detect registered word
of selected file from inputted voice.
ⅱ.Voice detection, receiving detected word and ID by App
When voice is inputted by microphone and applicable voice is detected, ID number related
to the detected word will be noticed to the App. App will display ID and character string of
the detected word to the display by toast.
ⅲ.Voice command parameter setting
Voice command function has a threshold as a parameter to decide whether inputted voice is
am speech by human or a noise. Parameter has 2 series, S/N ratio and AMP value. By
adjusting these, it is available to use voice command function where noise level is high.
S/N ratio setting
Compared to surround noise, how much bigger sound inputted to be decided as a speech
Unit dB.
Min value 0 Max value 255.99 Initial setting 10.0
AMP value setting
Sound pressure level of inputted voice to be decided as a speech.
Min value 0 Max value 32767 Initial setting 1024
MOVERIO Pro Developer's Guide (Rev.1.4) 61
Page 68
4. Sample App operation method
③ ④
⑤ ⑥
A
S/N ratio setting
Display S/N ratio setting value that is currently applied.
S/N ratio changing UI
Can set value by selecting up arrow or down arrow or the value Left 3 figures are integer figure, right 2 figures are decimal figure.
OK buttonFor S/N ratio setting
Set the value selected by to the voice command system.
AMP setting value
Display AMP value that is currently applied.
AMP setting value changing UI
Can set value by selecting up arrow or down arrow or the value
OK buttonFor AMP value setting
Set the value selected by to the voice command system.
Start button, Stop button
Start buttonApply S/N ratio value, AMP value , voice informationlms to the voice command system and make voice detection effective. Stop buttonInvalid voice detection.
Display voice informationlmsfile
Display voice information (lms) file that currently selected. When App started, it displays ”lms file name”. In this situation, when you make voice detection effective, it operates as default voice information (lms) hold inside system as the word recognition list.
Voice informationlms file changing file dialog button
Display file dialog for selecting voice informationlmsfile.
A GUI to display situation whether the voice command system accept voice input or not. When blue microphone is displayed, voice input is acceptable. When red microphone is
displayed, voice input is not acceptable.
MOVERIO Pro Developer's Guide (Rev.1.4) 62
Page 69
Remarks
At timing of Start button pressed, data necessary for system operation like S/N ratio and lms
file will be applied to the system. While voice command is in operationWhen voice detection
is available, setting value like S/N ratio that changed by the App does not apply when
pressing the Start button. In this situation, press Stop button once, stop the voice command
and then change again the setting value and press the Start button.
5. Voice informationlmsfile
Use Voice information lms that is stored inside BT-2000 system. For detail, refer to chapter
5.7.4 Voice information file(lms file) list and vocabulary list.
MOVERIO Pro Developer's Guide (Rev.1.4) 63
Page 70

6. Camera control

MOVERIO Pro Developer's Guide (Rev.1.4) 64
Page 71

6.1. Pre-cautions for developing camera Apps

As BT-2000 is adopting own camera function, take below cautions for developing App using
camera.
To use BT-2000 camera function of 5MDepthSide-by-Side and EDof, it is required to switch
camera settings.
Therefore, different from normal Android equipment, it is adopting concept of camera mode.
Available setting of camera resolution and frame rate is different by each camera mode. Please
specify resolution and frame rate which the applied camera mode is supporting. For details,
refer to 6.3 Available parameters.
MOVERIO Pro Developer's Guide (Rev.1.4) 65
Page 72

6.2. Function summary

Camera mode
Explanation
single-through-vga
Normal still image shooting mode by 640x480 resolution
single-through-720p
Normal still image shooting mode by 1280x720 resolution
single-through-1080p
Normal still image shooting mode by 1920x1080 resolution
single-through-5m
Normal still image shooting mode by 2576x1936 resolution
depth-only
Mode to receive depth information only
side-by-side
Mode for host to create depth information. Can receive the image together from 2 camera sensors by 4096x1936 resolution
EDof
Mode to receive normal still image shooting and depth information at same time
This chapter explains the available camera functions for the BT-2000.
The headset section of the BT-2000 is equipped with a stereo camera which offers a wide
variety of uses including the following three types of camera image.
1) Standard camera images
2) Stereo images using the compound camera
3) Depth (distance) images using the compound camera
You need to change the camera to the target mode. For image combinations supported in each
mode, see table 6-1 , 6-2 and 6-3.
Table 6-1 Camera mode
By each camera mode, shooting area(viewing angle) and aspect ratio of preview and still
image shooting is different.
Especially for single-throgh-1080p camera mode, shooting area is narrow compared to other
camera mode.
MOVERIO Pro Developer's Guide (Rev.1.4) 66
Page 73

6.3. Available parameters

Parameter name
Setting region
Default value
Camera Mode
single-through-vga / single-through-720p / single-through-1080p / single-through-5m / depth-only / side-by-side / EDof
Single-through-720p
Preview resolution*1
1080p / 720p / VGA
720p
Video resolution
720p/VGA
-
Depth ON/OFF*1
OFF/ON
OFF
Frame rate*1
60/30/15/7.5
15
Exposure comensation*2
-5 to +6
0
White balance*2
Daylight/ Fluorescent/ Warm florescent
Fluorescent
Sharpness
-3 to +3
0
Contrast
-3 to +3
0
Camera Mode
Still image
resolution
Preview resolution
Frame rate
single-through-vga
640x480
640x480
7.5fps 15fps 30fps 60fps
single-through-720p
1280x720
640x480
1280x720
7.5fps 15fps 30fps
single-through-1080p
1920x1080
640x480
1280x720
1920x1080
7.5fps 15fps
single-through-5m
2576x1936
640x480
1280x720
1920x1080
7.5fps
depth-only - -
7.5fps 15fps
side-by-side
side-by-side
4096x1936
640x480
EDof
2576x1936
640x480
1280x720
7.5fps
A list of available parameters is provided in table 6-2 and 6-3.
Table 6-2 List of available parameters
*1: The available range varies depending on the mode. See table 6-3 for more information. *2: Auto exposure works from system software version R1.4.0, and will automatically change the exposure setting
according to surround brightness. If the result of auto exposure is too bright or toodark, please compensate the brightness by exposure compensation.
*3: White balance is set manually. Make setting according to your usage environment.
Table 6-3 List of main parameter combinations
MOVERIO Pro Developer's Guide (Rev.1.4) 67
Page 74

6.4. Image organization and format

You can acquire the following three types of data using API in the BT-2000.
Standard images (NV21)
Side by Side images (NV21)
Depth (distance) data (8bit Gray Scale)
Figure 6-1 Example of standard images
Figure 6-2 Example of side by side images
Depth data is explained in the next section.
MOVERIO Pro Developer's Guide (Rev.1.4) 68
Page 75

6.5. Depth data characteristics

Far
Near
the 540x380 area is available
50pixel
50pixel
Depth data is managed using 8 bit gray scale data, whereby the data values (brightness)
indicate the distance.
The higher the depth value brings the depth data distance closer, and reducing the value makes
it further away. When converting the brightness as gray scale data, the highest value of 255
brings the distance closer, and the lowest value of 0 makes it further away.
Figure 6-3 Shooting depth images
Furthermore, use data inferred in this way as the correct value is not provided in the product
specifications for depth data with a 50 pixel edge.
Except for surrounding 50
pixels,
Figure 6-4 Available range for depth data
MOVERIO Pro Developer's Guide (Rev.1.4) 69
Page 76
For the relationship between the distance and depth data, see the following table. Note that changes and calculation errors in the shooting environment for the depth data may also occur.
Equation 6-1
Distance: Distance = 10 × 255 𝐷𝑒𝑛𝑠𝑖𝑡𝑦 [𝑐𝑚]
As Depth data is received by Java byte type, it is shown by -128127. So to handle Depth
data as Density, it is required to cast to int type and convert to 0255.
Java Code ex. int intDencity = byteDepthData & 0xFF;
MOVERIO Pro Developer's Guide (Rev.1.4) 70
Page 77

6.6. Application interface function summary

The following explains how to use API to achieve the following three functions.
1) Set the camera mode, frame rate, preview resolution, and camera resolution for the
BT-2000, and display a preview.
2) Process the image data in the app.
3) Acquire depth information with the application.
Note that the API specification explained in this section is not thread safe in compliance with the
specifications compared to android.hardware.Camera, and therefore cannot be used at the
same time for multiple threads.
The following 13 APIs are used in (1).
1-1 getSupportedEpsonCameraMode 1-2 setEpsonCameraMode 1-3 getEpsonCameraMode 1-4 setPreviewFpsRange 1-5 setPreviewSize 1-6 getSupportedSharpnessMin 1-7 getSupportedSharpnessMax 1-8 getSharpness 1-9 setSharpness 1-10 getSupportedContrastMin 1-11 getSupportedContrastMax 1-12 getContrast 1-13 setContrast
The following 5 APIs are used in (2).
2-1 onPreviewFrame 2-2 setPreviewCallback 2-3 setOneShotPreviewCallback 2-4 setPreviewCallbackWithBuffer 2-5 addCallbackBuffer
The following 4 APIs are used in (3).
3-1 onDepthMap 3-2 setDepthCallback 3-3 startDepthStreaming 3-4 stopDepthStreaming
MOVERIO Pro Developer's Guide (Rev.1.4) 71
Page 78

6.7. Application interface list

NO.
Function name
Function summary
Notes
1
getSupportedEpsonCameraMod
e
Acquire a list of modes supported by the
camera.
Epson original API
2
setEpsonCameraMode
Set the camera mode.
Epson original API
3
getEpsonCameraMode
Acquire the current camera mode setting.
Epson original API
4
setPreviewFpsRange
Set the frame rate range.
Standard Android API
5
setPreviewSize
Set the preview resolution.
Standard Android API
6
getSupportedSharpnessMin
Acquire the minimum available sharpness value.
Epson original API
7
getSupportedSharpnessMax
Acquire the maximum available sharpness
value.
Epson original API
8
getSharpness
Acquire the current sharpness value.
Epson original API
9
setSharpness
Set the sharpness value.
Epson original API
10
getSupportedContrastMin
Acquire the minimum available contrast value.
Epson original API
11
getSupportedContrastMax
Acquire the maximum available contrast value.
Epson original API
12
getContrast
Acquire the current contrast value.
Epson original API
13
setContrast
Set the contrast value.
Epson original API
NO.
Function name
Function summary
Notes
1
Camera.PreviewCallback.onPre viewFrame
Describes processing content when acquiring image data.
Standard Android API
2
Camera.setPreviewCallback
Register the image data acquisition callback method. Called repeatedly when image data is acquired.
Standard Android API
3
Camera.setOneShotPreviewCall back
Register the image data acquisition callback method. Calls once for each image data registered.
Standard Android API
4
Camera.setPreviewCallbackWit hBuffer
Register the image data acquisition callback method. You can raise the processing efficiency by specifying a buffer.
Standard Android API
5
Camera.addCallbackBuffer
Register the buffer used in setPreviewCallbackWithBuffer.
Standard Android API
Tables 6-4 and 6-5 provide a list of application interfaces for using the following functions.
1) You can change the camera mode, frame rate, and preview resolution for the BT-2000, and
display a preview.
2) Acquire preview data with the application. You also need to import the following models to use each API.
android.hardware.Camera
Table 6-4 Camera.Parameters application interface list
Table 6-5 Callbackinterface list when using camera
MOVERIO Pro Developer's Guide (Rev.1.4) 72
Page 79
By using the API provided by the BT-2000, you can display a preview and handle image data.
(1) Set Mode
(2) Receive the images
Camera.open
Camera.getParameters
Camera.Parameters.
setEpsonCameraMode
Camera.startPreview
Camera.stopPreview
Camera.setParameters
Camera.
setPreviewCallback
Camera.PreviewCallback.
onPreviewFrame
If the callback is registered...
Register callback method
In either situation, you need to set the camera parameters. You can change the camera mode, frame rate, preview resolution, and camera resolution. However, when setting the camera parameters, you need to stop the previews temporarily by using stopPreview. Also, make sure you use pre-established parameter combinations. Note that values larger than 1080p set for the preview will not be displayed. When handling image data, you need to register the image data acquisition callback method. Figure 6-5 shows an example of the flow for the API used in this guide. After starting the camera, the camera mode is set and the preview starts. During a preview, you can register the image acquisition callback method as necessary, and acquire images. Execute processing for the acquired images in the app.
* Because the API in this guide does not comply with the android.hardware.Camera specifications and thread safe are not available, do not handle multiple threads at the same time.
MOVERIO Pro Developer's Guide (Rev.1.4) 73
Figure 6-5 Example of API usage flow
Page 80

6.8. Application interface details

Model
Explanation
List<String>
Acquire the current camera mode set in the BT-2000.
Camera mode
Explanation
single-through-vga
Normal still image shooting mode by 640x480 resolution
single-through-720p
Normal still image shooting mode by 1280x720 resolution
single-through-1080p
Normal still image shooting mode by 1920x1080 resolution
single-through-5m
Normal still image shooting mode by 2576x1936 resolution
depth-only
Mode to receive depth information only
side-by-side
Mode for host to create depth information. Can receive the image together from 2 camera sensors by 4096x1936 resolution.
EDof
Mode to receive normal still image shooting and depth information at same time. Camera resolution and shooting resolution are 2576x1936.
List<String> getSupportedEpsonCameraMode (void);

6.8.1. getSupportedEpsonCameraModes

Function
Acquire a list of camera modes supported by the BT-2000 camera.
Format
Parameter
None.
Return value
Camera mode list
MOVERIO Pro Developer's Guide (Rev.1.4) 74
Page 81
Procedure (camera is a Camera class object)
/*Start camera*/
camera = Camera.open();
/*Acquire current parameters*/
Camera.Parameters params = camera.getParameters();
/*Acquire provided camera mode*/
List<String> Supported = params.getSupportedEpsonCameraMode();
MOVERIO Pro Developer's Guide (Rev.1.4) 75
Page 82

6.8.2. setEpsonCameraMode

Model name
in/out
Explanation
String mode
in
Set camera mode. Set using macros for the following seven Camera.Parameters classes.
- EPSON_CAMERA_MODE_SIDE_BY_SIDE
- EPSON_CAMERA_MODE_SINGLE_THROUGH_VGA
- EPSON_CAMERA_MODE_SINGLE_THROUGH_720P
- EPSON_CAMERA_MODE_SINGLE_THROUGH_1080P
- EPSON_CAMERA_MODE_SINGLE_THROUGH_5M
- EPSON_CAMERA_MODE_DEPTH_ONLY
- EPSON_CAMERA_MODE_EDOF
Macro
Camera mode
EPSON_CAMERA_MODE_SIDE_BY_SIDE
side-by-side
EPSON_CAMERA_MODE_SINGLE_THROUGH_VGA
single-through-vga
EPSON_CAMERA_MODE_SINGLE_THROUGH_720P
single-through-720p
EPSON_CAMERA_MODE_SINGLE_THROUGH_1080P
single-through-1080p
EPSON_CAMERA_MODE_SINGLE_THROUGH_5M
single-through-5m
EPSON_CAMERA_MODE_DEPTH_ONLY
depth-only
EPSON_CAMERA_MODE_EDOF
EDof
void setEpsonCameraMode ( String mode );
Function
Set the BT-2000 camera mode.
Format
Parameter
Return value
None.
Measurement table for macro and camera mode
MOVERIO Pro Developer's Guide (Rev.1.4) 76
Page 83
Use procedure 1 (when side by side is set)
/*Start camera*/
camera = Camera.open();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*Set camera mode to side by side*/
params.setEpsonCameraMode(Camera.Parameters.EPSON_CAMERA_MO DE_SIDE_BY_SIDE);
/*Reflect camera setting in camera device*/
camera.setParameters(params);
/*Start preview*/
camera.startPreview();
/*Stop preview*/
camera.stopPreview();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*From here on, use procedure 1*/
Use procedure 2 (when preview has already started)
Remarks
After setting the camera mode in setEpsonCameraMode, be sure to perform
setParameters. Changed content is not reflected in the camera device until setParameters is executed.
When the preview has already started, use stopPreview to temporarily stop the
preview, and then set the camera mode.
Each camera mode has a limited combination of preview resolutions and frame rates.
Note that a run-time exception will occur in setParameters for combinations that exceed the limit.
The parameters for associated frame rates and preview resolutions will not change
even if you set the camera mode in setEpsonCameraMode. Application developers should set these parameters using appropriate combinations before executing setParameters. Please refer to Table 6-4 for available setting parameters.
Capturing resolution is fixed by each mode. Change setting by using setPictureSize
which is Android standard API is not available.
MOVERIO Pro Developer's Guide (Rev.1.4) 77
Page 84

6.8.3. getEpsonCameraMode

Model
Explanation
String
You can acquire the current camera mode as a return value.
”side-by-side” ”single-through-vga” “single-through-720p” “single-through-1080p” “single-through-5m” ”depth-only” “edof”
String getEpsonCameraMode (void);
/*Start camera*/
camera = Camera.open();
/*Acquire current parameters*/
Camera.Parameters params = camera.getParameters();
/*Acquire the current camera mode*/
String mode = params.getEpsonCameraMode();
Function
Acquire the current camera mode.
Format
Parameter
None.
Return value
Usage procedure
MOVERIO Pro Developer's Guide (Rev.1.4) 78
Page 85

6.8.4. setPreviewFpsRange

Model name
in/out
Explanation
int min
in
Minimum value for preview FPS (Set the value in multipliers of 1000, so 7.5 fps would be 7500)
int max
in
Maximum value for preview FPS (Set the value in multipliers of 1000)
void setPreviewFpsRange ( int min, int max );
/*Start camera*/
camera = Camera.open();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*Set camera mode to side by side*/
params.setPreviewFpsRange(7500, 7500);
/*Reflect camera setting in camera device*/
camera.setParameters(params);
/*Start preview*/
camera.startPreview();
Function
Set the minimum and maximum values for the frame rate.
You need to set the maximum and minimum values to same values that can be
acquired in getSupportedPreviewFpsRange().
Table 6-3 List of main parameter combinations shows the framerate that can be set
for each camera mode.
Format
Parameter
Return value
None.
Use procedure 1 (set the fps to 7.5)
MOVERIO Pro Developer's Guide (Rev.1.4) 79
Page 86
Use procedure 2 (when preview has already started)
/*Stop preview*/
camera.stopPreview();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*From here on, use procedure 1*/
Remarks
After setting the frame rate in setPreviewFpsRange, be sure to perform
setParameters. Changed content is not reflected in the camera device until setParameters is executed.
When the preview has already started, use stopPreview to temporarily stop the
preview.
Each frame rate has a limited combination of preview resolutions and camera
modes. Note that a run-time exception will occur in setParameters for combinations that exceed the limit.
MOVERIO Pro Developer's Guide (Rev.1.4) 80
Page 87

6.8.5. setPreviewSize

Model name
in/out
Explanation
int width
in
Width of preview image
int height
in
Height of preview image
void setPreviewSize ( int width, int height );
Function
Set the preview resolution.
Table 6-3 List of main parameter combinations shows the preview resolutions that can
be set for each camera mode.
Format
Parameter
Return value
None.
MOVERIO Pro Developer's Guide (Rev.1.4) 81
Page 88
Use procedure 1 (Set the camera mode to single-through-5m and the preview resolution
/*Start camera*/
camera = Camera.open();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*Set camera mode to single-through-5m*/
params.setEpsonCameraMode(Camera.Parameters.EPSON_CAMERA_MODE_SINGLE_THROU
GH_5M);
/*Set preview resolution to VGA*/
params.setPreviewSize(640, 480); /*Set frame rate to 7.5fps*/ params.setPreviewFpsRange(7500, 7500);
/*Reflect camera setting in camera device*/
camera.setParameters(params);
/*Start preview*/
camera.startPreview();
/*Stop preview*/
camera.stopPreview();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*From here on, use procedure 1*/
to VGA)
In this example, the width and height of the image are reduced to approximately 1/4 and
displayed in a preview.
Use procedure 2 (when preview has already started)
Remarks
After setting the preview resolution in setPreviewSize, be sure to perform
setParameters. Changed content is not reflected until setParameters is executed.
When the preview has already started, use stopPreview to temporarily stop the
preview.
MOVERIO Pro Developer's Guide (Rev.1.4) 82
Each preview resolution has a limited combination of frame rates and camera
modes. Note that a run-time exception will occur in setParameters for combinations that exceed the limit.
You cannot set single-through-5m or side-by-side as the preview resolution. If
you want to acquire images in single-through-5M or side-by-side, perform shooting by using takePicture.
The resolution set for preview resolution uses image data acquired in
PreviewCallback.
Page 89

6.8.6. getSupportedSharpnessMin/getSupportedSharpnessMax

Model
Explanation
int
Return the minimum/maximum available sharpness value. For the BT-2000, these are -3 and +3.
int getSupportedSharpnessMin ();
int getSupportedSharpnessMax ();
Function
Acquire the minimum/maximum available sharpness value.
Format
Parameter
None.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 83
Page 90

6.8.7. getSharpness

Model
Explanation
int
Return the current sharpness value. For the BT-2000, this is -3 to +3.
int getSharpness ();
Function
Acquire the current sharpness value.
Format
Parameter
None.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 84
Page 91

6.8.8. setSharpness

Model
Explanation
int
Set the sharpness value. For the BT-2000, you can set -3 to +3.
void setSharpness (int);
/*Start camera*/
camera = Camera.open();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*Acquire the current sharpness value*/
int sharpness = params.getSharpness(); sharpness++;
/*When the sharpness value enters an available setting range, it is set*/
if (sharpness <= params.getSupportedSharpnessMax() && sharpness >= params.getSupportedSharpnessMin() ) { params.setSharpness(sharpness); camera.setParameters(params); }
Function
Set the sharpness value.
Format
Parameter
None.
Return value
Usage procedure
Important points
After setting the sharpness value in setSharpness, be sure to perform
setParameters. Changed content is not reflected until setParameters is executed.
MOVERIO Pro Developer's Guide (Rev.1.4) 85
Page 92

6.8.9. getSupportedContrastMin/getSupportedContrastMax

Model
Explanation
int
Return the minimum/maximum available contrast value. For the BT-2000, these are -3 and +3.
int getSupportedContrastMin ();
int getSupportedContrastMax ();
Function
Acquire the minimum/maximum available contrast value.
Format
Parameter
None.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 86
Page 93

6.8.10. getContrast

Model
Explanation
int
Return the current contrast value. For the BT-2000, this is -3 to +3.
int getContrast ();
Function
Acquire the current contrast value.
Format
Parameter
None.
Return value
MOVERIO Pro Developer's Guide (Rev.1.4) 87
Page 94

6.8.11. setContrast

Model
Explanation
int
Set the contrast value. For the BT-2000, you can set -3 to +3.
void setContrast (int);
/*Start camera*/
camera = Camera.open();
/*Acquire current parameter (or default value)*/
Camera.Parameters params = camera.getParameters();
/*Acquire the current contrast value.*/
int contrast = params.getContrast(); contrast++;
/*When the contrast value enters an available setting range, it is set*/
if (contrast <= params.getSupportedContrastMax() && contrast >= params.getSupportedContrastMin() ) { params.setContrast(contrast); camera.setParameters(params); }
Function
Set the contrast value.
Format
Parameter
None.
Return value
Usage procedure
Remarks
After setting the contrast value in setContrast, be sure to perform setParameters.
Changed content is not reflected until setParameters is executed.
MOVERIO Pro Developer's Guide (Rev.1.4) 88
Page 95

6.8.12. onPreviewFrame

Model name
in/out
Explanation
byte[] data
in
Image data acquired from a camera. The default is NV21 format.
Camera camera
in
Camera service object.
void onPreviewFrame ( byte[] data Camera camera );
// App developer applies processing when acquiring image data
private Camera.PreviewCallback mPreviewCB = new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte data[], Camera camera) { Log.d(TAG, "Save preview image"); synchronized (lockObject) { savePreviewData(data); } } };
//Register the callback method at the optimal time
camera.setPreviewCallback(mPreviewCB);
Function
Use the standard Android API.
Describe processing content when acquiring image data.
Format
Parameter
Return value
None.
Usage procedure
MOVERIO Pro Developer's Guide (Rev.1.4) 89
Page 96
Remarks
PreviewCallback cannot guarantee the actual time of image acquisition. If there
are a high volume of calculations being performed in onPreviewFrame, and these are not completed by the time of the next image data acquisition, the next image data will be corrupted. We recommend acquiring image data through a sub-thread.
You can use the following three APIs as the API that registers the callback method.
MOVERIO Pro Developer's Guide (Rev.1.4) 90
Page 97

6.8.13. setPreviewCallback

Model name
in/out
Explanation
Camera.PreviewCallback cb
in
Callback object that receives image data.
void setPreviewCallback ( Camera.PreviewCallback cb );
// App developer applies processing when acquiring image data
private Camera.PreviewCallback mPreviewCB = new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte data[], Camera camera) { Log.d(TAG, "Save preview image"); synchronized (lockObject) { savePreviewData(data); } } };
//Register the callback method at the optimal time
camera.setPreviewCallback(mPreviewCB);
・・・・・・
// When you remove the callback method, register null
camera.setPreviewCallback(null);
Function
When the callback method described in 6.8.12 is registered, it is called each time
image data is acquired. The registered callback method is executed repeatedly while
previewing.
Format
Parameter
Return value
None.
Usage procedure
Remarks
To cancel image data acquisition, register null as the callback method.
MOVERIO Pro Developer's Guide (Rev.1.4) 91
Page 98

6.8.14. setOneShotPreviewCallback

Model name
in/out
Explanation
Camera.PreviewCallback cb
in
Callback object that receives a preview image.
void setOneShotPreviewCallback ( Camera.PreviewCallback cb );
Function
When the callback method described in 6.8.12 is registered, it is called when image
data is acquired. This registered callback method is only executed once.
Format
Parameter
Return value
None.
Usage procedure
The same as the previous section. However, setOneShotPreviewCallback is used as
the registered callback method.
MOVERIO Pro Developer's Guide (Rev.1.4) 92
Page 99

6.8.15. setPreviewCallbackWithBuffer

Model name
in/out
Explanation
Camera.PreviewCallback cb
in
Callback object that receives image data.
void setPreviewCallbackWithBuffer ( Camera.PreviewCallback cb );
Function
When the callback method described in 6.8.12 is registered, it is called when image
data is acquired. The registered callback method is executed repeatedly while
previewing. You can secure buffer processing by specifying a dedicated buffer for
image data processing.
Format
Parameter
Return value
None.
MOVERIO Pro Developer's Guide (Rev.1.4) 93
Page 100
Usage procedure
// App developer applies processing when acquiring image data
private Camera.PreviewCallback mPreviewCB = new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte data[], Camera camera) { Log.d(TAG, "Save preview image"); synchronized (lockObject) { savePreviewData(data); }
// Register the buffer to be used
camera.addCallbackBuffer(mPreviewData); } };
// Register the buffer to be used
camera.addCallbackBuffer(mPreviewData);
//Register the callback method at the optimal time
camera.setPreviewCallbackWithBuffer(mPreviewCB);
Remarks
You need to reserve the buffer region from the application. This provides high-speed processing when compared to setPreviewCallback or
setOneShotPreviewCallback by securing and opening the memory.
The application developer needs to describe the buffer management process.
Specifically, the following processes are necessary.
Register the buffer to be used in addCallbackBuffer described later. Calculate the size of the buffer to be registered as the width x height x byte
per 1pixel. The width and the height should both be higher than their respective resolutions.
Each time onPreviewFrame is called, you need to re-register the buffer. If no buffer is registered, the frame is corrupted and is not called by the
callback method.
You can register multiple buffers.
MOVERIO Pro Developer's Guide (Rev.1.4) 94
Loading...