Go to Post In my opinion, FIRST is better than a sport. - s_forbes [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2016, 21:59
iSpotix iSpotix is offline
Registered User
FRC #4049
 
Join Date: Jan 2016
Location: Pittsburgh
Posts: 27
iSpotix is an unknown quantity at this point
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.
  #2   Spotlight this post!  
Unread 28-01-2016, 22:55
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,275
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
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).
  #3   Spotlight this post!  
Unread 29-01-2016, 12:39
iSpotix iSpotix is offline
Registered User
FRC #4049
 
Join Date: Jan 2016
Location: Pittsburgh
Posts: 27
iSpotix is an unknown quantity at this point
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
  #4   Spotlight this post!  
Unread 30-01-2016, 08:47
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,275
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Vision - Calculating Distance

Quote:
Originally Posted by iSpotix View Post
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Θ)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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