Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   camera question (http://www.chiefdelphi.com/forums/showthread.php?t=43155)

naor52 02-02-2006 12:24

camera question
 
Can we use the camera to messure distance? :confused:

DjAlamose 02-02-2006 12:29

Re: camera question
 
Quote:

Originally Posted by naor52
Can we use the camera to messure distance? :confused:

Yes, the servos will give you an angle at which the camera is tilted at, with this, and some other dimensions, you can calculate the distance you are away from the target.

Alan Anderson 02-02-2006 12:29

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.

naor52 02-02-2006 12:35

Re: camera question
 
How?

viewtyjoe 02-02-2006 16:14

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)).

Denz 02-02-2006 19:38

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?

chris31 02-02-2006 19:56

Re: camera question
 
Quote:

Originally Posted by Denz
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?

Yep, you should be able to just call it like that.

Denz 02-02-2006 23:18

Re: camera question
 
And that's built in to the camera function or in the default 2006 code?

Alan Anderson 03-02-2006 00:07

Re: camera question
 
See http://www.chiefdelphi.com/forums/sh...ghlight=math.h for information on the provided math library.


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

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