Since Microsoft has released the Kinect.NET SDK I wrote many articles on that subject:
I think Kinect it very cool and I’m searching for more projects and good ideas for Kinect, couple of days ago I talked with my friend Guy Burstein and he came with an idea for Kinect application, he said what if people will enter the Microsoft Israel reception and instead of video screen showing commercials lets add something interesting with Kinect.
The Idea: TV Screen in the Reception, When nothing happens (no one is in the reception) we can display videos on the screen but when some one enters the frame show him the Kinect Image, and if the user doing something funny, capture his image and save it.
The questions is how can I know if the person doing something funny?
For that I’ve created Image AuthenticManager, that contains a set of rules defining what positions or combinations are funny.
For example: If Right Hand position is higher than Head position then add 2 points, if the Left Foot position is crossing the Right Foot then add additional 2 points etc..
When the user reaches the Goal we decide then Take his picture.
Before jumping to coding let’s talk about the application flow:
The main window is controlled by two Timers and the AuthenticManager:
SeriousTimer set to 10 sec and it start to Ticking as the Kinect Skeleton Event is first fired(this event will only work when the Kinect identify a full person skeleton).
Inside the SkeletonFrameReady we also have integer called _fpsCount that increase himself by 1 each time the SkeletonFrameReady is called after starting the SeriousTimer, this will help use to make sure the user is standing in front of the Kinect and not just walk by him.
Now how can the _fbsCount will tell me that? all we need to do is multiply the SeriousTimer seconds interval by the Minimum Fps (for example 10) and the _fpsCount should be bigger is the user stand in front of the Kinect.
In this case the Timer will stop the Video feed and will display the Kinect Image.
IdleTimer by default is set to 30 seconds and each time the SkeletonFrameReady method is fired we restart the IdleTimer.
So if no events for SkeletonFrameReady the IdleTimer will return the Video feed.
JointID – AuthenticManager works with RuleObject that contains JointID Source and JointID Target (More about Joints – Kinect – Getting Started – Become The Incredible Hulk).
What is Joint?
The data is provided from the Kinect application code as a set of points, called skeleton positions, that compose a skeleton structure.
public enum JointID
HipCenter = 0,
Spine = 1,
ShoulderCenter = 2,
Head = 3,
ShoulderLeft = 4,
ElbowLeft = 5,
WristLeft = 6,
HandLeft = 7,
ShoulderRight = 8,
ElbowRight = 9,
WristRight = 10,
HandRight = 11,
HipLeft = 12,
KneeLeft = 13,
AnkleLeft = 14,
FootLeft = 15,
HipRight = 16,
KneeRight = 17,
AnkleRight = 18,
FootRight = 19,
Count = 20,
Vector – For Source and Target Joints you also have to define the Vector to check X or Y against one another.
Operator – Do you expect the Source Vector to be Bigger or Smaller than the Target Vector?
Score – If the rule is true what is the score for the rule.
Over the next posts on Kinect Reception I’ll show more code examples and publish the application.