Open genggeng1104 opened 3 years ago
Hi @genggeng1104. I probably should have added in some documentation into this 😅
Basically how the program works is first OpenPose returns the x, y coordinates of all body parts it finds in the image, and I only read the ones that I consider important for the exercise.
Now that I have the position of the shoulder, elbow and wrist, I can calculate the angle that the upper arm and lower arm make at the elbow by using simple trigonometry.
After this all I need are simple rules that say if the angle made at the left elbow is < 40, count it as an upward bicep curl, and if the angle > 160, count it as downwards curl and increment the repetition counter.
As you can see, it's nothing too complex. You would just need to figure out what the exact requirements of your particular exercise are, understand which angles you need to monitor and define the conditions that need to be met for the users actions to count as a proper repetition of the exercise. The rest of it is just trying to format OpenCV to display the text nicely on screen.
I hope this helps. If you've got further questions, feel free to ask.
hi shaun fernandues is there any vedio tutorial for this python program
Dear Shaun-Fernandes, I ran your code successfully.And now,I want to add new exercises,Could you tell me what should i do? Thank you!!!!