Class: Imatcher::Modes::Delta

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

Overview

Compare pixels using Delta E distance.

Instance Attribute Summary

Attributes inherited from Base

#result, #threshold

Instance Method Summary collapse

Methods inherited from Base

#calculate_bounds, #compare, #diff

Methods included from ColorMethods

#brightness

Constructor Details

#initialize(threshold: 0.0) ⇒ Delta

Returns a new instance of Delta.



7
8
9
10
11
# File 'lib/imatcher/modes/delta.rb', line 7

def initialize(threshold: 0.0)
  @threshold = threshold
  @result = Result.new(self, threshold)
  @delta_score = 0.0
end