Class: ImageRois
Overview
The ImageRois class holds all the image ROIs for the given platform instance.
Direct Known Subclasses
AppleTvImageRois, DtaImageRois, MdnImageRois, MobileImageRois, OdnImageRois, PassportImageRois, RokuImageRois, RokuTv1080ImageRois, RokuTv720ImageRois, RokuTvImageRois, SamsungTvImageRois, SaraImageRois, StbImageRois, TivoImageRois
Instance Method Summary collapse
-
#initialize(dut) ⇒ ImageRois
constructor
Public: Initializes ImageRois.
-
#new(args = {}) ⇒ Object
Public: Creates a dynamic image Roi.
- #SAMPLE ⇒ Object
Constructor Details
#initialize(dut) ⇒ ImageRois
Public: Initializes ImageRois. NOT FOR USE IN TESTS.
8 9 10 |
# File 'lib/rois/image_rois.rb', line 8 def initialize(dut) @dut = dut end |
Instance Method Details
#new(args = {}) ⇒ Object
Public: Creates a dynamic image 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). img_x - Integer secondary Roi x coordinate (default: nil). Required. img_y - Integer secondary Roi y coordinate (default: nil). Required. img_width - Integer secondary Roi width (default: nil). Required. img_height - Integer secondary Roi height (default: nil). Required. ref_img - String path to reference image (default: nil). Required. similarity - Integer image similarity threshold 0 - 100 (default: 80).
Returns the new ImageRoi object.
28 29 30 |
# File 'lib/rois/image_rois.rb', line 28 def new(args={}) ImageRoi.new(@dut, args) end |
#SAMPLE ⇒ Object
32 33 34 35 36 |
# File 'lib/rois/image_rois.rb', line 32 def SAMPLE new(:x => 100, :y => 50, :width => 300, :height => 200, :similarity => 80, :ref_img => 'tsimages/reference/mobile/devices_screen.jpg', :img_x => 120, :img_y => 60, :img_width => 200, :img_height => 100) end |