How to track cue ball movement?

Pubo

Active member
Does anyone know how to track the cue ball given a video file? I want something that looks like this:


Appreciate in advance!
 

Bob Jewett

AZB Osmium Member
Staff member
Gold Member
Silver Member
There was someone posting to the Shaw high run threads who had a program that tracked runs. I'm not sure how automated it was or what the features were. I suspect the Kozoom and the 5&6 ball tracking tools are proprietary, but you could ask them.
 

Pubo

Active member
There was someone posting to the Shaw high run threads who had a program that tracked runs. I'm not sure how automated it was or what the features were. I suspect the Kozoom and the 5&6 ball tracking tools are proprietary, but you could ask them.
Hi Bob, thanks for the info! Do you have the link to Shaw's high run thread you mentioned?
 

nataddrho

AzB Silver Member
Silver Member
Cue ball tracking, much less cue ball identification, is very difficult to do from a single source video due to shadows and noise artifacts.

Here is an attempt I made using OpenCV to automatically identify the shot line of the player, and the distance between the CB and OB. It is unreliable and depends heavily on the camera being used.

It can be done but with an expensive multi camera set up and calibrated software.

 

bb9ball

Registered
Cue ball tracking, much less cue ball identification, is very difficult to do from a single source video due to shadows and noise artifacts.

Here is an attempt I made using OpenCV to automatically identify the shot line of the player, and the distance between the CB and OB. It is unreliable and depends heavily on the camera being used.

It can be done but with an expensive multi camera set up and calibrated software.

You wouldn't need multiple cameras for ball tracking. Multiple cameras would be needed for the shot line stuff because of the 3D aspect of it.

And, I think you are making identifying the cue ball a bit more difficult than it needs to be. It's typically the first moving ball that would need to the object path plotted for what Kozoom is doing.

Here is another example that I believe is using OpenCV. I bet Kozoom is doing some "curve fitting"(regression) to smooth out the ball path shown compared to what is shown here.
 

Pubo

Active member
I am sure they are using OpenCV. It is an open source free library that has a lot of tools and functionality built-in for "computer vision" projects.

Here is an example of how easy it is to start building ball tracking app with it.
Thank you!
 

nataddrho

AzB Silver Member
Silver Member
You wouldn't need multiple cameras for ball tracking. Multiple cameras would be needed for the shot line stuff because of the 3D aspect of it.

And, I think you are making identifying the cue ball a bit more difficult than it needs to be. It's typically the first moving ball that would need to the object path plotted for what Kozoom is doing.

Here is another example that I believe is using OpenCV. I bet Kozoom is doing some "curve fitting"(regression) to smooth out the ball path shown compared to what is shown here.
Wow! This is exactly what I have been trying to do for my webcam extension: dynamically calculate the distance between the CB and OB.

I need to talk to whoever made this.
 

hang-the-9

AzB Silver Member
Silver Member
Wow! This is exactly what I have been trying to do for my webcam extension: dynamically calculate the distance between the CB and OB.

I need to talk to whoever made this.

It's not a freebee, which makes sense.

"Players can use our offer to analyze the video recordings of their own practice sessions. This service is provided under restricted access conditions and on a fee paid basis. In member area players can access extended analysis functionality and their progress tracking. There is also a possibility of external access given to a coach or player's partner in order to enable cooperative work. Practice sessions analytical data remain private and make no impact on overall rating. With the use of this any player can efficiently track the level and dynamics of their own skill For the time being this section is under development."
 

Bob Jewett

AZB Osmium Member
Staff member
Gold Member
Silver Member
Wow! This is exactly what I have been trying to do for my webcam extension: dynamically calculate the distance between the CB and OB.

I need to talk to whoever made this.
A brief look at their website seems to say they have been inactive since last July.
 

kling&allen

AzB Gold Member
Gold Member
Cue ball tracking, much less cue ball identification, is very difficult to do from a single source video due to shadows and noise artifacts.

Here is an attempt I made using OpenCV to automatically identify the shot line of the player, and the distance between the CB and OB. It is unreliable and depends heavily on the camera being used.

It can be done but with an expensive multi camera set up and calibrated software.


Have you tried image segmentation using tensor flow or the like?
 

iusedtoberich

AzB Silver Member
Silver Member
I'm not a software person at all, but as a colorblind pool fan, I'd love it if the numbers on the balls on live videos popped up so I could know which ball is which. Seems a perfect use for these vision systems, that now seem to be possible with a smartphone and an app.
 

straightline

AzB Silver Member
Silver Member
I'm not a software person at all, but as a colorblind pool fan, I'd love it if the numbers on the balls on live videos popped up so I could know which ball is which. Seems a perfect use for these vision systems, that now seem to be possible with a smartphone and an app.
Colorblind. Really? What about balls with large numbers? Or conspicuous markings?
 

iusedtoberich

AzB Silver Member
Silver Member
May I ask how you deal with this?
It’s hard as hell to learn the patterns from the pros because I can’t tell what the layout is and try to predict it before they shoot. Some ball sets are worse than others. The cylclop was the worst by far, no other set was even near as bad. Centennials and aramith tournaments are near the top. Super aramith pros are in the middle. And surprisingly, the MR Emily set is decent to distinguish. It’s not every ball and every color, but enough to have issues.

In person when I’m playing it’s much easier to distinguish the colors, plus I can see the numbers. I have fouled a handful of times over the years while gambling, shooting at the wrong ball though.
 
Top