LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ template question

Solved!
Go to solution

Hello,

 

I'm new to IMAQ so I'm not sure how to accomplish the following.  I wish to conduct a comparison between two images to evaluate defects.  The part in question, however, has a hole in the center and the background is NOT consistent (parts mounted in a GelPak at time of imaging so the background seen through this hole is highly variable).  How can I exclude a region within the ROI? (part outer dimensions are square)

 

As a side question: I can't find the IMAQ pallette functions (functions are currently accessible via quick drop menu only).  Where would I expect to find the Menu file?  (LabVIEW 2016)

0 Kudos
Message 1 of 5
(2,003 Views)
Solution
Accepted by topic author proland1121

Let's simplify and say you have a hexagonal part (such as a common nut, the thing into which a bolt screws) that consists of a Hexagon with a Circular hole in the middle (through which you can see "background".  Make two ROIs, one for the Nut (Hex including the hole) and one for the Hole.

 

Take your image.  Use the Hex ROI to get "Bolt + Background through circular hole".  Now you need to make a circular ROI that "fits" the hole.  Use this ROI to "mask" (or remove) the background visible through the hole.  Now your image consists of just the surface of the Nut.  Process away!

 

If you have IMAQ functions installed, there should be a Palette Choice called "Vision and Motion".  Opening that produces the IMAQ functions.  It is possible this sub-Palette isn't visible (and, by default, this is the case).  To see it, "pin" the Block Diagram Palette, click "Customize", and click "Change Visible Palettes".  Put a check in the Vision and Motion option.

 

Bob Schor

0 Kudos
Message 2 of 5
(1,975 Views)

Thanks Bob.  That helps a lot.

 

As follow-up, more specific question....  Lets say I wanted to evaluate a PCB (unpopulated) for trace defects or defects elsewhere (say... a chipped edge or a pit on the surface).  Creating a template file for "golden template" match for the full ROI, would make it difficult to discern one defect "category" from the other.  Alternatively, I could create a template but set the "area to ignore" to cover everything except the traces.

This is a long and tedious process due to the number of traces I have to draw around.  Is it possible to create a template based on a threshold (or range of pixel values) instead of drawing geometric shapes?

0 Kudos
Message 3 of 5
(1,960 Views)

We're now getting into areas with which I have some familiarity, but little direct experience.  There are, in fact, a lot of functions in IMAQ for analyzing images, including forming histograms of pixel values to allow you to form masks based on pixel values instead of geometric regions, but (as I aready said) this is a bit outside my scope of experience.  Examples and documentation is a little sparse, but I want to mention a (relatively recent, relatively "good") book called "Practical Gude to Machine Vision Software.  An Introduction with LabVIEW", by Kye-Si Kwon and Steven Ready, published by Wiley-VCH.  Many of the techniques for analyzing Images to recognize shapes, count particles, etc. that have functions in the Vision Toolkit, but aren't so well explained (or have confusing examples) are discussed here.  

 

Bob Schor

0 Kudos
Message 4 of 5
(1,947 Views)

Thanks again Bob. 

I'll play around with using masks based on the histogram results.

0 Kudos
Message 5 of 5
(1,916 Views)