-3

I want to create a program that would take a video of a baseball being thrown indoor into a net and analysis the movement and angle to calculate how far the ball would have gone. This is my final goal and is a long way away, as I do not know how to begin to write a software that can recognize the movement of the baseball in the video. Can someone please give me some info as to what I should look into to have my software tracking the balls movement in the frame? Any help is greatly appreciated.

dgelinas21
  • 641
  • 3
  • 9
  • 22
  • 1
    First of all, let me start by telling you that recognizing certain objects using any sort of programming language is HARD. So if you don't know where to begin, perhaps you could begin by reading some tutorials or at least reading up on this topic. Second of all, SO is not the place for this question, which is why I'm flagging this as off topic for SO. If you wish to post something, please read How to Create a [mcve]. FYI your question is getting downvotes because it shows a lack of research (even if you did some, you didn't show it) and is extremely broad and unanswerable. – MercyBeaucou Jun 01 '16 at 03:52

1 Answers1

1

This seems like a cool project. Obviously, to tackle this problem, we should split it into parts. They could be as follows:

1. Recognize the ball
2. Analyze frame by frame to find vector of movement.
3. Perform necessary calculations

So, to recognize the ball, you could try many things. It's possible to use complex object recognition to find out, but I would accomplish it by using contrast. Paint the ball a bright color, and shoot the video against a dark backdrop. The ball should be easily visible, and the program just needs to look for that color, and assume that it's the ball.

To find the movement, we need real-world units. The video should be shot against a backdrop that has measurements on it. Similar to what the mythbusters did here.

The program needs to know the framerate of the video, so it can know the time that has elapsed across a given number o frames. Assuming the framerate, you could use the measurements from the backdrop and some basic equations to find the speed. Also, the angle of movement could be found by measuring the change in vertical and horizontal distance, and some math.

I'm not really that great with physics, so I couldn't tell you what exactly to do, but really after all of that, the program should apply all the data found above to calculations to find the distance it would have traveled.

Good luck!

a.deshpande012
  • 715
  • 7
  • 18