Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Vision - Calculating Distance (http://www.chiefdelphi.com/forums/showthread.php?t=142743)

iSpotix 28-01-2016 21:59

Vision - Calculating Distance
 
I have been reading this screensteps article http://wpilib.screenstepslive.com/s/...ng-the-targets under the Distance section and I was confused by some things.

In particular, this:
Quote:

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.

rich2202 28-01-2016 22:55

Re: Vision - Calculating Distance
 
In the formula, the 2.66 is Tft, or the size of the target in feet. The length of the target is 32 inches. 32/12= 2 2/3 feet, or 2.66 (or 2.67).

iSpotix 29-01-2016 12:39

Re: Vision - Calculating Distance
 
Okay, thank you. So then what is the 30 they are dividing by?

Edit: Are they just saying the Tpixel is 30? They go on to divide by 2 and then by tan

rich2202 30-01-2016 08:47

Re: Vision - Calculating Distance
 
Quote:

Originally Posted by iSpotix (Post 1532023)
Okay, thank you. So then what is the 30 they are dividing by?

Edit: Are they just saying the Tpixel is 30? They go on to divide by 2 and then by tan

(2*Tpixel*tanΘ)


All times are GMT -5. The time now is 02:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi