View Single Post
  #3   Spotlight this post!  
Unread 13-01-2015, 23:46
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Vision Tracking Solution

Good job! It takes a lot of work to do just this, believe it or not.

If you want to take it one step further, you can figure out the angle the camera(robot) needs to move to make the center of the object the center of the image.

Simply solve this proportion

Image width/Fov_x= distance from the center of the image/degrees

be careful though, the origin of the image in opencv is the top left, so you have to do a linear remapping of the point so the origin is the center of the screen!

proof of concept: In 2013 we used this x rotation value to line up with the 3 pt goal autonomously using a pid as shown slightly in this video: http://youtu.be/VhE10dNBxXs?t=27s

Those micro adjustments were not done by our driver, but rather by simply pushing a button on the controller to line up.

This is just food for thought. Take it as you will. (You can also calculate distance to your target if your camera height and angle stay constant, that involves y rotation )
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
Reply With Quote