user992520
user992520

Reputation:

snooker ball collision detection

i trying to detect the initial colour a white ball hits on a snooker table. I will be using a camera looking down on table so balls move in x and y direction. I have the snooker balls detected and their colours using opencv. just trying to implement a way of tracking which ball the white touches first.

Upvotes: 0

Views: 959

Answers (2)

lfagundes
lfagundes

Reputation: 3068

You can also work with the foreground, in which each moving ball will be a blob. First moving blob to appear is the white ball, second one is the first ball hit. Then check the whole image to know the color of that ball.

Upvotes: 1

Martin Beckett
Martin Beckett

Reputation: 96119

Track white ball path - when the direction changes assume that was a hit

At the point the direction changes find the distance from the center of the white ball to center each other ball.

The ball it hit must be the closest distance (and presumably must be 1 ball diameter away!)

Upvotes: 1

Related Questions