Transcript
INTEL® PERCEPTUAL COMPUTING SDK Samples
Version 1.0
LEGAL DISCLAIMER THIS DOCUMENT CONTAINS INFORMATION ON PRODUCTS IN THE DESIGN PHASE OF DEVELOPMENT. INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR. INTEL MAY MAKE CHANGES TO SPECIFICATIONS AND PRODUCT DESCRIPTIONS AT ANY TIME, WITHOUT NOTICE. DESIGNERS MUST NOT RELY ON THE ABSENCE OR CHARACTERISTICS OF ANY FEATURES OR INSTRUCTIONS MARKED "RESERVED" OR "UNDEFINED." INTEL RESERVES THESE FOR FUTURE DEFINITION AND SHALL HAVE NO RESPONSIBILITY WHATSOEVER FOR CONFLICTS OR INCOMPATIBILITIES ARISING FROM FUTURE CHANGES TO THEM. THE INFORMATION HERE IS SUBJECT TO CHANGE WITHOUT NOTICE. DO NOT FINALIZE A DESIGN WITH THIS INFORMATION. THE PRODUCTS DESCRIBED IN THIS DOCUMENT MAY CONTAIN DESIGN DEFECTS OR ERRORS KNOWN AS ERRATA WHICH MAY CAUSE THE PRODUCT TO DEVIATE FROM PUBLISHED SPECIFICATIONS. CURRENT CHARACTERIZED ERRATA ARE AVAILABLE ON REQUEST. CONTACT YOUR LOCAL INTEL SALES OFFICE OR YOUR DISTRIBUTOR TO OBTAIN THE LATEST SPECIFICATIONS AND BEFORE PLACING YOUR PRODUCT ORDER. COPIES OF DOCUMENTS WHICH HAVE AN ORDER NUMBER AND ARE REFERENCED IN THIS DOCUMENT, OR OTHER INTEL LITERATURE, MAY BE OBTAINED BY CALLING 1-800-548-4725, OR BY VISITING INTEL'S WEB SITE HTTP://WWW.INTEL.COM. ANY SOFTWARE SOURCE CODE REPRINTED IN THIS DOCUMENT IS FURNISHED UNDER A SOFTWARE LICENSE AND MAY ONLY BE USED OR COPIED IN ACCORDANCE WITH THE TERMS OF THAT LICENSE ANY SOFTWARE SOURCE CODE REPRINTED IN THIS DOCUMENT IS FURNISHED UNDER A SOFTWARE LICENSE AND MAY ONLY BE USED OR COPIED IN ACCORDANCE WITH THE TERMS OF THAT LICENSE INTEL, THE INTEL LOGO, INTEL CORE, INTEL MEDIA SOFTWARE DEVELOPMENT KIT (INTEL MEDIA SDK) ARE TRADEMARKS OR REGISTERED TRADEMARKS OF INTEL CORPORATION OR ITS SUBSIDIARIES IN THE UNITED STATES AND OTHER COUNTRIES. MPEG IS AN INTERNATIONAL STANDARD FOR VIDEO COMPRESSION/DECOMPRESSION PROMOTED BY ISO. IMPLEMENTATIONS OF MPEG CODECS, OR MPEG ENABLED PLATFORMS MAY REQUIRE LICENSES FROM VARIOUS ENTITIES, INCLUDING INTEL CORPORATION. *OTHER NAMES AND BRANDS MAY BE CLAIMED AS THE PROPERTY OF OTHERS. COPYRIGHT © 2011-2013, INTEL CORPORATION. ALL RIGHTS RESERVED.
ii
SDK Samples | Intel Corporation
Version 1.0
Optimization Notice Intel compilers, associated libraries and associated development tools may include or utilize options that optimize for instruction sets that are available in both Intel and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel compilers, including some that are not specific to Intel micro-architecture, are reserved for Intel microprocessors. For a detailed description of Intel compiler options, including the instruction sets and specific microprocessors they implicate, please refer to the “Intel Compiler User and Reference Guides” under “Compiler Options." Many library routines that are part of Intel compiler products are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel compiler products offer optimizations for both Intel and Intelcompatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors. Intel compilers, associated libraries and associated development tools 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 Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (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. While Intel believes our compilers and libraries are excellent choices to assist in obtaining the best performance on Intel and non-Intel microprocessors, Intel recommends that you evaluate other compilers and libraries to determine which best meet your requirements. We hope to win your business by striving to offer the best performance of any compiler or library; please let us know if you find we do not.
Notice revision #20110307
iii
SDK Samples | Intel Corporation
Version 1.0
Table of Contents SDK Samples ........................................................................1 List of Samples and Tools ...................................................................... 1 Building Samples .................................................................................. 2 Sample: attribute_detection .................................................................. 3 Sample: audio_recorder ........................................................................ 4 Sample: camera_uvmap........................................................................ 4 Sample: camera_viewer ........................................................................ 5 Sample: depth_smoothing ..................................................................... 6 Sample: face_detection ......................................................................... 7 Sample: face_recognition ...................................................................... 8 Sample: gesture_viewer ........................................................................ 9 Sample: gesture_viewer.cs .................................................................. 10 Sample: gesture_viewer_simple ........................................................... 11 Sample: gesture_viewer_simple.cs ....................................................... 11 Sample: landmark_detection ............................................................... 12 Sample: simple_module ...................................................................... 12 Sample: voice_recognition ................................................................... 13 Sample: voice_recognition.cs ............................................................... 14 Sample: voice_synthesis ..................................................................... 14 Sample: voice_synthesis.cs ................................................................. 14 Tool : camera_info ............................................................................. 15 Tool : capture_viewer ......................................................................... 15 Tool : sdk_info ................................................................................... 17 iv
SDK Samples | Intel Corporation
Version 1.0
v
SDK Samples | Intel Corporation
Version 1.0
SDK Samples The Intel® Perceptual Computing SDK is a library of pattern detection and recognition algorithm implementations exposed through standardized interfaces. This document describes the SDK samples that demonstrate how to use the SDK APIs.
List of Samples and Tools The following samples show the SDK API usages. The samples with a .cs suffix are in C#. Category
Sample
Description
Raw Data Processing
camera_viewer
The sample demonstrates how to capture color and depth images from the camera device and render them on the screen.
camera_uvmap
The sample shows how to map depth pixel coordinates to color pixel coordinates.
depth_smoothing
The sample shows how to smooth raw depth data for more stable depth information.
audio_recorder
The sample demonstrates how to record audio data to WAVE files.
attribute_detection
These samples show how to use the face analysis interface.
SDK Interface
face_detection landmark_detection face_recognition gesture_viewer gesture_viewer.cs gesture_viewer_simple
These samples show finger tracking, pose/gesture recognition, and event notification.
gesture_viewer_simple.cs
voice_recognition voice_recognition.cs voice_synthesis voice_synthesis.cs
1
SDK Samples
Version 1.0
The sample shows how to use the voice recognition interface for voice command and control and dictation. The sample shows how to use the voice synthesis interface.
Intel Corporation
Module Development
simple_module
The sample illustrates how to develop a SDK module.
The SDK provides the following tools for troubleshooting purposes: Sample
Description
capture_viewer
The tool visualizes any color, depth, and audio streams from the input devices.
camera_info
The tool shows essential camera information for maintenance purposes.
sdk_info
This tool shows essential SDK setup information for trouble shooting purposes.
The SDK provides the following framework and game engine samples: Sample
Description
Hellounity
The sample shows how to use the SDK with the Unity* game engine. See $(PCSDK_DIR)\framework\Unity\hellounity\README.txt for details.
Helloprocessing
The sample shows how to use the SDK with the Processing* framework. See $(PCSDK_DIR)\framework\Processing\README.txt for details.
ofxPCSDK
The sample shows how to use the SDK with openFrameworks*. See $(PCSDK_DIR)\framework\openFrameworks\README.txt for details.
Building Samples Most samples come with source code. They are buildable with Microsoft* Visual Studio* 2008 or Microsoft Visual Studio 2010. The building steps are as follows:
2
Click on the sample solution file $(PCSDK_DIR)\sample\
\.sln folder. For example, the camera_viewer sample’s solution file is $(PCSDK_DIR)\sample\camera_viewer\camera_viewer.sln. As the sample is under the privileged directory C:\Program Files. The Microsoft Visual Studio will prompt for alleviated privilege. Accept that to continue the process. Alternatively, you can copy the sample directory to any non-privilleged location. The sample solution file is for Microsoft Visual Studio 2008. For Microsoft Visual Studio 2010, there is a conversion process. Click BuildRebuild to build the sample. SDK Samples
Version 1.0
Intel Corporation
The prebuilt sample binaries are under $(PCSDK_DIR)/bin/$(PlatformName).
Sample: attribute_detection The attribute_detection sample demonstrates how to use the SDK face analysis interface for attribute detection. The sample supports the following command line options: attribute_detection [-sdname