# is it possible to track movement on a tennis court?

I'd like to track my run in an indoor tennis court. GPS won't be available so I was thinking researching for other solutions:

Accelerometer: I concluded it's a no go because while playing tennis the player makes a lot of movements that include spinning his body that can alter the data.

Then I thought that a 3/4 point IR system might help but again from what I've understood it's hard for the IR system to track the movement since they won't be able to focus on the player.

So my final thought went to radio systems but I couldn't find any info and it's also hard for me to see a theoretical solution at least on how I can mesure the movement/speed of the player.

So here is my question: Is there any existing system that is able to track random movement of an object (athlete) and give info like speed and distance? is there anywhere resources about how such a system might be achieved or at least the exact technology used for it?

Any suggestions and ideas are greatly appreaciated.

## 3 Answers

Well the IR tracking system can work, but I think you need to place the camera at the ceiling. Usually the distance between player and camera at the ceiling of a tennis-hall (height 8+m I guess) stays about the same.

Using IMU-Data is a bad idea cause of the really complex movement

EDIT1: For implementing the IR-Tracking (in this case a pretty simple one) you need an IR camera. Use a 25\$ playstation camera and modify it: http://www.maximumpc.com/article/features/build_your_own_multitouch_surface_computer?page=0,2)

Then place a IR Led at your head or at another position which can be seen pretty good by the camera.

I'm actually not sure if there is any fitting software, but writing such stuff is pretty straight forward.

If you look now at a picture of this cam. It will be all black except one mega-bright spot

OpenCV will be able to communicate with the camera easily and get some images. Then you can use some simple object tracking (or also called blob detection) in opencv to get the position You will get your x/y position. You can perform some basic trigonometry to improve the result but basically the x/y position correlate with a real life postion (the camrera is not moving and you will have most of the time the same vertical distance between you and the camera)
Now it's just a pretty straight logging. For the velocity just multiply the distance you moved between two frames with the frame rate.

• Keep in mind that bright daylight might wash out IR though. – boardbite Oct 8 '14 at 21:40
• If it is played in a hall (what was one of my precondition of my answer) then bright daylight will not be a huge factor in this setup. – TobiasK Oct 9 '14 at 5:13
• Do you have a link to any such project? or how to use IR tracking? or how to calculate distance and speed using IR systems? – jnhghy - Alexandru Jantea Oct 9 '14 at 5:53
• ^Updated answer – TobiasK Oct 9 '14 at 6:57
• Well to improve the accuracy of this system i suggested to use IR-Light. Then you need only to detect a white circle in a black image, this is way easier and more accurate then people detection – TobiasK Oct 10 '14 at 5:16

You should look into motion capture systems. These systems use fixed infrared cameras to track retro-reflective markers on the object. They got their popularity from tracking humans for the movies. But are very handy in robotics. Most of the fancy research being done with quadcopters relies on these systems. For rigid bodies, you can get sub-millimeter accuracy at hundreds of hz.

The price is probably out of the question for a personal project, but if you are doing this as part of a school or lab, then it may be a good investment. Vicon (http://www.vicon.com/) is probably the most well known company. Another is NaturalPoint (https://www.naturalpoint.com/optitrack/).

For this project, as well as others like mine (I'll mention after), I would also consider Low Energy Bluetooth or BTLE.

It would be using radio signals like you said.

I would like to see how I, or a cat, or anyone spends there time. Working from home I spend most my day in the house and mostly at the desk or behind the computer screen. But it would be interesting to collect, analyze and visualize this information.

Two methods: 1) Just set up a few fixed-point broadcasting "towers" with the Arduino on the user as a receiver, recording tower_ID and tower_amplitude and simply triangulate.

2) Set up the user / tennis player / cat as the broadcaster and each tower as a receiver.

Each can be ideal for different situations. Consider how long the User must wear the device, how heavy it can be and thus how much power it can carry. ^ My bet would be that method 1 would require more sophistication and thus a larger arduino / shield / power combination to be worn on the User (Tennis player) / Person (Me) / Cat (not me). ^^ Not so good for tennis or action sports, but not a big deal for me lounging around the house in my sweat pants ([See Loss Of Regimen in TheOatMeal blog about working from home post] for lolz)

With the second method you could use a cheap BTLE transmitter that is lightweight (most the weight of these are made up of the watch battery used to power them) about the size and weight of a 3 stacked quarters. The receiver towers could then be designed with power systems that don't require the cost of reduced weight. The Second method would, however, require a little extra post data munging since you would need to reconcile data from multiple source inputs rather than method 1's use of a single source with multiple inputs.

I am still digging around with the project myself having just started researching today and won't get around to designing later this month.

Please feel free to contact me with any ideas, suggestions or questions @ My Personal Website or LinkedIn

My website / blog is way over due for a make-over and update of past and current projects. But in the coming months I will post projects such as the Brain-Computer-Interface I used to control a synthesizer with, a tactile interface which gave users texture feedback from interacting with digital objects (such as feeling a smooth surface in a picture of granite or a rigid or bumpy surface from accord pictures or programmed game objects with meta data read by the Arduino controlled feedback system build into and around a mouse)

• What are the exact parameters that I can read from a Low Energy Bluetooth transmitter that can give me the distance between the transmitter and the receiver? from what you said I can read the amplitude of the signal but how can I get the distance between the transmitter and the recevier from that value? – jnhghy - Alexandru Jantea Nov 19 '14 at 6:41