Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Instability in pattern matching

Nothing has changed since all these years?

 

 

By coincidence I came across the following topic:

http://forums.ni.com/t5/Machine-Vision/Troubles-with-Geometric-Pattern-Machine/m-p/245426/

 

It was the year 2005. Nine (9 !) years have been passed. It seems to me there are not so many progress been made on these issues. Same problems continuues today with PM and GPM.

Message 71 of 117
(1,169 Views)

We have added new algorithms to try and address these issues. That's why the Pattern Matching step now has the two new Pyramid Algorithm options, which seem to work well with your image. Once I set the the "Match List Reduction Factor" to 5 or 10 it found the objects in about 1 second on my machine, and it worked fine with your template002.png and the two images you provoided with scores between 980 and 1000 for both images.

 

The GPM also has a new algorithm added called "Edge Based" which seemed to work well with your images. Using your template002.png with the two images you provided, it found the 4 objects in both cases with scores between 905 and 1000.

 

Let me know if you aren't getting these results with your template and the two images you provided. The older algorithms did have issues with this type of image, so I would not recommend using the Low Discrepancy Sampling algorithm for Pattern Matching or the Feature Based algorithm for GPM for finding objects in these types of images.

 

Hope this helps,

Brad

Message 72 of 117
(1,153 Views)

Hello Brad,

About Pattern Matching (PM):

 

when i use your script "PM and GPM Steps.vascr" with my template "template002.png" on image "img002.png" was nothing found! Do you use an another template?

 

Here the screenshots for setting and results.

 

Download All
0 Kudos
Message 73 of 117
(1,143 Views)

That was using the Low Discrepancy Sampling algorithm (i.e. the old algorithm that doesn't work well for these types of images). Try using the "Grayscale Value Pyramid" algorithm instead...this is the newer algorithm that should work better for these types of large images.

 

Let me know if the newer algorithm is still not working well for you.

Thanks,

Brad

0 Kudos
Message 74 of 117
(1,138 Views)

Hello Brad,

 

About Geometric Pattern Matching (GPM):

 

For this image (img002.png) and template (template002.png) as a matter of fact find GPM all 4 objects. But i have not just this img. For some other images finds GPM not all objects.

 

Problem is, sometimes i must use "search strategy" as "conservative" and sometimes i must  use "search strategy" as "balanced" if i want to find all objects that i search. That is inconsistent, too.

 

On the other hand i prefer conservative methode because i need accurate results.

 

Message 75 of 117
(1,137 Views)

Hello Brad, you're right. Here the results for " "Grayscale Value Pyramid":

 

0 Kudos
Message 76 of 117
(1,129 Views)

So if this approach doesn't give you stable results, please let us know and provide the set of images and template you used that didn't give you good results. Sorry this has dragged out and taken so long, but hopefully this new algorithm will work better for you.

 

Thanks,

Brad

Message 77 of 117
(1,129 Views)

@Brad wrote:

So if this approach doesn't give you stable results, please let us know and provide the set of images and template you used that didn't give you good results. Sorry this has dragged out and taken so long, but hopefully this new algorithm will work better for you.

 

Thanks,

Brad


Brad,

 

What version of labVIEW supports this algorithm?

0 Kudos
Message 78 of 117
(1,109 Views)

Hello Brad, you wrote: "...Once I set the the "Match List Reduction Factor" to 5 or 10 it found the objects in about 1 second on my machine..."

 

Where do you get these value? If you use performace meter, can you send a screenshot of performance meter results? I thing there is a problem with performance meter formatting. We can only see there just 12 character. When a value over "999,999 ms" is , we see just this part.

 

For example i post yesterday "Grayscale Value Pyramid" results ("PM_grayscalevalue_03_performance.png").

 

Average values for:

Geometric Matching: 466,414 ms

Pattern Matching: (?) 651,227 ms

 

This can't be right, because if you read first lines: "An estimation of the time required by NI Vision Assistant to perform the inspection on the current image is: 2111 ms or 0,47 parts/s"

 

Average Inspection Time: 2111,39 ms"

 

So, we can easily see that GM takes 466,414 ms (average)

 than Pattern Matching must take 2111,39ms - 466,414ms = 1644,976ms (! not 651,227ms - average)

 

 

I measure in my program processing times, too. There is no way that PM takes under 1 sec.

 

I think it must be a CAR for performance meter formating, too.

 

 

 

 

Message 79 of 117
(1,106 Views)

Labview 2013 (or rather NI Vision Development Module 2013) supports pyramid based matching.

 

http://digital.ni.com/public.nsf/allkb/5091CD6F91BC88D786257B97006C690D

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 80 of 117
(1,105 Views)