Take the 2-minute tour ×

Editing Question for Clarity Thanks for feedback so far, very insightful.

I'm not sure how far along this part of the software community is, and what if any libraries exist for me to leverage from. Heres what I'm trying to do.

Problem: Take an existing video of a game of rugby league. The Rugby League field is 100 metres long, 70 metres wide, and has white line markings every 10 metres running along the width of the field, as well as along the sidelines. Each side has 13 players on the field. Players on each team have identical jerseys that normally constrast strongly against background colours (green/brown field colour) and the referee's colour (usually yellow) and the designated water runner (orange). All players have a unique number in thick white lettering on their backs for identification. Video is taken with a high definition camera. Currently only one camera is used (2D) and existing video does not contain a foreground object of fixed spatial dimensions (as suggested in one answer for comparision measurements, however I could add this to future filming sessions if it is worthwhile). The player's do not run in a straight line 50% of the time but will go sideways on on a diagonal to the play the ball. The distance measured always starts from the spot of the previous "tackle", which ends where the player stops forward movement. It is not always possible to determine the players number from the video (facing other direction, sunlight, others standing in the way of the camera). But this isn't important as the software could allow for manual inputting of unknown "runs" at a later point after analysis.

Determine the distance between two points (i.e. where the player started his "run" and where he finished it).

I'm guessing that this would be quite doable if I manually marked the start and end point in the video. But how would I use landmarks in the background to determine the distance (assuming the person taking the video has kept it from jerking around).

Question: Do software packages or libraries exist that are specialised enough to assist with writing analysis software to determine a sports persons distance travelled based on video taken of the performance?

share|improve this question
Lines on the field are the obvious choice. In their absence, I doubt you'd find anything sufficient landmarks to make an algorithm acceptably accurate. –  Matthew Read Mar 3 '11 at 21:43
Thanks Mat. Luckily its Rugby League and there are vertical lines running across the field every 10 metres (unlike in say union where there are only 3). –  Anonymous Type Mar 3 '11 at 22:46

3 Answers 3

Without reference points, I don't see how this is possible. You need to know the distance in one direction in which the frame spans and this wouldn't be determinable without knowing any of the following:

  • The camera's focal length (at the time of being shot).
  • The sport being played - used to determine the distance if the entire field can be seen.

It's even more complicated to calculate accurately if the player doesn't run in a straight line (a lot of the time!).

I'm sure there are software packages that could pick out players on the screen based on colour, but I doubt there's a simple single solution to what you're after.

share|improve this answer
Thanks for the feedback Jonathan. Ive edited my question now to hopefully address the fact that I'm not looking for a single simple solution but any available packages and tips on this subject. I realise it is still a fairly open field of CS. –  Anonymous Type Mar 4 '11 at 3:31
Depth perception is going to be a killer without great complexity, otherwise you will lose all the precision you are presumably trying to capture. Player heights are known when they are stationary and fully erect, but when negotiating the field they don't maintain an erect position. As a proof of concept I would try and simply your problem first. If you can achieve precision with sprinters through an entire fixed course, and then can reproduce the result for a given segment, then next adapt/ extend to hurdlers you will start to have some idea how difficult/complex the app would need to be. –  JustinC Mar 4 '11 at 3:34
Very good points @JustinC. Thankyou for this feedback its exactly the type of thing I need. Also I'm simplying the design somewhat. I'm no longer looking to get the exact distance between two points, but rather the "metres gained", which is the perpendicular distance between the previous tackle (ball grounded) and the next tackle. –  Anonymous Type Mar 7 '11 at 3:00

I'm not aware of any library or tool that will perform all the tasks you need.

I think you probably will have to build your own, and writing an automagic application like that is going to be very, very time-consuming. My little experience in digital image/video processing says that your application will require some interaction with the user, probably more then you would like. For instance, you would have to manually click on video to select the start/finish positions to be able to compute the distance between those two points. Automatic recognition of objects in videos can be quite complex. But in the end, it all depends on the video (quality of the images, etc, and mainly what stuff appears on it).

Anyway, I suggest you to take a look at OpenCV, a computer vision library used for this kind of stuff.

share|improve this answer
thanks so much for the information Karl. edit just reviewed some of the libraries functions, looks very promising, thanks again mate. –  Anonymous Type Mar 3 '11 at 23:44

I worked with a professor who analyzed discuss throwers at the Olympics and could only film high speed video from afar. In the labe he constructed a computer 3D reference model (cone shaped) based on the dimensions of the ring (probably more consistent than field markings) and the height of the throwers. Normally, he would use a cube that would get filmed before the subject with the camera fixed. The computer knew the markers on the cube and could calculate distances. Oh, two cameras are used for 3D.

The tough part for you will be tracking each player through each frame (or every 5-20 frames). Usually they have uniforms that are in contrast to the field/background. It can get tedious unless you have software that can recognize this contrast. You would still have to ID individual players.

Since this is 2D, you only have to be concerned with the depth of field depending on how high up the camera is. Ideally, the field would look like a perfect rectangle, but doubt they filmed from a blimp.

Are you trying to get accurate speed and acceleration of the players or are you mainly concerned with measuring them relative to each other?

share|improve this answer
I've edited the question to hopefully more accurately reflect what it is I'm trying to achieve. I am limiting my investigation now to just measurements of distance per player. –  Anonymous Type Mar 4 '11 at 2:23

Your Answer


