Smile... Kinect Smile Tracking (with source)


Friend of the Gallery, Tango Chen, is back, this time to share the source for his Smile Tracking project. The best thing is to watch the video as he does a great job of showing it off...

Source Code of Kinect Smile Tracking Is Released

Now it’s been improved with some new features.

How it works:

  1. Using face tracking functionality to detect 4 face points: both sides of your mouth and both sides of your nose.
  2. Calculating the length of both sides of your mouth as mouthWidth. The mouthWidth may be wider if you’re smiling.
    So the program tells you’re smiling when the mouthWidth larger than a value.
    The particulate value is called Threshold.
  3. Even if you have no changing on your mouth, the mouthWidth would changes when you’re moving forwards/backwards to the Kinect sensor.
    (It would be larger if you’re closer to the Kinect.)
    So we need to change the Threshold.
    The Threshold is calculated based on the length of both sides of your nose called noseWidth.
    The noseWidth won’t be greatly affected by the changing of your face but the distance between your face and Kinect sensor.
    So it would be great to calculate how large the Threshold should be.
    And we have nothing to deal with Skeleton Tracking like getting the position of your head joint in order to get the distance.
  4. The Threshold is not set good enough so it may not work for everyone everytime.
    At least it works for me. I’m not sure if you have a perfect smile like me though.
    So I added a Modify feature. It’s a slider on the bottom-right of the application which can modify the Threshold. (to make it larger or smaller.)
    This should/can be improved to be more automatic.

Project Information URL:

Project Download URL:

Project Source URL:




Contact Information:

The Discussion

  • User profile image

    I downloaded the code you provided. The actual thing is commented. When i uncommentd it, what is ppRight , ppLeft in - double length = Point.Subtract(faceTrackingViewer.ppLeft, faceTrackingViewer.ppRight).Length;
    Thank You.

  • User profile image

    @Mouni: Your best bet would be to post your question on the original blog post. Click through and you can leave a comment there...

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.