|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Calculating the trajectory and where the ball will land with a 2D image
So this year, as you may have noticed (by my posts), I'm working on a uber-powerful vision tracking system. So I was thinking about how to create a driver-aid widget to find where the ball is, and where it will land. I will have a 2D image of the ball, but I can grab the third by either a PING or Trigonometry.
So here's my question: So our shooter will most likely have 2 or three modes, a shoot, pass and toss mode, depending on which cylinders are fired. So, if I can get the exit velocity of each mode, and I can know what mode the shooter is in, how can I find out where the ball will land. I want to use trigonometry to do this, so I don't have to recalibrate the camera to look for a ball of a different size. How can I estimate where the ball will hit the ground. Also, if a ball is tossed towards the robot, how can the robot automatically align itself by calculating the ball's trajectory? My platform is OpenCV-2.4.8.0/Windows 8.1, under Visual Studio 2013. Also, how do I find out the exit velocity of the ball from the shooter? |
|
#2
|
|||
|
|||
|
Re: Calculating the trajectory and where the ball will land with a 2D image
Quote:
|
|
#3
|
||||
|
||||
|
Re: Calculating the trajectory and where the ball will land with a 2D image
I'll look into trying it out. So what are the variables I need? Distance from cam, Cam ViewAngle? By the way, what is the ViewAngle of the standard lens in the Canon T2i?
Also, would finding the ball trajectory be requiring any calculus or trig? I haven't learned either yet, so I'll need to spend some time reading textbooks! |
|
#4
|
||||
|
||||
|
Re: Calculating the trajectory and where the ball will land with a 2D image
Already ahead of you
review your kinematic equations to calculate velocity of a ball. You have to measure the distance the ball moves between two frames, and then divide that by the time between the two frames. This gives you velocity in 3d space if you do it properly. You can do more physics calculations to find the heading of the ball, which will remain constant in the real world but will change if the camera moves. To find time you calculate velocity in the up direction, and do d =vt +att. Where d is it's height in the air in the initial frame. You then use time to calculate how far the ball will travel in the left right forward back plane. You also have to take into account the delay of the program calculations and the time is takes for thr crio to do its stuff. We're going for autonomous ball catching only on rare occasions during competitions, like in practice matches. |
|
#5
|
||||||
|
||||||
|
Re: Calculating the trajectory and where the ball will land with a 2D image
Assuming your shooter is precise, and a flat field, it's very easy to mark where it will land. No math is required. Figuring out where an arbitrary ball will land is much harder.
|
|
#6
|
||||
|
||||
|
Thyme for some Physix!
![]() And the smileys are back! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|