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

enter image description here

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

enter image description here



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

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

it works :)

enter image description here

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

  • 2
    $\begingroup$ Why not just run your code on each frame of the video? $\endgroup$ – C. E. Jan 9 '19 at 20:02
  • $\begingroup$ Perhaps ImageFeatureTrack could help. $\endgroup$ – Chip Hurst Jan 9 '19 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.