nkeeline / OpenPose-to-Blender-Facial-Capture-Transfer

This blender Python Script maps an OpenPose Facial Capture to a blender facial Rig
MIT License
298 stars 59 forks source link

Distance Between Ears Calculation #10

Open skumarlabs opened 3 years ago

skumarlabs commented 3 years ago

https://github.com/nkeeline/OpenPose-to-Blender-Facial-Capture-Transfer/blob/e22bb277efb177bca719b4e8c4bbc501ac0b816e/Facial%20JSON.py#L123

I was just browsing through the code, the line mentioned above to get the distance between the ears. self.distancBetweenEars = abs(GetPoint(pose, 18)[0] - GetPoint(pose, 18)[1])

I am not quite sure, how the above line gets the distance between two ears. The above line just calculates the distance between x and y location of left ear joint, if am not wrong.

Shouldn't it be something like where joint #17 is for right ear and #18 is for left ear and we are getting x location of both ears? self.distancBetweenEars = abs(GetPoint(pose, 17)[0] - GetPoint(pose, 18)[0])