Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

mask or crop image from pattern matching result curve

Hey there,

 

I'm using the vision assistant to do error pattern recognition. Beforehand i need to specify the region where to do that. we have a quite good contrast isolated region, that is nicely detected using pattern matching. (See file attached) .. The matching is nicely finding the pattern and also returns the red curve.

 

Now the quesion is: Is there any possibility to mask the image based on the found pattern matching curve?

 

I tried to use making a coordinate system shift from the pattern matching and then do move (shift x,y) a beforehand manually specified ROI. (see script with img mask) But there i only can use a predefined ROI size and loose inspection area (in vision assistant at least.)

 

Any Help is appreciated 🙂 Thanks in advance!

 

Best, Gybrush

Download All
0 Kudos
Message 1 of 3
(571 Views)

Hey Gybrush,

 

I noticed that this was sitting here for some time now.

Were you able to solve the issue or not yet? 🙂

 

Cheers,

0 Kudos
Message 2 of 3
(304 Views)

Hi Deus Ex Machina,

 

I did the following:

1. define the template, in the vision assistant, you want to search later in one image. Maybe you'll need some image processing beforehand. for me it looked like:

1.a. take your template and surround it by the ROI rectangle

GybrushThreepwood_0-1629805060909.png

b: then specify regions that should not belong to the template (if needed) i just pressed finish cause my template image was a quite clean template.

c: then save it as png containing the template information from NI Vision

2. find pattern in Image:

2.a. then in your program you need to input your current image where you want to find templates 

2.b. and the path to the png template image containing the template information

2.c. then you get back an array with all the possible matches and match score and their positions (since i just always had one match to find i took the match with the highest score.)

(in the settings you can set up search parameter, like angle range or resizing etc..)

I saved the matching from the Vision Assistant as LabView vi. find it attached.

3. Then you can do what you want with the information you get. e.g. use the x,y, position to place a cross or ROI or etc.etc

 

Hope it helps 🙂

 

Best,

GT

Message 3 of 3
(300 Views)