Visage Tracker Demo sample project

The VisageTrackerDemo sample project demonstrates real-time head / facial features tracking on multiple faces from camera, video file or image based on the VisageTracker tracker class. Currently, tracking is limited to 4 faces, although this can be modified.


The application needs to be rebuilt with license key in order to work properly. More information on how to obtain license key and include it in the application can be found in Licensing section of the documentation.

Building and running the project

The VisageTrackerDemo sample projects is located in the Samples/iOS/VisageTrackerDemo sub-folder of the visage|SDK for iOS folder.

Prerequisites to running the sample project are:

Project is opened in Xcode by double-clicking on the VisageTrackerDemo.xcodeproj project file. To run the project an iOS device first must be attached to the computer and selected as active scheme in Xcode project. The project sample application can than be run by choosing Run option in Xcode.

Using the sample application

The sample application consists of a toolbar with five buttons labeled: Camera, Video, Image, Stop and Quit:

The following images show how the sample application looks like when it is started and when the "Image" button is pressed:


appstart

Figure 1.1: App started


apptrack

Figure 1.2: App is tracking


NOTE: Without a valid license an error message will appear and face tracking will not work.

Implementation overview

The visage|SDK API is written in C++ and since development on iOS is done in Objective-C a special way of interfacing the two must be employed. In this sample project this is done through TrackerWrapper Objective-C class that exposes Objective-C methods for using the tracker, while the implementation of those methods is done in Objective-C++, a combination of Objective-C and C++.

The VisageTrackerViewController (Objective-C class) connects with GUI (that is defined in MainWindow.xib file) and implements actions that calls to methods from TrackerWrapper class to start and stop the tracker and display the tracking results using CustomGLView object.

The specific classes and methods that demonstrate visage|SDK are:

Other important classes are:

More details about each class is available in documentation for specific class.

Users are free to modify the sample project to test the functionalities of the Visage tracker. The sample project also serves as a starting point when creating new projects that will use visage|SDK.

Configuration selection

TrackerWrapper.mm contains the code for device-specific selection of tracking configuration, ensuring optimal tracking performance on different devices by taking into account their performance, camera and screen characteristics. Please read more details about configuration selection in the section Device-specific configuration selection.