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.
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 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. Don’t 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.
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.
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.
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 name:VoiceCommandSample.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 button(For 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 button(For AMP value setting)
Set the value selected by ⑤ to the voice command system.
⑦ Start button, Stop button
Start button:Apply S/N ratio value, AMP value , voice information(lms) to the voice
command system and make voice detection effective.
Stop button:Invalid voice detection.
⑧ Display voice information(lms)file
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.
Display file dialog for selecting voice information(lms)file.
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 operation(When 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 information(lms)file
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 5M、Depth、Side-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
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 -128~127. So to handle Depth
data as Density, it is required to cast to int type and convert to 0~255.
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
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.
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.
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(bytedata[], 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.
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(bytedata[], 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...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.