How to measure the distance between two points in a binary image for human action recognition

4 views (last 30 days)
Hi i want to find human action recognition in still images i got the silhouette pf human pose from that i got binary image now by using this binary image i want find some features like distance between the centroid of image to hands tips and legs tips automatically. then depending on these features i will decide the action. is my theory right? and if right anyone help me to find these features
<<
>>

Accepted Answer

Image Analyst
Image Analyst on 23 Feb 2015
You can ask regionprops() for the centroid, and the bounding box.
measurements = regionprops(labeledImage, 'Centroid', 'BoundingBox');
centroid = measurements(1).Centroid;
bb = measurements(1).BoundingBox;
y1 = bb(2); % Top of bounding box.
y2 = bb(2)+bb(4); % Bottom of bounding box.
From those, simple subtraction will get the distances you want.
centroidToToe = y2 - centroid(2);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!