Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Instability in pattern matching

Brad, you wrote: " I did notice that in the PM step if I turn on rotation it finds all the objects except the one I learned (which seems wrong, so I will CAR this), " . what about GPM? My first question in this topic was about GPM. I'm absolut sure that there is a problem with GPM.

    
(1) Rif.: Instability in pattern matching
‎06-24-2014 02:55 PM

Sorry, my bad. I should give more information about it. I mean, your suggestion" minimum aperture and increase the lighting intensity".
For example, i have two pictures. for the first one get i with geometric pattern matching score 980. For the second picture, without anything changes, 0 score.

(2)  Rif.: Instability in pattern matching
‎06-24-2014 03:43 PM

Here are the two images and template file. Template file is a little bit big because it has:

- Pattern Match
- Geometric matching edge based
- Geometric matching feature based
- Golden template with mask

 

 

The difference between the first and the second picture is just that i take the second picture 3 seconds after i take the first picture. I didn't changed anything. Positions and angles of the objects are same.

Download All
0 Kudos
Message 61 of 117
(1,050 Views)

Here are the two images and template file. Template file is a little bit big because it has:

- Pattern Match
- Geometric matching edge based
- Geometric matching feature based
- Golden template with mask


 

 

I just created a template using vision assistant and then checked it. It is not something like difference in vision assistant and labVIEW migration. It was still giving unexpected results the op is talking about. I can confirm that.

0 Kudos
Message 62 of 117
(1,047 Views)

Hello Brad, you wrote: "Since your image has all white or black, I don't think this is a good algorithm to use with this image."

 

Images seems to be black/white because we use backlight illumination. It is necessary to measure parts as accurately as possible.

0 Kudos
Message 63 of 117
(1,033 Views)

Brad, you wrote: "

Because this image is so large, you can try a few different things depending on what you're looking for:

1. For accurate position/angle, use PM with the pyramid algorithm. This will reduce the size of the image where the initial matches are found. See PM Full Size for an example of this. With the smaller initial sample size and the larger reduction factor, it takes about 1 second on my machine."

 

What is your settings? Can you post your template for PM? When i try your script, PM didn't find all parts and it takes too long. definitely longer then 1 seconds.

 

And when i use PM with other than Low Discrepancy Sampling, resulting templates are too big (over 10MB), template learning time is too long.

 

I've already read all documents and tried all the methods at the beginning of the project. I need fast and accurate matching. I have not one but a lot of templates.

 

Problem is non of the methods (PM and GPM) are stabil.

 

0 Kudos
Message 64 of 117
(1,019 Views)

"so I will CAR this"

 

As i wrote before i'm new in NI forums. So, may i ask, what a "CAR" is?

0 Kudos
Message 65 of 117
(1,015 Views)

A CAR is a Corrective Action Request. It is how we track things to fix internally. I have forwarded this thread to the algorithm developers so they can comment with more details on our questions/issues. I tried your latest images and template (which are the same I believe as what you posted earlier) and with GPM when I add a new step and use your template, it finds all objects on both images if I set the angle range to -180 to 180 and increase the number of objects to find and it only takes about 275ms on my machine. Does this not work for you?

 

When I try the template in the Pattern Matching step, it does not find all the objects with the Low Discrepancy Algorithm, but the Grayscale Value Pyramid works fine. I set the Match List Reduction Factor to 10 to speed it up so it takes about 1 second on my machine. I've attached the script I used for both the GPM and PM steps that seem to work well with your images and templates that you posted.

 

Let me know if you're getting different results.

Thanks,

Brad

0 Kudos
Message 66 of 117
(1,012 Views)

Brad,

Please note that it works if I chose a slanted template but doesnt work for straight one. Don't know if something can be deduced from this

0 Kudos
Message 67 of 117
(1,010 Views)

Brad,

 

Is a car filed? Did you talk to R&D? Is there something that we are missing?

0 Kudos
Message 68 of 117
(979 Views)

Hello, i reply on this topic for the problem that i originally bring to attention, the instability of the Pattern Matching Function. After several tentatives i found that is fundamental to have a good template. If the template is well illuminated and it has good contrast (this is very important) the algorithm works well, beside the results are inconsistent.


I think that this info is no use for the topic related to the latest messages but maybe it will help someone later.

 

Francesco.

0 Kudos
Message 69 of 117
(976 Views)

 After several tentatives i found that is fundamental to have a good template. If the template is well illuminated and it has good contrast (this is very important) the algorithm works well, beside the results are inconsistent.


 

I agree but the problem is you wont get to define a better contrast and well illuminated template than the one given in this thread. If you read through you will find instances where the master template itself is not getting detected

0 Kudos
Message 70 of 117
(967 Views)