
Nov. 20, 2013
6:38 p.m.
Greetings, we're using SciKit template_matching and getting confidence values > 3. Does that make sense? A simple example with test images is attached. Thanks for the fine work! import numpy, sys from skimage import data from skimage import io from skimage.feature import match_template def containsLikelyhood(needleLoc, haystackLoc): haystack = data.imread(haystackLoc, as_grey=True) needle = data.imread(needleLoc, as_grey=True) greyLoc = match_template(haystack, needle) ij = numpy.unravel_index(numpy.argmax(greyLoc), greyLoc.shape) x, y = ij[::-1] height, width = needle.shape return greyLoc[y][x], (x, y, width, height) if __name__ == "__main__": print containsLikelyhood("locatedStar.PNG", "screenshot.PNG")