Using Extensions for Intel RealSense technology
Web APIs for Intel® RealSense™ technology are now available for Windows applications. (Note: Support for Android will be considered once hardware is available and shipping with this capability.)
Currently, the following features are supported:
- Depth Enhanced Photography (API documentation)
- Scene Perception (API documentation)
- Face Tracking and Recognition (API documentation)
Developers can create 3D-aware web applications that can be run on any Windows tablet with a built-in R200 camera, such as the HP Spectre x2, or a Windows PC with peripheral R200 camera.
Setup
Setup Windows host
Setup the Windows host as described here: Windows System Setup.
Ensure the version of crosswalk-app-tools is 0.10.0 or newer:
> crosswalk-pkg -v
0.10.2
Build a Crosswalk app by referring to this tutorial: Build an Application.
Install RealSense Extensions
Download and unzip the Crosswalk RealSense extensions (740K zipped, 1.7MB unzipped):
- For Crosswalk v19: Crosswalk RealSense Extensions v19
- For Crosswalk v18: Crosswalk RealSenes Extensions v18
(You can also build them by referring to the instructions for building extensions).
Use RealSense Extensions
To add support to your application, do the following:
- Copy the
realsense_extensionsfolder to the root directory of your app. Modify your application's
manifest.jsonto include the realsense extensions:Add
"xwalk_command_line": "--use-rs-video-capture":
{
"name": "My Cool RealSense App",
"start_url": "index.html",
"xwalk_package_id": "com.example.myapp",
"xwalk_command_line": "--use-rs-video-capture",
"xwalk_extensions": [
"realsense_extensions/enhanced_photography",
"realsense_extensions/face",
"realsense_extensions/scene_perception"
]
}
Sample App
The sample code here can used to see how some of the APIs are used. Other examples are provided in the next section.
Download Crosswalk for Windows 19.48.498.0.
Package your app with the Crosswalk Runtime and RealSense Extensions:
> crosswalk-pkg -p windows -c <path to crosswalk zip file> myapp
This creates two files:
com.example.myapp-0.1.0.0.msi: the MSI installer without Intel RealSense SDK (RSSDK) runtime installer.com.example.myapp_with_rssdk_runtime_0.1.0.0.exe: the WiX bootstrapper installer with the RSSDK runtime web installer. It launches the RSSDK runtime web installer to install dependencies during the application installation.
Examples
The following are examples from the API documentation.
Depth Enabled Photography
- Taking a Depth Photo
- Load a Depth Photo from File System
- Load a Depth Photo from Network
- Refocus a Depth Photo
- Access Photo Information
- Use PhotoUtils
- Measure Within a Depth Photo
- Apply Motion Effect
- Photo Segmentation
English
