问题
Do you know any robust way of recognizing a static posture?
I have tried saving every joint position with a given interval Xmax, Xmin, Ymax, Ymin, Zmax, Zmin and then try to see if 20 joints are within the given intervals, but it does not work well at all.
After this I have tried with relative coordinates to the parent joint, but again... it does not work...
I don't know how to do this... Anyone who did this? I refer here only to static postures, not dynamic ones.
回答1:
You can try by defining a distance between two postures.
First of all, you should "normalize" every postures, in order to have a relative position. You should chose a "base joint" (for instance, Spine or Head), and then subtract the base joint coordinates from all the joints coordinates.
Example:

In the above image, you can consider the joint number 2 as a base joint. So when you normalize all the joints, the base joint will have always relative coordinates equal to (0, 0, 0).
Then, you can define a distance between two postures. Let's assume that those postures are PostureA and PostureB. In one of my projects, I have used the following:

In the above formula, PostureA[Jointi] indicate the i-th joint of the PostureA, which is made by Number of joints Joints. The distance3D refers to a classical three-dimensional Euclidean distance.
Then, you should define a constant threshold distance (let's name it as TD).
Now you can say that two postures are "equal" (or, more precisely, similar enough to be considered equivalent) if:
TD > PostureDistance
I don't know if this is the best method, but in my case it worked quite well (and it is simple to implement).
来源:https://stackoverflow.com/questions/34864198/what-is-the-best-algorithm-for-static-posture-recognition-with-kinect-skeletal-j