Method: BlackRoi#initialize

Defined in:
lib/roi/black/black_roi.rb

#initialize(dut, args = {}) ⇒ BlackRoi

Public: Initializes a black Roi.

dut - Platform (or subclass) instance to which this Roi belongs. x - Integer x coordinate (default: nil). y - Integer y coordinate (default: nil). width - Integer width (default: nil). height - Integer height (default: nil). rectangle - Hash defining rectangle with keys :x, :y, :width, :height (default: nil). element - Hash same as rectangle (default: nil). blackness - Integer blackness percent 0 - 100 (default: 80). ref_img - String path to reference image (default: nil).

Returns nothing.



24
25
26
27
28
29
30
# File 'lib/roi/black/black_roi.rb', line 24

def initialize(dut, args={})
  super(dut, args)
  @blackness = args.fetch(:blackness, 80)
  @similarity = @blackness
  @dsl_black_roi = nil
  @max_lvl = 255.0
end