March 24, 2013

Gait Analysis using Kinect Sensor


    Gait Analysis, in general, means the systematic study of human body motion, using the eye and brain of observers, with the help of system designed for measuring movements of human body (especially muscles). Gait Analysis is commonly used by sportsperson to get feedback about their performance. It is also used to assess, plan and treat individuals with conditions affecting their ability to walk and also to identify posture-related or movement-related problems in people with injuries.

    In my last post, I explained the procedure for installation of software development kit for Kinect on Windows platform. I also explained how Kinect sensor can be easily used for 3-D motion detection. I am currently working on a project on Gait Analysis using Kinect sensor. The following image shows a simple demo of Kinect, including the knee angle calculation.






     The implementation of magnetic angular rate and gravity (MARG) sensor arrays, that also include tri-axis magnetometers, is an interesting method. The MARG implementation incorporates magnetic distortion compensation. The algorithm uses a quaternion representation, allowing accelerometer and magnetometer data to be used in an analytically derived and optimized gradient descent algorithm to compute the direction of the gyroscope measurement error as a quaternion derivative. Some people have already evaluated the performance empirically using a commercially available orientation sensor and reference measurements of orientation obtained using an optical measurement system.






March 18, 2013

Kinect

    Kinect is a motion sensing input device by Microsoft for the Xbox 360 video game console and Windows PCs. Based around awebcam-style add-on peripheral for the Xbox 360 console, it enables users to control and interact with the Xbox 360 without the need to touch a game controller, through a natural user interface using gestures and spoken commands. This device became so popular that it claimed the Guinness World Record of being the "fastest selling consumer electronics device" after selling a total of 8 million units in its first 60 days

    As of present, Kinect software development kit is available for Windows 7. This SDK allows the  developers to write Kinecting apps in C++/CLI, C#, or Visual Basic .NET

   For our interest, Kinect is an extremely useful device which can be implemented for image processing/ computer vision applications.


Installation of Kinect on Windows: 


You will need a C++ compiler and development environment to write and compile the code for the workshop, you can use whatever IDE you feel most comfortable. In any case we will be using OpenFrameworks for the workshop. Please download it from here:http://www.openframeworks.cc/ It is important that you download, install, compile, and test OpenFrameworks on your machine before the workshop. Look at the examples and get a feeling of what you can do with this programming platform. You should definitely have looked at openframeworks before starting to work on Kinect.

You can especially look at the OpenCV examples.
Check info about Kinect at http://en.wikipedia.org/wiki/Kinect.

For starting to use the Kinect for your project download and install the following:

1. Synapse is an application that gets input data from the Kinect and stream the skeleton and
joint positions of tracked users. You can download it here:
http://synapsekinect.tumblr.com/post/6610177302/synapse

Synapse works on Mac and Windows. If you are using Linux, you should have to work on few additional steps for installation. Nick Gillian wrote a Synapse streamer which communicates with your OpenFrameworks project over OSC, which is a networking protocol (http://en.wikipedia.org/wiki/Open_Sound_Control).

So, first copy the oscReceiverExample from “your openFrameworks folder” > examples > addons >
oscReceiverExample to apps > myApps. Test and see if it compiles. Then download the synapsestreamer code from here: http://www.nickgillian.com/software/synapsestreamer where you will also find further instructions.

2. After that download the OpenFrameworks Addon for OpenNI and the Kinect which you can find here https://github.com/gameoverhack/ofxOpenNI. With this you can access the Kinect’s raw data such as the depth image. Compile it beforehand. If you do not have a Kinect it will not run, so no worries.



I have recently started working on a project which involves Gait Analysis. I am using using Kinect sensor for this task.