|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do I get distance between Camera and the target?
How do I get the distance between Camera and the green light?
Is it in the code? or do I have to use some other program to get the data? I really don't understand it... |
|
#2
|
|||||
|
|||||
|
Re: How do I get distance between Camera and the target?
Math.
If the target is centered, then: (goal_height - camera_height) / tan(camera_tilt) = range The problem is implementing a tan() function on the PIC - check the Whitepapers on Delphi for a few ways to do this (search for CORDIC). Also, if the target is not centered, then you have to convert the vertical pixel error into an angle and add that to the camera_tilt value. This requires that you know the field of view angle of the camera lens. |
|
#3
|
|||||
|
|||||
|
Re: How do I get distance between Camera and the target?
Quote:
It has been this way since (at least) last year. |
|
#4
|
|||||
|
|||||
|
Re: How do I get distance between Camera and the target?
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: How do I get distance between Camera and the target?
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: How do I get distance between Camera and the target?
Instead of doing the math, it might be simpler just to implement a lookup table. Put the robot 50 feet from the goal and measure the camera tilt angle. Move it a foot closer at a time and repeat. Put the answers in the program.
If you have an adjustable shooter, you can put the required barrel tilt/wheel speed/catapult stop bar location in the table instead of the distance. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Judging The Animations | stevek | 3D Animation and Competition | 1 | 18-03-2003 07:57 |
| stolen camera during team party at EPCOT | archiver | 2000 | 2 | 23-06-2002 22:51 |
| Webcast camera angle... | Joe Johnson | Regional Competitions | 13 | 11-03-2002 16:35 |
| Baker Baby Pool | Andy Baker | Chit-Chat | 56 | 18-07-2001 14:58 |