| Algorithm 1 Detection of key-body points human silhouette |
| Input: S: Segmented Human Silhouettes |
| Output: 8 key-body points as Head, Left-shoulder, Right-Shoulder, Left-arm, Right-arm, Left-foot, Right-foot, Torso. |
| B1 = boundary of left silhouette, B2 = boundary of right silhouette, H = height of silhouette, W = width of silhouette |
| % Extract boundaries of both silhouettes % |
| B = binarize(S); |
| BW = bwboundaries(B); |
| Object = detectobject(B,Boundingbox, Area) |
| % search boundaries of both silhouettes for outermost pixels % |
| fori = 1 to B1 |
| forj = 1 to B2 |
| Search (B1;B2) |
| Top_Pixel = [x, y_max]; |
| Left_pixel = [x_min,y]; |
| Rightl_pixel = [x_max,y]; |
| Bottom_left_pixel = [x_min,y_min]; |
| Bottom_right_pixel = [x_max,y_min]; |
| end |
| end |
| % detect top, bottom, left and right region of both silhouettes % |
| % Repeat for both silhouettes % |
| [rows, cols] = size(object) |
| Top_half = floor(rows/2) |
| bottom_half = rows-Head_region |
| Head_region = floor(Top_half/3) |
| Torso_region = floor(Top_half-Head_region) |
| % identifying head region in top half of silhouette% |
| Head = Top_Pixel(Head_Region) |
| Left_Shoulder = Bottom_left_pixel(Head_Region) |
| Right_Shoulder = Bottom_right_pixel(Head_Region) |
| % identifying Torse, left arm and right arm% |
| Xt = (W/2) |
| Yt = (H/2) |
| Torso = (Xt, Yt) |
| Left_arm = Left_Pixel(Torso_region) |
| Right_arm = Right_Pixel(Torso_region) |
| % identifying left foot and right arm % |
| Left_foot = Bottom_left_pixel(bottom_half) |
| Right_foot = Bottom_right_pixel(bottom_half) |
| return Head, Left-shoulder, Right-Shoulder, Left-arm, Right-arm, Left-foot, Right-foot, Torso. |