View Single Post
  #9   Spotlight this post!  
Unread 05-01-2014, 12:37
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Vision Targeting for Aerial Assist 2014

Quote:
Originally Posted by faust1706 View Post
I"m going to finish it as soon as I can so I can then outsource the code. If you do a cascade on the object, then you can calculate distance via sterio or depth. You can "measure" the distance traveled between 2 frames for this ball or robot, along with the distance on screen. Size you can assume that the robot's frame dimensions will be almost identical for every robot (or you could save that robot's dimensions when doing a cascade of them), you can measure the velocities in the other two, then use simply add all 3 and now you know it's velocity. Then you know how fast you are going to roll the ball at them, so you do a vector problem. This does assume that they will continue their speed.

The ball is a fairly easy. You already know how big the ball is (therefore its diameter). You could simply use the area of the ball to calculate how far away it is. It would take some testing, but it is very doable. Then the same math applies to the previous example.
The math involved is quite simple. You know the diameter of the ball in real life. You can get the diameter of the ball from theNumber of pixels out is wide. Use convexhull to find the balls and process them. So you will need a reference image showing how large 25 inches is. You can use this info to extrapolate the size and distance to three ball. This will allow you to find the distance to the ball and find the speed and acceleration.

This is simpler than what it seems. Have you gotten pence installed with python bindings or Windows c++?

Read 341's vision whitepaper!!!