|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can we use the camera to messure distance?
![]() |
|
#2
|
|||||
|
|||||
|
Re: camera question
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: camera question
Indirectly, yes. If you know the actual size of what you're looking at, you can figure out how far away by how big it looks to the camera. Or if you know where it is relative to the camera mount's orientation, you can figure out its distance by how far away from center the camera needs to look in order to see it.
I figure many teams will be using the camera tilt angle and the known height of the vision target (plus a wee bit of trigonometry) to give an indication of the distance to the goal. |
|
#4
|
|||
|
|||
|
Re: camera question
How?
|
|
#5
|
|||
|
|||
|
Re: camera question
If you know the tilt angle, the height of the camera, and the height of the center of the target, you can approximate the horizontal distance using the equation distance = (height from camera to target)(cot(tilt angle)).
|
|
#6
|
||||
|
||||
|
Re: camera question
is the tan function built in the program? how do I get it so I can type "tan (angle in radians)" and have it evaluate?
|
|
#7
|
|||
|
|||
|
Re: camera question
Quote:
|
|
#8
|
||||
|
||||
|
Re: camera question
And that's built in to the camera function or in the default 2006 code?
|
|
#9
|
|||||
|
|||||
|
Re: camera question
See http://www.chiefdelphi.com/forums/sh...ghlight=math.h for information on the provided math library.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| CMUCam2 GUI Tilt Question | Idaman323 | Programming | 3 | 27-01-2006 02:01 |
| Camera Calibration | organgtool | Programming | 0 | 11-01-2006 23:56 |
| Using camera PWM out | Cuog | Programming | 2 | 28-11-2005 14:17 |
| Trying to import Camera code into program without. | Kingofl337 | Programming | 1 | 18-02-2005 00:43 |