06-25-2014 03:59 AM
The geometric matching is even wieder.
06-30-2014 03:01 AM
06-30-2014 04:25 AM
Have you tried contacting your local rep?
06-30-2014 10:15 AM
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.
2. For slightly less accurate results, I did a threshold, and then a binary operation to remove some of the edge details since small differences in the edges of this huge part can compound to produce widely varying scores. See the Binary GPM script. This takes about 600ms on my machine.
3. You could also try the Shape Matching algorithm, but it doesn't return angle information and it takes a little over 1 second on my machine.
4. You can reduce the size of the image if you don't care about position/angle and just want to count the parts. See the Small GPM example. This only takes about 100ms on my machine.
Hope this helps,
Brad
06-30-2014 10:15 AM
I had trouble attaching everything at once, so here are the other scripts:
06-30-2014 10:17 AM
Here are the templates I used (I used your template for the PM Full Size script.
06-30-2014 01:23 PM
Brad,
Thanks for responding and having a look at this thread. Even if the template is big shouldnt the master image get detected? Dont you think it is a bug?
06-30-2014 02:01 PM
06-30-2014 03:36 PM
I think the instability could be due to the combination of algorithm settings and the image size/content. Here's what the help says about Low Discrepancy Sampling for the Pattern Matching step in Vision Assistant:
Since your image has all white or black, I don't think this is a good algorithm to use with this image. I also saw that the GPM algorithm didn't find the same object that was used for learning, until I increased the number of objects to find. Instead of using the existing PM template in the GPM step, if I relearn a new template, than it works fine. 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), but the algorithm developers may say that the algorithm is expecting more grayscale variations since this is what is used for matching and since there is only black or white, the algorithm isn't expected to do well with this type of image. That's why I was recomending other ways to find your parts that will be more stable/accurate.The Grayscale Value Pyramid value I modified to get good results and relatively fast response time was the Match List Reduction Factor = 10.Sorry the algorithms aren't always stable/reliable for any image...good idea to read help in this case. The concepts manual goes into much more details about the algorithms and the types of features/images that work best for the different algorithms.Hope this helps,Brad
07-01-2014 01:13 AM
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
Of all the above explanation i wanted to hear this. Thanks