View Single Post
  #5   Spotlight this post!  
Unread 28-02-2013, 23:01
wre136's Avatar
wre136 wre136 is offline
Registered User
AKA: Will Edds
FRC #2461 (The METAL-SKINS)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2002
Location: Oklahoma City
Posts: 30
wre136 is an unknown quantity at this point
Re: Possible Wrong Wiring in FRC Vision Tracking Example

Just to test out your theory, I created an image that was 320 x 240 pixels. In the center, I created a hollow box that was 72 x 72 pixels. I arbitrarily chose that this would be a 3ft x 3ft box. If I run the equation from the previous post using the width of the image and the camera's horizontal angle of 48 degrees (closer to the 206 camera's real-life view angle), I get the following:

(((320/72)*3)/2)/tan(48/2) = 14.97ft

Now, if I do the same thing but with the height of the image, this does not come out to be 14.97ft. However, if I change the view angle to 36.95 degrees, then I have a match.

(((240/72)*3)/2)/tan(36.95/2) = 14.97ft

This I believe proves that the vertical view angle of the cameras is different from the horizontal view angle.

However, I also believe that this shows the importance in the above calculation that if you use the height of the image, use the height view angle, if you use the width of the image, use the width of the view angle. the key point is to use the right combination and not to mix them! However, I see in the code that we are using the X resolution of the camera and the horizontal view angle of the camera so we should be good to go.

However, the previous post listed in the first part of the tread is incorrect since it is using the Y resolution of the camera but the horizontal view angle of the camera. Just an observation.
Attached Thumbnails
Click image for larger version

Name:	Presentation1 (Custom).jpg
Views:	12
Size:	2.5 KB
ID:	14217