View Single Post
  #28   Spotlight this post!  
Unread 22-02-2016, 14:18
gnunes gnunes is offline
Registered User
FRC #1391 (Metal Moose)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Westtown School
Posts: 57
gnunes has a spectacular aura aboutgnunes has a spectacular aura aboutgnunes has a spectacular aura about
Re: The Secret Book of FRC LabVIEW

Quote:
Originally Posted by loki1725 View Post
...the angle calculations are not working. I believe my problem is the blob sizes and locations are incorrect due to looking at them from an angle.
Without knowing exactly what you are doing... In general, the apparent size of things will be wrong, depending on where they are in the image, how your camera is pointing, etc. Suppose your camera is pointing straight at a wall a distance d away, and there is a target of height h (height in pixels hp) positioned exactly where the camera is pointing. Then that target will subtend an angle tan(theta) = h/d.

But now, if the same target is high up on the wall, it will span fewer pixels. If the line from the camera to the center of the target makes an angle phi to the horizontal, then the target will appear to be only cos(phi)*hp pixels tall. This is an approximation, because the target is also farther away, but depending on the details, that may be good enough. If you are close in, then the difference will be larger and you will have to apply Pythagoras.

Hope that helps...
Reply With Quote