Source Code of Kinect Smile Tracking Is Released

Source Code of Kinect Smile Tracking Will Be Released Soon For Everyone
Here’s it..

Video of original version:

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.

You may be confused of the How-it-works part above before trying the demo without seeing the screen-shot.
Can anyone take a screen-shot of you using the demo and send it to me. I would take a good one and put it here.
You know I just want people to focus on the idea, the code but not my attractive smile. :) (just kidding..)

Source Code:
[download id=”19″]

About TangoChen

Interest driven for tech & music.
This entry was posted in Kinect, Tech and tagged . Bookmark the permalink.

10 Responses to Source Code of Kinect Smile Tracking Is Released

  1. Mouni says:

    Can i know how did you calculate the threshold? On what basis? Like, as the nose width is constant you have taken it into consideration. But what made you to take modified value to be 3.3f? Can you explain me!?!
    Thank You

    • TangoChen says:

      The modified value is calculated by testing again and again…
      If you smile, the mouthWidth > threshold and the mouthWidth < threshold when you don't.. It's the value you want... I didn't know it should be 3.3f at first.. I may try 1.5f, 2.0f, 2.5f.. and finally found that 3.3f was better...

  2. Pingback: Links to things I am working with on Kinect - Secret Microsoft Communications - Site Home - MSDN Blogs

  3. Shaun says:

    The algorithm isn’t generalized enough to be useful without the x (‘3.3f’) fudge factor Chen is using. Nonetheless, nice work and very cool!

  4. kais says:

    Hi chen,
    great work you have made here, can we know the kinect version you worked on? kinect for windows or what?
    Do you think that you solution will work on different faces without any changes on code?
    thank’s for your help

  5. OussGh says:

    Great work. I wanted to know how can we get the number of feature points in the sdk face tracking for kinect. I need the points to get nose width and length and jaw width. thank you.

    • TangoChen says:

      Hi, I get it by using for statement and checking feature points collections part by part.
      For example:
      for(int i = 0; i < 20; i++){ FeaturePoints[i].Color = Red; } for(int i = 20; i < 40; i++){ FeaturePoints[i].Color = Green; } ...

      After finding the feature point you want is red.
      You can keep finding:
      for(int i = 0; i < 10; i++){ FeaturePoints[i].Color = Red; } for(int i = 10; i < 20; i++){ FeaturePoints[i].Color = Green; } ...

      You will get closer and closer to the feature point and finally get it.

  6. jacques lambert says:

    My name is Jacques from Montreal Canada i found this good is it possible instead to do red or green activate com port to contact with arduino

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.