lib/sqed/boundary_finder/cross_finder.rb in sqed-0.1.9 vs lib/sqed/boundary_finder/cross_finder.rb in sqed-0.2.0
- old
+ new
@@ -2,17 +2,17 @@
# Return four equal quadrants, no parsing through the image
#
class Sqed::BoundaryFinder::CrossFinder < Sqed::BoundaryFinder
- def initialize(image: image)
- @img = image
+ def initialize(target_image: image)
+ @image = target_image
find_edges
end
def find_edges
- width = @img.columns / 2
- height = @img.rows / 2
+ width = image.columns / 2
+ height = image.rows / 2
boundaries.coordinates[0] = [0, 0, width, height]
boundaries.coordinates[1] = [width, 0, width, height]
boundaries.coordinates[2] = [width, height, width, height]
boundaries.coordinates[3] = [0, height, width, height]