MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today
Asked by Sivakumaran Chandrasekaran on 26 Apr 2013

is it possible to find the distance between the legs of a walking person using MATLAB? human walking video is the input..

Answer by Anchit Dhar on 26 Apr 2013

Accepted answer

As an alternative, you can use Skeletal tracking with the Kinect for Windows sensor. This problem will get reduced to distance computation between the ankle/Knee joints(3D points), whichever fits your definition for distance.

Note: Kinect for Windows is supported in MATLAB through Image Acquisition Toolbox, R2013a onwards.

Sivakumaran Chandrasekaran on 27 Apr 2013

@ Anchit.. Kinect looks cool. I dont have much details about the integration of MATLAB with it, but the device is good.but more costlier.

Anchit Dhar on 1 May 2013

@Walter: From what I have observed while working with Kinect for Windows, it does a very good job of localizing the joint coordinates. But then, it all depends on what accuracy are you looking for.

@Siva: Here is a link to the example for getting the joint coordinates from a Kinect for Windows sensor using MATLAB & Image Acquisition Toolbox:

Answer by Walter Roberson on 26 Apr 2013

No. You cannot determine the distance between legs of someone in a hoop skirt with a sufficiently long train.

See, e.g., http://i62.photobucket.com/albums/h89/zellybell/Dresses/HoopSkirt.jpg

Answer by Jan Simon on 26 Apr 2013

How is "distance between legs" mathematically defined? Legs consists of at least 3 rigid segments (simulating the 26 bones of the feet seems to be over-doing here) with a spatial extent. While the distnace between the hip-joint centers is (almost) constant, the "distance" between the lower leg segments or the feet needs a meaningful definition before we can discuss, if this can be determined by a 2D-projected movie.

Show 6 older comments

Sivakumaran Chandrasekaran on 27 Apr 2013

http://imageshack.us/gal.php?id=q5qskqSpnpytlK6cmd3W06g

you can find two image. input is a color video in which a man is walking. how to compare the extracted patterns by measuring the distance.

Walter Roberson on 27 Apr 2013

Unfortunately imageshack is requiring an account in order to view the images.

Jan Simon on 27 Apr 2013

@Sivakumaran Chandrasekaran: The problem of the "distance" is still not cleared: Do you mean the 3D-distance between the *center* of the feet in each frame of the movie? Or the distance between the points on the floor, where the heels get ground contact during walking? While the first distances varies from frame to frame, the second distance varies from stride to stride.

Note that it is very hard to define the *center* of a foot exactly, most of all in 3D.

## 2 Comments

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/73634#comment_145617

Is the walking person a fixed distance away? Are they walking at a fixed angle? Are there ground markings that could be used to determine the distance?

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/73634#comment_145622

Could you put color patches or e.g. infra red LEDs on their legs, or are these random persons?