Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure selected distances

I think this is an easy problem, but I don't see how to do it.

I want to use IMAQ to obtain an image. I have already taken an image that provides calibration information (same setup to view a reticle). I then calibrate the present image using the information that I can obtain from the calibrated image. I then want to select any two points and measure the distance between them. I am not really automating anything except the measurements. I would also like to be able to "bump" the points to move them to more exact locations.

I would also like to plot a series of points along a curve and somehow get the positions of those points in my calibrated units.

I don't mind programming this in LabVIEW, but I would love to figure out how to get Vision Builder or Vision Assistant to do it.

Any ideas?

Thanks
Bob Young
0 Kudos
Message 1 of 10
(5,401 Views)
Question for you Bob,

What do you use to calibrate your images? I am new and I just stick a square of known length into the image at the same distance, save its length in number of pixels to an xls file, paste all my measurements to a prepared xls document and from there calculate the measurements.

This seems tedious and it strikes me that there must be a better way.

Any help is appreciated,

Andrew Zwart
Wescast Ind. Inc
andrew.zwart@wescast.com
0 Kudos
Message 2 of 10
(5,394 Views)
To calibrate, we are using a bit of a tedious process. We set up a sample in the correct configuration to take a measurement. We then replace the sample with a reticle (sort of an optical ruler). We take a snapshot of the reticle and use its measurements to calibrate the image. We then replace the sample and take its measurements. Only, I have been unable to easily take measurements as I have been unable to place two points on one image and automatically calculate their distance. So I place one point. Record its location, then place the second and do the math on the side.

I am looking for a more automated solution.

Ideally I will be using this with a motion system and I will be using the points to plot my moves. This is the reason that I need several points at once.

Thanks for your help,
Bob Young
0 Kudos
Message 3 of 10
(5,381 Views)
Hi Bob,

Thanks for using our discussion forums. It sounds like the Vision Assistant should in fact be able to handle your application. If you load in the image with the reticle on it, you should be able to select Image>>Calibrate from the pull-down menu and save the calibration information with the image. From that point on, each image you load in can be calibrated from your original reticle image using Image>>Calibrate From Image.

Let us know if this helps you out!

Regards

Dan
National Instruments
0 Kudos
Message 4 of 10
(5,378 Views)


@DannyQ wrote:
Hi Bob,

Thanks for using our discussion forums. It sounds like the Vision Assistant should in fact be able to handle your application. If you load in the image with the reticle on it, you should be able to select Image>>Calibrate from the pull-down menu and save the calibration information with the image. From that point on, each image you load in can be calibrated from your original reticle image using Image>>Calibrate From Image.

Let us know if this helps you out!

Regards

Dan
National Instruments




Danny,

I know how to do that part. The part that I haven't been able to figure out is how to then make the measurement. Thanks for the answer, however.

Bob Young
0 Kudos
Message 5 of 10
(5,365 Views)
Me again. I just realized that I am not making myself clear. The problem is not with measuring, it is with manually selecting the two points. I have not been able to use a cursor to select two points for use in the caliper routine. When I just try to select caliper it gives the following message:

"Caliper functions are based on points located by other steps such as Color Location, Color Patern Matcheing, Centroid, Particle Analysis, Shape Matching, Edge Detector, Find Straight Edge, Find Circular Edge, and Pattern Matching. Not enough points are available at this step of the script to perform geometric functions."

Fine, I get that I have to have at least two points to measure the distance between. What I am fialing to see is how to MANUALLY select two points. I don't want to run any of the routines it mentions as ways to get the points. I want to look at the image and pick two.

Any ideas?

Thanks
Bob Young
0 Kudos
Message 6 of 10
(5,363 Views)
Hi

I have included an example program in LV 7.1. Using events to add points when a button is pressed to an array. There is also the capability to delete points from the array in case you make a mistake. When the array has at least two points you can then calculate distances. It was easier to do than to explain.

Mike
0 Kudos
Message 7 of 10
(5,349 Views)
Hey mike,
   I'm encountering the same type of problem for selecting two points and then measuring the distance between those points using LabVIEW. I tried the VI you post 2 years ago, but there's one sub-VI called Cross Generator was missing. Do you have any suggestions?
0 Kudos
Message 8 of 10
(4,830 Views)
Hey Qiushui
    It's a good job I never delete anything Smiley Wink Here you go

Mike

0 Kudos
Message 9 of 10
(4,818 Views)
Thanks a lot Mike:) This VI you worte is quite fun to explore, it will definitely helpe me out for my engineeirng senior design project. It's amazing you kept your stuff from two years ago...

Thanks again!

Qiushui/Jim
0 Kudos
Message 10 of 10
(4,802 Views)