Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to have "live" teaching ability on pattern match

I have to develop an application where I allow a user to place a "perfect" part in a fixture, and "teach" that image.  They will then place other parts of the same variant and I need to inspect them using pattern matches.  Additionally, I need to separate the field of view into small ROI's with a pattern match in each one, (imagine a 10" x 10" field of view with 100 one inch square ROI's), so in effect, we need 100 templates for the 100 pattern matches. This is to get sufficient resolution of a defective area, as the change to the overall part is to small to register repeatably.

 

The pattern matching is up and running, with me teaching the template "grid squares" from within Vision Builder, but at am a loss as to how to allow the operator to "teach" these patterns without getting into VB.

Thanks for any help.

 

0 Kudos
Message 1 of 6
(2,322 Views)

Hi Gort000,

 

I have a couple of clarifying questions on the goal here. Are you needing to inspect the entire ' "10 x 10" ' field of view, or could you focus in on specific areas of the image? In general, I would not expect breaking up the field of view into smaller ROI's to improve the resolution.

 

Have you considered using golden template to detect defects: https://documentation.help/NI-Vision-Builder/DetectDefects_Concepts.html?

 

Assuming breaking this into 100 pattern matches has improved the performance, how are you currently teaching the template "grid squares"? I would like a better understanding of this process to see if it would be possible for an operator to do this without modifying the VBAI application.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 6
(2,277 Views)

Hi Brian,

Thanks for your reply.

 

Ultimately, I need to inspect the entire 10" x 10" area.  The reason I am breaking it up in to a 10 x 10 grid of individual pattern matches is that if a part under inspection fills the field of view, but the defect in the part is only 3-5% change over the entire image, the pattern match does not have that much discrimination to produce repeatable sensing of the defect. If instead I take a 1" square area on that same part (where the defect is), then that 3-5% defect on a 10" x 10" area now becomes a 50% change over a 1" x 1" area, so the discrimination is increased by using a smaller field of view for a single pattern match.  This is why I believe I have to break up the area into many smaller pattern matches.

 

The "golden template" is exactly how the pattern match works in the first place.  You teach a perfect part using the "NEW TEMPLATE" portion of the pattern match, then compare it to the the parts under test.  In the VBAI "Pattern Match", you have to teach a template to act as the "golden image":.  I just want to bring that process of teaching the golden image out to the operator.

 

Thanks

   

0 Kudos
Message 3 of 6
(2,272 Views)

You can do this, but it might take LabVIEW in order to have full access to the Vision Development Module.  Basically, you need to break down and programmatically automate the Vision Template matching process.  

 

1.  Getting a good template: You would have to setup the programming to walk an operator through grabbing the template.  This would also include making sure the part is in a fixed location.  I would most likely stay away from the breaking down the image into multiple areas as it adds complexity.

 

2.  Ensuring the template works: Having a test fail and a test pass to ensure they grabbed a good image.

 

You can do this as good programming hides complexity from operators, but it could be a lot of work on your end.  You may want to see if you can get a list of the parts being tested (if possible) and just make all the template yourself.  This eliminates error but does reduce the operator's ability to make their own.

 

Do you have examples of the templates/parts you want to use?

 

-Bear

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 4 of 6
(2,268 Views)

Thanks, I am going to be using labview for VBAI and also some of the other control aspects of this project.

"Getting a good template: You would have to setup the programming to walk an operator through grabbing the template"

Agreed, this is the root of my problem, and what I am asking for, how can I have an operator teach a template?

The rest is elementary.

 

0 Kudos
Message 5 of 6
(2,260 Views)

You would have to programmatically build the template in a series of steps.  How complicated are the templates?  If you are trying to make a template of a star, then you would process the photo to highlight the star based off light/dark then let the operator save it.  In the background, LabVIEW would be using the functions at run time. 

 

I hope you realize that you're basically just created a new UI for LabVIEW as you would have to create an interface that exposed all the image processing functions LabVIEW has available to making a template.  Again, this is doable, but it's not going to be a quick program unless you are able to take advantage of VBAI or Vision Assistant to create the templates.

 

-Bear

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 6 of 6
(2,254 Views)