Go to Post Just the fact we were selected to compete in the eliminations energized the kids more than anything I had seen - Taylor [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 19-02-2006, 13:38
Max Brin Max Brin is offline
Registered User
FRC #1943 (Neat Team)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Israel
Posts: 52
Max Brin has a spectacular aura aboutMax Brin has a spectacular aura aboutMax Brin has a spectacular aura about
Distance calculations

We are looking for the complete code to calculate the distance from the camera to the light...

Thanks in advance.
  #2   Spotlight this post!  
Unread 19-02-2006, 14:28
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
Re: Distance calculations

http://www.chiefdelphi.com/forums/sh...amera+distance

Specifically
Quote:
The camera center to target center formula is similar:

camera to target angle = target pixel * (camera fov angle / camera pixels) - center pixel

Then combine:

bot to target angle = bot to camera angle + camera to target angle

This might also be helplful, but it is about how to calculate the angle to which one should fire.
http://www.chiefdelphi.com/forums/sh...e ra+distance
__________________
  #3   Spotlight this post!  
Unread 19-02-2006, 19:17
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Distance calculations

Then once you have an accurate tilt angle from the camera to the target it is normal trig (tangent) to use that angle and the vertical height between the camera and the target center.

The article Windward quoted I do not believe has any example code with it. I certainly never went that far since our team isn't using the enhanced accuracy values.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #4   Spotlight this post!  
Unread 22-02-2006, 21:38
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Re: Distance calculations

We had a nice Distance_Function() in our program using the tan function and everything, but we found it to not be necessary, since it correlates directly to the tilt_angle so we mapped out distances using the tilt angle as a primary source of measure, works the same, it's just much simpler.
__________________
www.sabrerobotics.com
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
get distance from cmucam ModMan24 Programming 14 29-10-2010 17:51
Sharp IR distance sensors Gdeaver Electrical 13 10-02-2007 20:36
Some ways to measure distance during autonomous shamu1001 Programming 2 06-02-2006 15:24
Long distance... Ashley Christine Chit-Chat 6 27-04-2005 15:11
Distance timing out bludstayne Programming 5 05-03-2004 13:47


All times are GMT -5. The time now is 01:33.

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