A downloadable tool for Windows, macOS, and Linux

Project Title: Tennis Ball Hit Detection and Virtual Screen Mapping

Description:

This project implements a computer vision-based system for detecting tennis ball hits and mapping the impact points onto a virtual screen. The system utilizes a webcam feed to detect tennis balls based on color filtering in the HSV color space. Once a tennis ball is detected, its location is mapped to a 16:9 aspect ratio virtual screen, which simulates the ball's hits in real time.

Key functionalities include:

1. Webcam Integration: Captures real-time video feed using OpenCV.

2. Tennis Ball Detection: Uses color-based filtering in HSV color space to isolate tennis balls from the video feed. Contour detection is employed to identify and track the tennis ball.

3. Hit Mapping: The detected tennis ball’s position is mapped onto a virtual screen of dimensions 1920x1080 pixels (16:9 aspect ratio). This allows accurate representation of where the ball would hit in a simulated environment.

4. Hit Visualization: Each hit is visualized as a black circle on the virtual screen. Previous hits remain visible, allowing the screen to accumulate hit points over time until the program exits.

5. Real-Time Feedback: Both the webcam feed and virtual hit display are updated in real-time, providing immediate feedback to the user.

This project can be used in training setups where real-time feedback on ball hits is necessary, or for games and simulations where the physical interaction needs to be captured and represented on a screen. The program is built using Python with the OpenCV and NumPy libraries, and it runs until manually exited by the user.

Download

Download
ball-hit-detection-project.zip 8.5 MB

Install instructions

System Requirements

- Python 3.x

- OpenCV (for image processing)

- Numpy (for array manipulation)

- Webcam

- Tennis balls

- Colored tape for creating the frame on the wall

Leave a comment

Log in with itch.io to leave a comment.