I have been reading this screensteps article http://wpilib.screenstepslive.com/s/3120/m/8731/l/90361-identifying-and-processing-the-targets under the Distance section and I was confused by some things.
In particular, this:
Vertical target rectangle measures 40 pixels when the camera resolution was 320x240. This means that the blue rectangle width is 2.66*320/30 or 21.28ft.
I understand the 320 but where do the 2.66 and 30 come in? I think I have everything else down.