Assigning labels to the detected points

1 visualización (últimos 30 días)
BlueBee77
BlueBee77 el 8 de Feb. de 2017
Comentada: BlueBee77 el 9 de Feb. de 2017
I am working on tracking a human. I have calculated the centroid and points(Head,hands and legs). Depending on the image, these points can be at maximum 5 or at least 2 depending on the pose of the person. I want to assign labels like left leg,right leg, left hand, right hand and head to these points. But the problem is that unless i plot them i dont know which point is what. I want to use some logic like if its above centroid then head or below centroid then legs or some other idea/heuristics but i dont know if its possible in Matlab. I am attaching an image with detected points and centroid. I will appreciate if anyone can suggest some ideas.

Respuesta aceptada

Image Analyst
Image Analyst el 8 de Feb. de 2017
Yes, that's possible. Maybe you could use a structure array - one structure for each points. Like, do your logic to determine the body part, then if you're assigning the second point to Legs:
specialPoints(2).x = x;
specialPoints(2).y = y;
specialPoints(2).bodyPart = 'Legs';
Same for all the other points.
  3 comentarios
Image Analyst
Image Analyst el 8 de Feb. de 2017
Look at the y value of the centroid and compare to the y value of your other points. If the centroid y value is less, it's above the other point, if it's greater, the centroid y value is more than the others, it's below
for k = 1 : length(y)
if y(k) > yCentroid
fprintf('Point #%d, at y=%f, is below the centroid at y=%f.\n', k, y(k), yCentroid);
else
fprintf('Point #%d, at y=%f, is above the centroid at y=%f.\n', k, y(k), yCentroid);
end
end
BlueBee77
BlueBee77 el 9 de Feb. de 2017
THanks alot, i got the idea :)

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by