Class: ImageCompare::Modes::Delta

Inherits:
Base
  • Object
show all
Defined in:
lib/image_compare/modes/delta.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#bounds, #exclude_rect, #include_rect, #lower_threshold, #result, #threshold

Instance Method Summary collapse

Methods inherited from Base

#area, #compare, #diff, #update_bounds

Methods included from ColorMethods

#blue, #brightness, #green, #orange, #red, #transparent, #yellow

Constructor Details

#initialize(**options) ⇒ Delta

Returns a new instance of Delta.



10
11
12
13
14
# File 'lib/image_compare/modes/delta.rb', line 10

def initialize(**options)
  @tolerance = options.delete(:tolerance) || 0.01
  @delta_score = 0.0
  super(**options)
end

Instance Attribute Details

#toleranceObject (readonly)

Returns the value of attribute tolerance.



8
9
10
# File 'lib/image_compare/modes/delta.rb', line 8

def tolerance
  @tolerance
end