Commits

Sergey Astanin  committed 605b543

choose point with the best matchin (was the worse)

  • Participants
  • Parent commits be4f552

Comments (0)

Files changed (1)

             return color_diff(c,color)*100 < sensitivity
 
         pixels = ifilter(similar, pixels)
-        pixels = sorted(pixels, key=lambda (j,c): -color_diff(c,color))
+        pixels = sorted(pixels, key=lambda (j,c): color_diff(c,color))
         if pixels:
             j, c = pixels[0]
             print (i-x1p)*xscale+x1, (j-y1p)*yscale+y1