Himanshu Jain
Himanshu Jain

Reputation: 1818

Exercise detection using a camera on Raspberry Pi

I have a requirement where I want to check if a person is doing a particular exercise(something like jumping jacks). I have a camera connected to a Raspberry Pi. Is this even possible by using something like OpenCV or something else? I have seen some people doing something similar using a Kinect camera. Note: If it helps to make an easy solution, I just want to detect 1 particular exercise.

Upvotes: 0

Views: 241

Answers (1)

Joe Iddon
Joe Iddon

Reputation: 20424

I have never tried this, but it is an interesting idea! My fist thought would be to use OpenCV (or right the functions yourself) as you have said.

The way I would go about doing this would be to have the user being tracked wear some distinctly coloured clothing on each limb that you want to detect. For example, you could have them wear some bright red gloves and bright blue socks. Or create some wearable device that acts as a marker.

By doing this, you could use thresholding with the right values to select these colours in order to locate them in the image and get coordinates of where they are.

From here, some code could easily track the motion of where the items are moving and thus determine the exercise from a pre-determined list.

Hopefully this helps, as I already said, I have never tried this exactly but have attempted things similar where I used thresholding and edge-detection to locate objects in an image. :)

Good Luck!

Upvotes: 2

Related Questions