# Roulette Ball Tracking with Mathematica

There is an image from roulette spin video, and I have a code to track the ball position on the image

(*Mask is a visible ball track on the rim*)


Module[{ball,c},

ball=FillingTransform@DeleteSmallComponents[Binarize[ImageSubtract[img,Mask],.42],100];

c = Flatten[ComponentMeasurements[ball,{"Centroid","BoundingDiskRadius"}][[All,2]],1];

Show[img, Graphics[{Thickness[.01], Magenta, Circle @@ c}]]]


it works :)

But I want to track the ball position in the video instead of image.

there is a list of images

frames = Import["C:\\Users\\vito\\Desktop\\frame.avi", {"ImageList"}];


how can I change my code to get a desired result?

Thank you in advance to any one who may be able to give me some ideas