The Intel® RealSense™ SDK has been discontinued. No ongoing support or updates will be available.
This code sample demonstrates the use of the Intel® RealSense™ SDK for Windows* in a C#/WPF desktop application. This simple app, named BlockHead, utilizes three interesting features of the Intel RealSense SDK:
(Note: The full functionality of this sample app requires a front-facing 3D camera.)
As shown in Figure 1, the app displays the color stream in a WPF Image control and superimposes a cartoon image over the user’s face in real time.
Figure 1. Cartoon Image Superimposed on User’s Face
The cartoon image is programmatically manipulated in real time, based on data acquired from the SDK:
Figure 2. Smile, Tongue-Out, Kissing and Open-Mouth Expressions Detected in Real Time
For this simple demo app, the graphics were created in a drawing program and captured as portable network graphics (.png) files. These images could easily be substituted with artistically rendered transparencies, or even screen captures of friends, caricatures, etc. for a more compelling visual effect.
Different transforms (e.g., ScaleTransform, RotateTransform) are applied to the image object to position it in response to head tracking inputs from the Intel RealSense SDK. These inputs include face location, pose estimation, and expression recognition data.
The SDK can capture around 20 different expressions that can then be evaluated in an application. This particular app focuses on the mouth-oriented expressions: EXPRESSION_KISS, EXPRESSION_MOUTH_OPEN, EXPRESSION_SMILE, and EXPRESSION_TONGUE_OUT. However, it could easily be extended to use the head, eye, and eyebrow expression information as well.
To learn more about this app, pick through the code, and extend it to more interesting use cases leveraging the Intel RealSense SDK, please download it here.
To get started and learn more about the Intel RealSense SDK for Windows, go to https://software.intel.com/en-us/realsense/intel-realsense-sdk-for-windows.
Bryan Brown is a software applications engineer in the Developer Relations Division at Intel. His professional experience includes a mix of software, electronic, and systems design engineering. His technical interests focus on applications of natural interaction and brain-computer interface technologies, with active participation in several alpha developer programs for various emerging technologies in these areas.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804