lib/morandi/redeye.rb in morandi-0.10.0 vs lib/morandi/redeye.rb in morandi-0.10.1

- old
+ new

@@ -1,5 +1,7 @@ +require 'redeye' + module Morandi module RedEye module TapRedEye module_function def tap_on(pb, x, y) @@ -7,10 +9,10 @@ x1 = [x - n, 0].max x2 = [x + n, pb.width].min y1 = [y - n, 0].max y2 = [y + n, pb.height].min return pb unless (x1 >= 0) && (x2 > x1) && (y1 >= 0) && (y2 > y1) - redeye = RedEye.new(pb, x1, y1, x2, y2) + redeye = ::RedEye.new(pb, x1, y1, x2, y2) sensitivity = 2 blobs = redeye.identify_blobs(sensitivity).reject { |i| i.noPixels < 4 or ! i.squareish?(0.5, 0.4) }.sort_by { |i|