Class: FaceDataVector

FaceDataVector

new FaceDataVector()

Custom container class for FaceData objects.

Used in conjunction with VisageDetector.detectFeatures function.

Sample usage:


function onDetect()
{
   //Instantiate an FaceDataVector instance where detection results will be stored
   faceDataArray = new VisageModule.FaceDataVector();
   //Specify the maximum number of faces that will be detected in the image
   maxFaces = 10;
   for (var i = 0; i < maxFaces; ++i)
   {
       faceData = new VisageModule.FaceData();
       faceDataArray.push_back(faceData);
   }
   //Detect face and facial features in an image
   var numberOfFaces = m_Detector.detectFeatures(frameWidth, frameHeight, ppixels, faceDataArray, maxFaces);
   //Fetch and draw something on the first returned face
   if (numberOfFaces > 0)
   {
       drawSomething(faceDataArray.get(0));
   }
}


Methods

push_back(faceData)

Add existing FaceData object.

Parameters:
Name Type Description
faceData FaceData FaceData object to be added.

get(index) → {FaceData}

Get FaceData object from the vector specified by index parameter.

Parameters:
Name Type Description
index number position of the FaceData object to be fetched.
Returns:
FaceData object located on the location specified by index parameter
Type
FaceData

delete()

Release the memory allocated to the FaceDataVector object.