3 min read
Movement Detection

Introduction

Physical fitness plays a crucial role in maintaining a healthy lifestyle, and exercises like push-ups are an effective way to strengthen the upper body. However, keeping track of push-up repetitions accurately can be challenging, especially when performing them alone or without a dedicated trainer. To address this issue, we propose a project that utilizes the power of computer vision and OpenCV to develop a real-time push-up detection system.

The project aims to create an intelligent system that can accurately detect and count push-up repetitions performed by an individual. By leveraging OpenCV, a popular computer vision library, we can harness its robust functionalities to analyze video input, identify human presence, estimate body poses, and track key body joints. This allows us to recognize the distinctive movements of a push-up and accurately count repetitions in real-time.

To achieve this goal, we will utilize Mediapipe library

The MediaPipe Pose Landmarker task lets you detect landmarks of human bodies in an image or video. You can use this task to identify key body locations, analyze posture, and categorize movements. This task uses machine learning (ML) models that work with single images or video. The task outputs body pose landmarks in image coordinates and in 3-dimensional world coordinates.

For more information about Pose landmark detection guide for Python, visit:

https://developers.google.com/mediapipe/solutions/vision/pose_landmarker/python


Video Input

  • The system will receive input from a webcam or any other video source.
  • It will continuously capture frames from the video feed to process in real-time.


Pose Estimation

  • Once a person is detected in the video frame, the system will utilize pose estimation techniques.
  • Key points of the person's body joints, such as shoulders, elbows, and wrists, will be identified.
  • These key points serve as reference points for analyzing the push-up movements


Push-Up Recognition

  • Using the positions of the key points, the system will determine the start and end positions of a push-up repetition.
  • It will track the movement of the person's body as they perform push-ups, detecting the lowering and raising phases.


Angle Calculation

  • By using the coordinates of the wrists and hands, the system can calculate the angle formed at the wrists.
  • This angle represents the alignment of the forearm with respect to the ground during different phases of the push-up.


Repetition Counting

  • The system will keep a count of the number of push-up repetitions performed by the person.
  • Each time a complete push-up is recognized, the count will be incremented.
  • The count will be updated and displayed in real-time on the video feed for the person to see their progress.



Conclusion

The protocol for push-up detection and analysis can be applied to other sports and exercises by adapting the steps outlined. It can utilize different input sources and pose estimation techniques specific to the target activity. By analyzing key point positions and movements, sport-specific movements can be recognized and tracked. 

Real-time feedback can be provided to improve performance. The protocol allows for visualization and feedback tailored to the sport or exercise being analyzed. It enables real-time analysis, performance tracking, and injury prevention. By adapting the core concepts, it serves as a valuable tool for enhancing training and performance assessment. Its versatility makes it applicable to a wide range of physical activities.