LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I measure a distance from a set edge?

I would like to measure a horizontal distance, but I would like to set the left edge, and have the program detect the right edge.

Any help would be greatly appreciated.

(I am using a PCI-1407 card with Labview 6.1 and IMAQ Vision 6 for Labview.)
0 Kudos
Message 1 of 3
(2,515 Views)
Here's one technique that should work. First, do a nonlinear calibration for you camera/lens setup to remove any distortion due to perspective and lens abberation. Calibration also allows you to convert measurements in pixels to real world units.

After calibrating your image, use IMAQ Select Line to manually locate the left edge of you part. Calculate the center point of the line to get an accurate x-coordinate.

Then use IMAQ Construct ROI, followed by IMAQ Find Vertical Edge to locate the left edge of your part.

Once you have the coordinates of the two edges in pixels, use IMAQ Convert Pixel to Real World to get these locations in engineering units.

Regards,

Brent Runnels
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,515 Views)
Thank you for your response. Any ideas on how to incorporate the Select Line with a Clamp Horizontal Max?

Thanks!
0 Kudos
Message 3 of 3
(2,515 Views)