Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

For defect analysis by IMAQ Spoke 3

Dear NI Community,

I am having problems  to calculate the width of the ring, then defect analysis, But have different Pixels in the ring,

Any help you could provide would be greatly appreciated.

 

Thank you in advance,

Download All
0 Kudos
Message 1 of 2
(3,140 Views)

Hi,

 

Here is a VI that shows two approaches to it.

1) To get the average width of the ring, you can call IMAQ Find Circular Edge 2 twice to get the inner and outer edges of the ring, using the same ROI, but specifying on the first call Outside to Inside and on the second call Inside to Outside. The VI returns the best fitted Circle and it radius. By subtracting one from the other, you get the average width of the ring.

 

You could also use the lower level VI IMAQ Spoke 4, and compute the distances of the points in a for loop, but by doing that, you'll also get outlier points.

 

Making 2 calls allows you to specify different parameters for the edge detection for the inner and outer edges, which have significantly different contrast (as opposed to looking for the first and last edge).

 

2) VDM 2010 released a new contour algorithm that can be used for that purpose as well.

You can extract the inner and outer contours of the ring, with IMAQ Extract Contour, fit them to a circle and compute the width the same way as described above. In addition to that the new contour functionality allows you to return the distance between the contours of your ring and the fitted circles, which you can use to find defects on the contour of the ring (if this is the type of defect you're looking for).

What type of defects are you looking for? If you provide more information, we'll be able to guide you in the right direction on how to best find them.

 

See attached VI.

 

Hope this helps. Regards,

 

-Christophe

0 Kudos
Message 2 of 2
(3,099 Views)