Software Archive
Read-only legacy content
17060 Discussions

Unity tip - getting facial tracking working

MartyG
Honored Contributor III
907 Views

Hi everyone,

During my work on hooking up objects to face-detection controls and initially struggling a bit to get the objects to respond correctly, I learned something important that I thought I would pass on to the rest of the community.

When using the TrackingAction script to detect facial components, you need to have the 'default' at the top of the Inspector panel set to 'HandTracking.'  If you are like me, you may have  changed it to 'FaceTracking' (thinking that this was the logical selection for face detection) and then found that the detection was erratic.  

But no, the default has to be 'HandTracking.'  You then use 'Face Detected' as your start event, 'Face Tracking' as your tracking source and 'Face Lost' as your stop event.  Also set your Smoothing to '0' and Smoothing Type to 'Spring.'

Check out this snapshot as a reference.

http://sambiglyon.org/sites/default/files/facedetect.jpg

 

0 Kudos
1 Reply
MartyG
Honored Contributor III
907 Views

Never mind, I was led astray by the fact that the AR Mirror sample uses HandTracking as its default in all its facial parts.  After testing with my own objects, I'm not sure the default makes as much difference as I thought.  Wish there was a post deletion button.  ;)

Oh well.  We're on the cutting edge of discovery here with the camera, so it's ok to be wrong sometimes so long as the right way is learned from it!  LOL

The info about the other settings still applies as true though.  ^_^

0 Kudos
Reply