Ask Your Question

How to detect the spin of a ball

asked 2014-04-23 10:49:54 -0600

updated 2018-01-14 02:00:13 -0600

Hi all,

I'm a Unity3D game developer and I'm currently working on a sports simulation project which simulates soccer ball kicks. I'm using Asus Xtion Pro Depth sensor fixed on the ceiling to detect speed and the direction of the soccer ball when you kick. But in near future I'm going to change the sensor I use to a 100fps color camera and would like to add the feature where it can detect the soccer ball spin as well. I've researched about this topic and haven't found anything useful.

I can use a specially marked ball for this. but its great if I can find a way to use the available labels or markings of the ball.

would welcome any suggestions/ideas.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2015-01-03 11:59:50 -0600

Thilina – have you figured this out yet? I am now running into the exact same issue in a real-world application where we want to track a soccer ball.

edit flag offensive delete link more

answered 2014-04-23 17:04:06 -0600

Witek gravatar image

Well, in theory you could use standard markers and detect both their position and orientation in consecutive frames with a single line of code (Aruco). If the image is not blurred too much (which I am afraid could often be the case), you will be able to distinguish separate markers and compare their orientation in each frame, which will give you what you want after some calculations. Alternatively, you can use a standard football and this is what I mean by standard football: image description

without special markers. Just detect the black patches, which are regularly spaced around the ball. Use a model of your ball and make several hypotheses about its orientation and resulting locations of black patches (using just centers should be enough, but if you can detect corners, the precision will be much higher). Compare the real positions with the modeled ones and use some optimization algorithm to minimize the difference. In this case blur will not have such a strong influence on the orientation detection result, I suppose, but the optimization algorithm will be less straightforward than detecting a number of markers.

edit flag offensive delete link more


Hi witek,

Thanks for your answer. do you have any sample code that uses ArUco in a similar situation like this ?

Thilina gravatar imageThilina ( 2014-04-24 14:47:19 -0600 )edit

Unfortunately I don't, but Aruco is quite simple to use and comes with a sample code. However it's not even near your project, so you will have to figure it out yourself.

Witek gravatar imageWitek ( 2014-04-26 04:57:37 -0600 )edit

Question Tools


Asked: 2014-04-23 10:49:54 -0600

Seen: 1,980 times

Last updated: Apr 23 '14