View Single Post
  #4   Spotlight this post!  
Unread 28-02-2013, 08:13
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Possible Wrong Wiring in FRC Vision Tracking Example

The things that need to match are the object size in pixels and in units, and the camera view in pixels and the fov angle. If the pixels weren't square, then we shouldn't switch between height, width, or diagonals. The rest of that is some unit converstion from ft to inches.

The fundamental relationship being used is that at a given plane parallel to the camera sensor, the (size in pixels)/(size in inches) is relatively consistent for all objects in that plane. This means that knowing the physical width or height of an object in the scene lets you calculate a width and height of all other objects in the plane based on their pixel size. This relationship is also true for the visual boundary of the image. The 240x320 image now has a physical size. And that is where you can use the optics of the camera to determine the distance to that plane.

Greg McKaskle