1643 lines
35 KiB
HTML
1643 lines
35 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>JSDoc: Class: VisageTracker</title>
|
|
|
|
<script src="scripts/prettify/prettify.js"> </script>
|
|
<script src="scripts/prettify/lang-css.js"> </script>
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="main">
|
|
|
|
<h1 class="page-title">Class: VisageTracker</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<header>
|
|
<h2>
|
|
VisageTracker
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
<article>
|
|
<div class="container-overview">
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="VisageTracker"><span class="type-signature"></span>new VisageTracker<span class="signature">(configurationName)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
VisageTracker is a face tracker capable of tracking the head pose, facial features and gaze for multiple faces in video coming from a video file, camera or other sources.
|
|
<br/><br/>
|
|
Frames (images) need to be passed sequentially to the <a href="VisageTracker.html#track">track()</a> method, which immediately returns results for the given frame.
|
|
<br/><br/>
|
|
The tracker offers the following outputs, available through <a href="FaceData.html">FaceData</a>:
|
|
<ul>
|
|
<li>3D head pose</li>
|
|
<li>facial expression</li>
|
|
<li>gaze information</li>
|
|
<li>eye closure</li>
|
|
<li>iris radius</li>
|
|
<li>facial feature points</li>
|
|
<li>full 3D face model, textured</li>
|
|
</ul>
|
|
<br/><br/>
|
|
|
|
<b>Note</b>: After the end of use VisageTracker object needs to be deleted to release the allocated memory. Example:
|
|
<pre class="prettyprint source"><code>
|
|
<script>
|
|
m_Tracker = new VisageModule.VisageTracker("../../lib/Facial Features Tracker.cfg");
|
|
...
|
|
m_Tracker.delete();
|
|
</script>
|
|
</code></pre>
|
|
<br/><br/>
|
|
|
|
<h5>Dependencies</h5>
|
|
<br/>
|
|
VisageTracker requires data files, configuration files and license key file
|
|
to be preloaded to virtual file system. Data and configuration files can be found in the <i>www/lib</i> folder.
|
|
<br/><br/>
|
|
|
|
<h6>Data files</h6>
|
|
Main tracking data is bundled in the <b>visageSDK.data</b> file and loaded using the <b>visageSDK.js</b> script.
|
|
<br/>
|
|
Additional data is provided for ears tracking feature within <b>visageEarsRefinerData.data</b> along with <b>visageEarsRefinerData.js</b> loader script.
|
|
<br/><br/>
|
|
|
|
<u id="changeLocation"><i>Changing the location of data files</u></i>
|
|
<br/>
|
|
By default, loader scripts expect the <b>.data</b> files to be in the same location as <b>the application's main html file</b>,
|
|
while <b>visageSDK.wasm</b> is expected to be in the same location as <b>visageSDK.js</b> library file.
|
|
However, location of the <i>.data</i> and <i>.wasm</i> files can be changed.
|
|
<br/>
|
|
The code example below shows how to implement <i>locateFile</i> function and how to set it as an attribute to the VisageModule object.
|
|
<br/><br/>
|
|
|
|
<h6>Configuration and license key files</h6>
|
|
Configuration files and the license key files are preloaded using VisageModule's API function assigned to the <i>preRun</i> attribute:
|
|
<pre><code>
|
|
VisageModule.FS_createPreloadedFile(parent, name, url, canRead, canWrite)
|
|
</code></pre>
|
|
where <i>parent</i> and <i>name</i> are the path on the virtual file system and the name of the file, respectively.
|
|
</br></br>
|
|
|
|
</br></br>
|
|
|
|
<h5>visage|SDK initialization order</h5>
|
|
<br/>
|
|
The order in which the VisageModule is declared and library and data scripts are included is important.
|
|
<br/>
|
|
<ul>
|
|
<li> First, <b>VisageModule</b> object is declared
|
|
<ul>
|
|
<li> including preloading of the configuration files, license files and possibly, changing the location of data files
|
|
</ul>
|
|
<li> then <b>visageSDK.js</b> library script is included and
|
|
<li> last, external data loader script is included
|
|
</ul>
|
|
<br/><br/>
|
|
Sample usage - changing data files location and script including order:
|
|
<br/>
|
|
<pre class="prettyprint source"><code>
|
|
<script>
|
|
licenseName = "lic_web.vlc"
|
|
licenseURL = "lic_web.vlc"
|
|
|
|
var locateFile = function(dataFileName) {var relativePath = "../../lib/" + dataFileName; return relativePath};
|
|
|
|
VisageModule = {
|
|
|
|
locateFile: locateFile,
|
|
|
|
preRun: [function() {
|
|
VisageModule.FS_createPreloadedFile('/', 'Head Tracker.cfg', "../../lib/Head Tracker.cfg", true, false);
|
|
VisageModule.FS_createPreloadedFile('/', 'NeuralNet.cfg', "../../lib/NeuralNet.cfg", true, false);
|
|
VisageModule.FS_createPreloadedFile('/', licenseName, licenseURL, true, false, function(){ }, function(){ alert("Loading License Failed!") });
|
|
|
|
}],
|
|
|
|
onRuntimeInitialized: onModuleInitialized
|
|
}
|
|
</script>
|
|
|
|
<script src="../../lib/visageSDK.js"> </script>
|
|
</code></pre>
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h5 id="configTracker">Configuring VisageTracker</h5>
|
|
<br/>
|
|
The tracker is fully configurable through comprehensive tracker configuration files provided in visage|SDK and <a href="VisageConfiguration.html">VisageConfiguration</a>
|
|
class allowing to customize the tracker in terms of performance, quality and other options.
|
|
The configuration files are intended to be used for tracker initialization while the <a href="VisageConfiguration.html">VisageConfiguration</a> class
|
|
allows the specific configuration parameter to change in runtime.
|
|
<br/><br/>
|
|
visage|SDK contains optimal configurations for common uses such as head tracking, facial features tracking and ear tracking.
|
|
<br/><br/>
|
|
The <a href="doc/VisageTracker Configuration Manual.pdf">VisageTracker Configuration Manual</a> (later in text referred to as VTCM) provides the list of
|
|
available configurations and full detail on all available configuration options.
|
|
<br/><br/>
|
|
Specific configuration parameters are used to enable features such as:
|
|
<ul>
|
|
<li>ear tracking</li>
|
|
<li>pupil refinement</li>
|
|
<li>landmarks refinement</li>
|
|
<li>smoothing filter</li>
|
|
</ul>
|
|
<br/>
|
|
|
|
<h6>Ear tracking</h6>
|
|
Ear tracking includes tracking of additional 24 points (12 points per ear).
|
|
Detailed illustration of the points' location can be found in the description of the featurePoints2D member.
|
|
Ears' feature points are part of the group 10 (10.1 - 10.24). Tracking the ears' points require the 3D model with defined ears vertices,
|
|
as well as corresponding points mapping file that includes definition for group 10.
|
|
visage|SDK containes examples of such model files within <i>visageEarsRefinerData.data</i>: <i>vft/fm/jk_300_wEars.wfm</i> and <i>vft/fm/jk_300_wEars.fdp</i>.
|
|
<br/><br/>
|
|
For the list of model's vertices and triangles see chapter <i>2.3.2.1 The jk_300_wEars</i> of <a href="doc/VisageTracker Configuration Manual.pdf">VTCM</a>.
|
|
<br/><br/>
|
|
A set of three configuration parameters is used to configure ear tracking:
|
|
<ul>
|
|
<li><i>refine_ears</i></li>
|
|
<li><i>mesh_fitting_model</i> and <i>mesh_fitting_fdp</i> if fine 3D mesh is enabled, otherwise <i>pose_fitting_model</i> and <i>pose_fitting_fdp</i></li>
|
|
<li><i>smoothing_factors</i> 'ears' group (smoothing_factors[7])</li>
|
|
</ul>
|
|
|
|
visage|SDK provides optimal configuration for ear tracking. Please consult <i>Facial Features Tracker - With Ears.cfg</i> configuration file
|
|
for more details on the set configuration values.
|
|
<br/><br/>
|
|
External data file needed for using ear tracking feature is bundled in:
|
|
<ul>
|
|
<li><i>visageEarsRefinerData.data</i> (along with loding script <i>visageEarsRefinerData.js</i> )</li>
|
|
</ul>
|
|
<br/><br/>
|
|
|
|
<h6>Pupil refinement</h6>
|
|
Pupil refinement improves the precision of pupil center-point detection and provides iris radius information.
|
|
|
|
See process_eyes in chapter <i>2.1. Configuration parameters</i> of <a href="doc/VisageTracker Configuration Manual.pdf">VTCM</a>.
|
|
|
|
<br/><br/>
|
|
|
|
<h6>Landmarks refinement</h6>
|
|
Landmarks refinement improves tracking accuracy and robustness and minimizes tracking jitter at the cost of reduced tracking speed (performance).
|
|
<br/><br/>
|
|
<i>refine_landmarks</i> configuration parameter is used to configure the tracking accuracy.
|
|
See <i>refine_landmarks</i> in chapter <i>2.1. Configuration parameters</i> of <a href="doc/VisageTracker Configuration Manual.pdf">VTCM</a>.
|
|
<br/><br/>
|
|
|
|
|
|
<h6>Smoothing filter</h6>
|
|
The tracker can apply a smoothing filter to tracking results to reduce the inevitable tracking noise.
|
|
Smoothing factors are adjusted separately for different parts of the face. The smoothing settings in the supplied tracker configurations are adjusted
|
|
conservatively to achieve optimal balance between smoothing and delay in tracking response for a general use case.
|
|
<br/><br/>
|
|
See <i>smoothing_factors</i> in chapter <i>2.1. Configuration parameters</i> of <a href="doc/VisageTracker Configuration Manual.pdf">VTCM</a>.
|
|
|
|
<br/><br/><br/>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>configurationName</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last">the name of the tracker configuration file (.cfg; default configuration files are provided in lib folder;
|
|
for further details see <a href="doc/VisageTracker Configuration Manual.pdf">VTCM</a>).
|
|
<br/><br/></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="subsection-title">Methods</h3>
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
<h4 class="name" id="track"><span class="type-signature"></span>track<span class="signature">(frameWidth, frameHeight, p_imageData, faceDataArray, <span class="optional">format</span>, <span class="optional">origin</span>, <span class="optional">widthStep</span>, <span class="optional">timeStamp</span>, <span class="optional">maxFaces</span>)</span><span class="type-signature"> → {Int32Array}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Performs face tracking in the given image and returns tracking results and status.
|
|
This function should be called repeatedly on a series of images in order to perform continuous tracking.
|
|
<br/><br/>
|
|
If the tracker needs to be initialized, this will be done automatically before tracking is performed on the given image.
|
|
Initialization means loading the tracker configuration file, required data files and allocating various data buffers to the given image size.
|
|
This operation may take several seconds.
|
|
This happens in the following cases:
|
|
<br/><br/>
|
|
<ul>
|
|
<li>In the first frame (first call to <a href="VisageTracker.html#track">VisageTracker.track()</a> function).<br/>
|
|
</li><br/>
|
|
<li>When frameWidth or frameHeight are changed, i.e. when they are different from the ones used in the last call
|
|
to <a href="VisageTracker.html#track">VisageTracker.track()</a> function.<br/>
|
|
</li><br/>
|
|
<li>If setTrackerConfigurationFile() function was called after the last call
|
|
to {@link VisageTracker#track|VisageTracker.track()} function.<br/>
|
|
</li><br/>
|
|
<li>When maxFaces is changed, i.e. when it its different from the one used in the last call to <a href="VisageTracker.html#track">track()</a> function.<br/>
|
|
</li><br/>
|
|
</ul>
|
|
<br/>
|
|
Sample usage:
|
|
<br/>
|
|
<pre class="prettyprint source"><code>
|
|
var m_Tracker,
|
|
faceData,
|
|
faceDataArray,
|
|
frameWidth,
|
|
frameHeight;
|
|
|
|
function initialize(){
|
|
//Initialize licensing with the obtained license key file
|
|
//It is imperative that initializeLicenseManager method is called before the constructor is called in order for licensing to work
|
|
VisageModule.initializeLicenseManager("xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx.vlc");
|
|
//Instantiate the tracker object
|
|
m_Tracker = new VisageModule.VisageTracker("../../lib/Facial Features Tracker.cfg");
|
|
//Instantiate the face data object
|
|
faceDataArray = new VisageModule.FaceDataVector();
|
|
faceData = new VisageModule.FaceData();
|
|
faceDataArray.push_back(faceData);
|
|
|
|
frameWidth = canvas.width;
|
|
frameHeight = canvas.height;
|
|
|
|
//Allocate memory for image data
|
|
ppixels = VisageModule._malloc(mWidth*mHeight*4);
|
|
//Create a view to the memory
|
|
pixels = new Uint8ClampedArray(VisageModule.HEAPU8.buffer, ppixels, mWidth*mHeight*4);
|
|
|
|
}
|
|
function onEveryFrame(){
|
|
//Obtain the image pixel data
|
|
var imageData = canvas.getContext('2d').getImageData(0,0, mWidth, mHeight).data;
|
|
//...Fill pixels with image data
|
|
//Call the tracking method of the tracker object with 4 parameters: image width, image height, image pixel data and face data object instance
|
|
var trackerStatus = [];
|
|
trackerStatus = m_Tracker.track(
|
|
frameWidth, frameHeight, ppixels, faceDataArray,
|
|
VisageModule.VisageTrackerImageFormat.VISAGE_FRAMEGRABBER_FMT_RGBA.value,
|
|
VisageModule.VisageTrackerOrigin.VISAGE_FRAMEGRABBER_ORIGIN_TL.value
|
|
);
|
|
//Based on the tracker return value do some action with the return values located in face data object instance
|
|
if (trackerStatus.get(0) === VisageModule.VisageTrackerStatus.TRACK_STAT_OK.value){
|
|
drawSomething(faceDataArray.get(0));
|
|
}
|
|
}
|
|
|
|
</code></pre>
|
|
<br/><br/>
|
|
The tracker results are returned in faceDataArray.
|
|
<br/>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
<th>Default</th>
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>frameWidth</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Width of the frame.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>frameHeight</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Height of the frame.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>p_imageData</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Pointer to image pixel data, size of the array must correspond to frameWidth and frameHeight.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>faceDataArray</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="FaceDataVector.html">FaceDataVector</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Array of <a href="FaceData.html">FaceData</a> objects that will receive the tracking results. The size of the faceDataArray is equal to maxFaces parameter.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>format</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
VisageModule.VISAGE_FRAMEGRABBER_FMT_RGB
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Format of input images passed in p_imageData. It can not change during tracking. Format can be one of the following:<br/>
|
|
- VisageModule.VISAGE_FRAMEGRABBER_FMT_RGB: each pixel of the image is represented by three bytes representing red, green and blue channels, respectively.<br/>
|
|
- VisageModule.VISAGE_FRAMEGRABBER_FMT_BGR: each pixel of the image is represented by three bytes representing blue, green and red channels, respectively.<br/>
|
|
- VisageModule.VISAGE_FRAMEGRABBER_FMT_RGBA: each pixel of the image is represented by four bytes representing red, green, blue and alpha (ignored) channels, respectively.<br/>
|
|
- VisageModule.VISAGE_FRAMEGRABBER_FMT_BGRA: each pixel of the image is represented by four bytes representing blue, green, red and alpha (ignored) channels, respectively.<br/>
|
|
- VisageModule.VISAGE_FRAMEGRABBER_FMT_LUMINANCE: each pixel of the image is represented by one byte representing the luminance (gray level) of the image.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>origin</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
VisageModule.VISAGE_FRAMEGRABBER_ORIGIN_TL
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">No longer used, therefore, passed value will not have an effect on this function. However, the parameter is left to avoid API changes. <br/></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>widthStep</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
0
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Width of the image data buffer, in bytes.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>timeStamp</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
-1
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">The timestamp of the the input frame in milliseconds. The passed value will be returned with the tracking data for that frame (<a href="FaceData.html#timeStamp">FaceData.timeStamp</a>).
|
|
Alternatively, the value of -1 can be passed, in which case the tracker will return time, in milliseconds, measured from the moment when tracking started.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>maxFaces</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
1
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Maximum number of faces that will be tracked. Increasing this parameter will reduce tracking speed.</td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
array of tracking statuses for each of the tracked faces - see <a href="FaceData.html">FaceData</a> for more details
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">Int32Array</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="setTrackerConfiguration"><span class="type-signature"></span>setTrackerConfiguration<span class="signature">(trackerConfigFile, <span class="optional">au_fitting_disabled</span>, <span class="optional">mesh_fitting_disabled</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Sets configuration file name.
|
|
<br/><br/>
|
|
The tracker configuration file name and other configuration parameters are set and will be used for the next tracking session
|
|
(i.e. when <a href="VisageTracker.html#track">track()</a>) is called). Default configuration files
|
|
(.cfg) are provided in the <i>www/lib</i> folder.
|
|
Please refer to the <a href="doc/VisageTracker Configuration Manual.pdf">VisageTracker Configuration Manual</a> for further details on using the configuration files and all configurable options.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</th>
|
|
|
|
|
|
|
|
<th>Default</th>
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>trackerConfigFile</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Name of the tracker configuration file.</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>au_fitting_disabled</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Disables the use of the 3D model used to estimate action units (au_fitting_model configuration parameter).</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>mesh_fitting_disabled</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last">Disables the use of the fine 3D mesh (mesh_fitting_model configuration parameter).
|
|
<br/><br/></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="setConfiguration"><span class="type-signature"></span>setConfiguration<span class="signature">(configuration)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Sets tracking configuration.
|
|
<br/><br/>
|
|
The tracker configuration object is set and will be used for the next tracking session (i.e. when <a href="VisageTracker.html#track">track()</a>) is called).
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>configuration</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="VisageConfiguration.html">VisageConfiguration</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last">configuration object obtained by calling getTrackerConfiguration() function.
|
|
<br/><br/></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="getConfiguration"><span class="type-signature"></span>getConfiguration<span class="signature">()</span><span class="type-signature"> → {<a href="VisageConfiguration.html">VisageConfiguration</a>}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Returns tracking configuration.
|
|
<br/><br/>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
- VisageConfiguration object with the values currently used by tracker.
|
|
<br/><br/>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type"><a href="VisageConfiguration.html">VisageConfiguration</a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="setIPD"><span class="type-signature"></span>setIPD<span class="signature">(IPD)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Sets the inter pupillary distance.
|
|
<br/><br/>
|
|
Inter pupillary distance (IPD) is used by the tracker to estimate the distance of the face from the camera.
|
|
By default, IPD is set to 0.065 (65 millimetres) which is considered average. If the actual IPD of the tracked person is known, this function can be used to set the IPD.
|
|
As a result, the calculated distance from the camera will be accurate (as long as the camera focal length is also set correctly).
|
|
This is important for applications that require accurate distance. For example, in Augmented Reality applications
|
|
objects such as virtual eyeglasses can be rendered at appropriate distance and will thus appear in the image with real-life scale.
|
|
<br/><br/>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>IPD</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last">The inter pupillary distance (IPD) in meters.
|
|
<br/><br/></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-see">See:</dt>
|
|
<dd class="tag-see">
|
|
<ul>
|
|
<li><a href="VisageTracker.html#getIPD">getIPD()</a></li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="getIPD"><span class="type-signature"></span>getIPD<span class="signature">()</span><span class="type-signature"> → {number}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Returns the current inter pupillary distance (IPD) setting.
|
|
<br/><br/>
|
|
IPD setting is used by the tracker to estimate the distance of the face from the camera. See setIPD() for further details.
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-see">See:</dt>
|
|
<dd class="tag-see">
|
|
<ul>
|
|
<li><a href="VisageTracker.html#setIPD">setIPD()</a></li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
|
|
|
|
<div class="param-desc">
|
|
current setting of inter pupillary distance (IPD) in meters.
|
|
<br/><br/>
|
|
</div>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>
|
|
Type
|
|
</dt>
|
|
<dd>
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
Reset tracking.
|
|
<br/><br/>
|
|
Resets the tracker. Tracker will reinitialise with the next call of <a href="VisageTracker.html#track">track()</a> function.
|
|
<br/><br/>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>Stops the tracking.
|
|
<br/><br/></li><ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<nav>
|
|
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-VisageTrackerUnityPlugin.html">VisageTrackerUnityPlugin</a></li><li><a href="module-VisageAnalyserUnityPlugin.html">VisageAnalyserUnityPlugin</a></li></ul><h3>Classes</h3><ul><li><a href="FaceData.html">FaceData</a></li><li><a href="ScreenSpaceGazeData.html">ScreenSpaceGazeData</a></li><li><a href="VectorFloat.html">VectorFloat</a></li><li><a href="VectorShort.html">VectorShort</a></li><li><a href="VectorString.html">VectorString</a></li><li><a href="VisageFaceAnalyser.html">VisageFaceAnalyser</a></li><li><a href="AnalysisData.html">AnalysisData</a></li><li><a href="FeaturePoint.html">FeaturePoint</a></li><li><a href="FDP.html">FDP</a></li><li><a href="VisageDetector.html">VisageDetector</a></li><li><a href="FaceDataVector.html">FaceDataVector</a></li><li><a href="VSRectVector.html">VSRectVector</a></li><li><a href="VSRect.html">VSRect</a></li><li><a href="VisageGazeTracker.html">VisageGazeTracker</a></li><li><a href="VisageFaceRecognition.html">VisageFaceRecognition</a></li><li><a href="VisageTracker.html">VisageTracker</a></li><li><a href="VisageConfiguration.html">VisageConfiguration</a></li><li><a href="VisageLivenessBlink.html">VisageLivenessBlink</a></li><li><a href="VisageLivenessSmile.html">VisageLivenessSmile</a></li><li><a href="VisageLivenessBrowRaise.html">VisageLivenessBrowRaise</a></li><li><a href="VisageAR.html">VisageAR</a></li></ul><h3>Global</h3><ul><li><a href="global.html#FP_START_GROUP_INDEX">FP_START_GROUP_INDEX</a></li><li><a href="global.html#FP_END_GROUP_INDEX">FP_END_GROUP_INDEX</a></li><li><a href="global.html#FP_NUMBER_OF_GROUPS">FP_NUMBER_OF_GROUPS</a></li><li><a href="global.html#initializeLicenseManager">initializeLicenseManager</a></li><li><a href="global.html#VisageTrackerStatus">VisageTrackerStatus</a></li><li><a href="global.html#VisageTrackerImageFormat">VisageTrackerImageFormat</a></li><li><a href="global.html#VisageTrackerOrigin">VisageTrackerOrigin</a></li><li><a href="global.html#getSDKVersion">getSDKVersion</a></li></ul>
|
|
</nav>
|
|
|
|
<br clear="both">
|
|
|
|
<footer>
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Sat Jul 29 2023 01:38:29 GMT-0000 (GMT)
|
|
</footer>
|
|
|
|
<script> prettyPrint(); </script>
|
|
<script src="scripts/linenumber.js"> </script>
|
|
</body>
|
|
</html> |