ALFaceTracker API

Overview | ALRedBallTracker API | ALFaceTracker API | Trackers Sample


Methods

std::vector<float> ALFaceTrackerProxy::getPosition()

Returns the [x, y, z] position of the face in FRAME_TORSO. This is done assuming an average face size, so it might not be very accurate. This invalidates the isNewData field of the tracker. See ALFaceTrackerProxy::isNewData() for more details.

Returns:An Array containing the face position [x, y, z].
bool ALFaceTrackerProxy::isActive()

Return true if the face Tracker is running.

Returns:true if the face Tracker is running.
bool ALFaceTrackerProxy::isNewData()

Return true if a new face was detected since the last getPosition().

Returns:true if a new face was detected since the last getPosition().
void ALFaceTrackerProxy::setWholeBodyOn(const bool& pWholeBodyOn)

if true, the tracking will be through a Whole Body Process.

Parameters:
  • pWholeBodyOn – The whole Body state
void ALFaceTrackerProxy::startTracker()

Start the tracker by Subscribing to Event FaceDetected from ALFaceDetection module. Then Wait Event FaceDetected from ALFaceDetection module. And finally send information to motion for head tracking. Note: Stiffness of Head must be set to 1.0 to move!

void ALFaceTrackerProxy::stopTracker()

Stop the tracker by Unsubscribing to Event FaceDetected from ALFaceDetection module.