Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Color Pattern Matching sensitive about search area?

Hi all,
 
I have seen this behavior several times, just curious to know anybody else have a solution for this. I am using the color pattern matching (you can expect the same in normal pattern match aswell) VIs. When i search the pattern in the same image from which i learned, some times it will not find. If move the search area slightly, it will match with 1000 score. Eventhough it is running the math behind to search, why it has to be so inconsistent with the same image & search area. I am running with default search parameters.
 
Thanks,
logic
0 Kudos
Message 1 of 5
(3,956 Views)
Hi Logic,

I did notice similar behaviour with the pattern matching (not the color), the solution I found was to use a modified version, see this :



The Advanced settings I set really increase the process time but at least the result is always fine.


Side note : I suspect the "minimum score" to have an "stange" effect on the detection, I remember using it with the OCR and getting, for the same image, different results when changing the minimum score.

Hope this helps

Message Edité par TiTou le 07-26-2007 11:58 AM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 5
(3,952 Views)

Hi TiTou,

Thank you very much for the posting. Yes, It seems to be depend on lot of stuff. One more interesting data i have found is, it depend on the content of the image also. Meaning.. if you keep the portion of the image where you will get a match of 1000 score and delete the content of other parts in paint and give the same image it is finding the match. Where as if you have some other pictures in the other parts of image, looks like the algorithm gets distracted. It is surprising to me because the match is obvious in my case, because i am searching something on the Image taken from PRINTSCREEN. So the image is always 100% match.

I guess they are trying to work fast and losing the obvious matches, which may be good for time critical applications. But i dont see any documentation or possibilities to make the algorithm robust by giving it more time using the input parameters.

Any NI folks or experts can comment on this problem?

Thanks,

logic

0 Kudos
Message 3 of 5
(3,942 Views)
Hi,

Here is a NI documentation on the advanced pattern matching, I didn't read it entirely but you should be able to learn more about the settings.

I think you are right, the "basic" pattern matching is optimized for speed more than for precision, but the "advanced learn" offers the possibility to change that, the hard part is to find the settings that will give good results for your application. If you're looking for a pattern in a print-screen I suggest you use the "shit" settings in the advanced learn function.

Have fun coding !

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 4 of 5
(3,936 Views)

Hi TiTou,

I will take back my words. It is possible to make it work in the way we want and there are documentation available. We need to spend some time to search and learn it.

I found some top level information in the "NI Vision for LabVIEW" manual as well. Which gives a better understanding about setting the parameters which increases the accuracy. Thank you very much for the help. I do appreciate it.

Thanks,

logic

0 Kudos
Message 5 of 5
(3,926 Views)