|
Re: Distance Algorithm
Here you go.
I have this as a separate VI right inside my image processing loops.
Basically what this does is:
(Actual width of the target in ft * Y Resolution of camera image) / (The processed rectangle's height in pixels) / 2 / (the tangent of the camera's FOV/2)
Be very careful with the number you're using for FOV. The spec sheets all give you the FOV in degrees, and I used radians in my labview.
EDIT: I accidentally have width*x_res writte in that image, that should be y_res if you're using the height of the rectangle
Last edited by jesusrambo : 10-02-2012 at 01:33.
|