Sale!

MATLAB code for basketball players detection and classification in a video

19

Description

We have developed an algorithm that accurately detects basketball players in a video and is able to accurately place them in a 2D top-view court. We have achieved such results making use of an association of the hog detector from OpenCV and color segmentation.

Comparison between the players detected and the projected image in the court. As you can see the players match the position in the top-down court model.

Comparison between the players detected and the projected image in the court. As you can see the players match the position in the top-down court model.

This project was developed entirely on MATLAB. In order to achieve our end goal of a two dimensional image with player positioning, we made use of a five step algorithm, each of which will be further expanded: 

1) Court Detection – find lines of the court;
2) Individual Detection – detect individuals standing on the court;
3) Color Classification – Separate these individuals into two teams;
4) Player Tracking – Keep positions information frame by frame;
5) Mapping – translate onto a court

The data for the project consisted of multiple YouTube videos which were then cropped in order for us to do our analysis. We mainly selected videos in which we were able to see all major lines of the court in order to accurately perform the homography.

Fig. 1 illustrates the block diagram of algorithm developed. 

 

Block diagram of algorithm for player detection and tracking

Block diagram of algorithm for player detection and tracking

Arduino code for detection of muscle fatigue and muscle growth

MATLAB code for detection and classification of micro-expressions from the Spontaneous Micro-Expression

https://opencv.org/

Reviews

There are no reviews yet.

Be the first to review “MATLAB code for basketball players detection and classification in a video”

Your email address will not be published. Required fields are marked *