View Single Post
  #8   Spotlight this post!  
Unread 02-04-2016, 20:55
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,679
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: How can angle offset of a shooter be calculated from pixel offset?

If your method described above doesn't seem to give you quite the right answer, perhaps you really want to know what the proportionality constant (pixels to degrees) is for small angles (rather than the full image width). To do this, I suggest:
  1. Position the robot so that the target is reasonably close to the center of the image.
  2. Note exactly where the target center is located.
  3. Rotate by a known small number of degrees (perhaps 5 or 10)
  4. Note where the center of the target is now.
  5. Divide the number of pixels moved from step 2 to 4 by the number of degrees rotated in step 3

This will give you the number of pixels per degree for small angles near the center of the camera image.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote