|
Post by jrash06 on Aug 5, 2016 15:17:35 GMT
I found image comparison of Ankulua is limited to rectangle zone, since it spots difference for all pixels of the patterns.
PNG supports transparent background. Can we take advantage of this fact to ignore diffs in transparent background pixels? In this way, image comparison usage can be expanded.
Thanks
|
|
|
Post by AnkuLua on Aug 5, 2016 15:34:34 GMT
It takes time to study it.
Before AnkuLua provides the solution, here is one possible solution from our experience. If the pattern is big enough, just take the center part with rectangle. Please share your patterns if possible.
|
|
|
Post by jrash06 on Aug 6, 2016 0:15:15 GMT
Patterns like pokestop have 'holes' there and does not have a very specific small pattern that can be matched with Ankulua. media.comicbook.com/2016/08/pokestop-193647.jpgWhat I found is if you try to use the center of pokestop, which is just a blue square, that pattern simply matches any pure color rectangle, like the ground.
|
|
|
Post by AnkuLua on Aug 6, 2016 0:21:15 GMT
Ha! Two possible solutions 1. lower the similarity, such as Pattern("target.png"):similar(0.6) 2. In fact, the pattern is not always the same in Pokemon. Maybe just blind click on many locations on a area of the screen. Then check if the screen changing after each click.
|
|
|
Post by jrash06 on Aug 7, 2016 22:38:38 GMT
I'm actually doing the 2nd.
For the 1st option, what's the algorithm to do the similarity calculation? Looks like it does not weigh the color signal very much
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on Aug 8, 2016 13:26:40 GMT
I'm actually doing the 2nd. For the 1st option, what's the algorithm to do the similarity calculation? Looks like it does not weigh the color signal very much True, AnkuLua converts the images to greyscale before comparing. If you want something like this, search for everything matching your pattern and do a getColor() on every match to filter out what you want
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on Aug 8, 2016 13:28:24 GMT
It takes time to study it. Understandable. I hereby +1 the request for transparency support!
|
|
|
Post by jrash06 on Aug 8, 2016 16:07:05 GMT
It takes time to study it. Understandable. I hereby +1 the request for transparency support! Interesting, will try that
|
|
|
Post by uebermensch on Aug 10, 2017 5:49:08 GMT
Understandable. I hereby +1 the request for transparency support! +1
|
|
|
Post by andreos on Oct 11, 2019 13:39:55 GMT
Looking forward this (transparency support).
|
|
|
Post by AnkuLua on Oct 11, 2019 13:55:33 GMT
Looking forward this (transparency support). It was already supported.
|
|
|
Post by andreos on Oct 11, 2019 14:29:54 GMT
Looking forward this (transparency support). It was already supported. Oh? Awesome!!! This will help me a lot with OCR. Does it work out of the box or do I have to adjust settings?
|
|
|
Post by AnkuLua on Oct 11, 2019 14:39:04 GMT
It was already supported. Oh? Awesome!!! This will help me a lot with OCR. Does it work out of the box or do I have to adjust settings? Just use the latest version. For details, refer to Sikulix pattern description sikulix-2014.readthedocs.io/en/latest/pattern.html
|
|