Skip to content

FrankSanta/CV24_ObjectTracking

Repository files navigation

🎾 Tennis Match Visual Analytics

University of Illinois at Chicago – Computer Vision (CS415)
Authors: Davide Ettori, Antonio Marusic, Francesco Santambrogio


📌 Overview

This project presents a computer vision-based analytics tool designed for automated analysis of tennis matches. The system detects and tracks players and the ball, projects the video into a rectified view, and generates insightful heatmaps of court usage. By combining techniques such as homography transformation, object detection (YOLO), and heatmap visualization, this tool enhances performance analysis for players, coaches, and analysts.


🚀 Features

  • 🔍 Object Detection: Players and tennis ball detection using YOLO.
  • 🎯 Rectified Court View: Homographic transformation from side-view to top-down view.
  • 👣 Real-time Tracking: Track player and ball positions throughout the rally.
  • 🔥 Heatmap Generation: Visualize frequency of player and ball positions.
  • 🧠 Interactive Visualization:
    • Toggle trajectory with s
    • Select objects with mouse + f

📸 Design Summary

🔧 Assumptions

  • Input is a static-camera video of a tennis rally from the back of the court.
  • Players remain on their side during the rally.
  • The tennis ball is visually distinguishable (typically yellow).

⚙️ Pipeline

  1. Preprocessing:

    • Edge detection via Canny.
    • Line extraction with Hough Transform.
    • Court corners identified via K-means clustering on line intersections.
  2. Rectification:

    • Compute homography matrix from court corners.
    • Warp frames to top-down perspective.
  3. Object Detection:

    • Apply YOLO on resized frames.
    • Manually enhance ball visibility via yellow color thresholding for detection.
  4. Tracking:

    • Match player detections to known ROIs (Djokovic/Sinner).
    • Track movement on the rectified view.
  5. Heatmap:

    • Aggregate tracked positions for ball and each player.
    • Render court activity visualization after video processing.

🖼️ Results

  • Accurate detection of players and approximate ball location.
  • Real-time visualization of rectified positions.
  • Heatmaps reveal strategic player movement and court usage.

📚 Tools

  • YOLO – Real-time object detection model.
  • OpenCV – Image processing and transformation.

🧪 Demo & Screenshots

demo.mov
demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •