Class: TextRois

Inherits:
Object show all
Defined in:
lib/rois/text_rois.rb

Overview

The TextRois class holds all the text ROIs for the given platform instance.

Instance Method Summary collapse

Constructor Details

#initialize(dut) ⇒ TextRois

Public: Initializes TextRois. NOT FOR USE IN TESTS.



8
9
10
# File 'lib/rois/text_rois.rb', line 8

def initialize(dut)
  @dut = dut
end

Instance Method Details

#new(args = {}) ⇒ Object

Public: Creates a dynamic text Roi.

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). text - String expected text (default: ”). similarity - Integer text similarity threshold 0 - 100 (default: 70). preprocessing - Integer or Integer Array of preprocessing options (default: 0). only_digits - Boolean indicating whether to convert all read characters to digits (default: false). ref_img - String path to reference image (default: nil).

Returns the new TextRoi object.



27
28
29
# File 'lib/rois/text_rois.rb', line 27

def new(args={})
  TextRoi.new(@dut, args)
end

#SAMPLEObject



31
32
33
34
# File 'lib/rois/text_rois.rb', line 31

def SAMPLE
  new(:x => 100, :y => 50, :width => 300, :height => 200, :similarity => 70, :text => 'All Channels',
      :only_digits => false, :ref_img => 'tsimages/reference/mobile/android/phone/mini_guide.JPG')
end