Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Outside Environment - Real World Distance(X,Y) from Camera to a target(LED)

I need some one help to figure out how to get a real world distance(x,y) from a target(LED) to a camera. The camera will be on moving platform. I'm using the Machine Vision to locate the target(pattern maching) but don't know how to get a reference point from a camera and compute the distance. I using Vision Machine V8.2.1, LabView V8.2 and XP OS. If someone out there had done this before, please provide some guidance or VI samples.
 
Thanks,
SC1
0 Kudos
Message 1 of 8
(4,572 Views)

Hi SC1,

I need a little clarification on how you are defining your X-Y plane.  Are you trying to measure the distance from the lenses of the camera to the LED?  Where X would be the distance from the lenses to the LED.  Or are you trying to measure distance in the image where the edge of the image could be represented as the X and Y axis.    If you are doing the latter then you can look at the clamp function.  This is exactly what that function is designed for.  There is an example in LabVIEW that you can find by searching for Clamp.  If you are trying to measure the distance from the lenses to the LED that will be a little more tricky and will take a little more programming. 

Adam H
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(4,551 Views)

Adam H,

 Thanks for your reply. What I'm trying to do is to measure the distance from the lenses to the LED so the platform can position the camera  over the LED based on x,y and z, respectively. Is it possible to archive this with Machine Vision or LabView 8.2.1? I hope this is clear enough for you to help. Please provide me with some guidance or with some VI samples.

Based on my research that I need to convert 2D image into 3D image but I don't know how to implement this and can't find any samples. Please let me know if i'm off track on 3D images.

 

Thanks again

SC1

0 Kudos
Message 3 of 8
(4,545 Views)

Hi SC1,

There might be a way to do it using 3D images but I am not sure.  There is function for it that comes with IMAQ or the Vision Development Module.  There may be some third party companies that make VI’s to do it but I am not aware of any.  I can think of two ways to do it.  First would be to use two cameras.  This way you can correlate the two images and calculate the difference between the two.  The other option would be to calibrate it using multiple images.  So you could take an image at a known distance.  Then look at the size of what you are measuring from.  Take another image at a different distance and compare the sizes of the two objects.  You would have to do this many times to get very accurate.  The more you compare to the more accurate it would be. 

Adam H
National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(4,531 Views)

Adam,

Thanks for you efforts. I can't do option one because I have only one camera and allow to use only one camera. Option2, won't work for me neither because the camera will be mounted on the helicopter. But i like the third party VI that might be able to resolve this issue. Could you ask around to see if any company have custome VI software?

Regards

SC1

0 Kudos
Message 5 of 8
(4,506 Views)

Hi SC1,

i think if your camera is moveable and can be rotate around the own axis, then you can take two picture with the LED on the left side and on the right side. If you know the angle between both picture is should also be possible to calculate the distance to your LED.

Hope it helps.

Mike

0 Kudos
Message 6 of 8
(4,503 Views)
Mike,
 
That is very good but my camera is at fix location and not moveable. This camera will mouted on the helicopter's belly without an operator. Later on I plan to have a real-time
Labview running inside the CVS box, to locate the light source(LED) and and report the real-world X-axis and Y-axis to the flight control computer. Thanks for your inputs.
 
Regards,
SC1
0 Kudos
Message 7 of 8
(4,501 Views)

Hi SC1,

Unfortunately no one around here knows where you could find one or even how you would do it.  Vision alone is not really suited to measure distance in this way.  With your constraints you may want to look at other options to find distance.  It is very difficult if not impossible to do this with one camera like you want. 

Adam H
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(4,476 Views)