Class: ImageCompare::Modes::Delta
- Defined in:
- lib/image_compare/modes/delta.rb
Instance Attribute Summary collapse
-
#tolerance ⇒ Object
readonly
Returns the value of attribute tolerance.
Attributes inherited from Base
#bounds, #exclude_rect, #include_rect, #lower_threshold, #result, #threshold
Instance Method Summary collapse
-
#initialize(**options) ⇒ Delta
constructor
A new instance of Delta.
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(**) @tolerance = .delete(:tolerance) || 0.01 @delta_score = 0.0 super(**) end |
Instance Attribute Details
#tolerance ⇒ Object (readonly)
Returns the value of attribute tolerance.
8 9 10 |
# File 'lib/image_compare/modes/delta.rb', line 8 def tolerance @tolerance end |