On 7/6/06, Peter Valdemar Mørch <[EMAIL PROTECTED]> wrote:
Gabe Schaffer magick-at-gabe.com |Lists| wrote:
> For an image. basically you would build a table that says for any > color in the image you're searching for, what the minimum X and Y > distances are to the upper-left. I don't think I have time to write > such a thing, but it shouldn't be too hard. Now the thing is that I'll probably be looking a lot for things like the title of a window, the text on a button etc. So the colors in the sub-image are likely to be the most common colors on the desktop. But I think your idea has substantial merrit. I could start with the first screenshot and investigate the frequence of colors in it. Then find the pixels in the sub-image that are least likely to occur in the screenshot and look for those first, so I don't waste time looking for the most common colors first. And then look for a pixel of another color at some offset so I don't waste time looking for e.g. 29 blue pixels next to each other, a rather common occurance. Ideally I should look for color transitions first, to be able to rule out false matches quickly.
That should work, but the problem is that your average button contains only the colors black, dark grey, grey, and light grey.
This probably likely to be *much* faster in C, so maybe this should be implemented in C and then the appropriate perl bindings created...
Yes, definitely.
Anybody have experience with the speed difference between C and perl for this sort of thing?
My first guess would be about 100x difference. GNS _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
