def __init__(self, name=None): """ init the class :type name: string :param name: the object name """ #self._main_component = None #self._sub_components = [] self.__threshold = 0.7 self.__timed_out_sub_extra_images = [] self._info_manager = InfoManager() self._overlapping_factor = self._info_manager.get_info("OVERLAPPING TOLERANCE FACTOR") try: self._overlapping_factor = int(self._overlapping_factor) except: self._overlapping_factor = 10 the_name = "template_finder" if name is not None: the_name = name super(ImageFinder, self).__init__(the_name)
def __init__(self, canny_threshold1, canny_threshold2, canny_apertureSize, hough_threshold, hough_minLineLength, hough_maxLineGap, line_angle_tolerance, ellipse_width, ellipse_height, text_roi_emptiness, text_roi_proportion, image_roi_emptiness, vline_hw_proportion, vline_w_maxsize, hline_wh_proportion, hline_h_maxsize, rect_w_minsize, rect_h_minsize, rect_w_maxsize_01, rect_h_maxsize_01, rect_w_maxsize_02, rect_h_maxsize_02, rect_hw_proportion, rect_hw_w_maxsize, rect_wh_proportion, rect_wh_h_maxsize, hrect_proximity, vrect_proximity, vrect_others_proximity, hrect_others_proximity): self._original = None self._debug_image = None self._debug_matrix = None self._i = None self._r = None self._t = None self.irt = None self._imageBoxes = [] self._rectBoxes = [] self._textBoxes = [] info_manager = InfoManager() self._scaling_factor = info_manager.get_info("SCALING FACTOR FLOAT") self.canny_threshold1 = canny_threshold1 self.canny_threshold2 = canny_threshold2 self.canny_apertureSize = canny_apertureSize self.hough_threshold = hough_threshold self.hough_minLineLength = hough_minLineLength self.hough_maxLineGap = hough_maxLineGap self.line_angle_tolerance = line_angle_tolerance self.ellipse_width = ellipse_width self.ellipse_height = ellipse_height self.text_roi_emptiness = text_roi_emptiness self.text_roi_proportion = text_roi_proportion self.image_roi_emptiness = image_roi_emptiness self.vline_hw_proportion = vline_hw_proportion self.vline_w_maxsize = vline_w_maxsize self.hline_wh_proportion = hline_wh_proportion self.hline_h_maxsize = hline_h_maxsize self.rect_w_minsize = rect_w_minsize self.rect_h_minsize = rect_h_minsize self.rect_w_maxsize_01 = rect_w_maxsize_01 self.rect_h_maxsize_01 = rect_h_maxsize_01 self.rect_w_maxsize_02 = rect_w_maxsize_02 self.rect_h_maxsize_02 = rect_h_maxsize_02 self.rect_hw_proportion = rect_hw_proportion self.rect_hw_w_maxsize = rect_hw_w_maxsize self.rect_wh_proportion = rect_wh_proportion self.rect_wh_h_maxsize = rect_wh_h_maxsize self.hrect_proximity = hrect_proximity self.vrect_proximity = vrect_proximity self.vrect_others_proximity = vrect_others_proximity self.hrect_others_proximity = hrect_others_proximity
def __init__(self): self.performance_desc_string = "" self._info_manager = InfoManager() self._info_manager.tiny_update() self._last_filled_perf = None self.not_ok_perfdata = 0
def __init__(self): self.left_button = 1 self.right_button = 2 self.middle_button = 3 self.wheel_up = 4 self.wheel_down = 5 self._info_manager = InfoManager() self._log_manager = LogManager() self._scaling_factor = self._info_manager.get_info("SCALING FACTOR FLOAT")
def __init__(self, template_dict): self._info_manager = InfoManager() self.image_data = None self.threshold = 0.7 self.hist_red = None self.hist_green = None self.hist_blue = None self.match_colors = False self._set_template_dictionary(template_dict)
def __init__(self): self._config_reader = ConfigReader() self.__enable_log = self._config_reader.get_log_enable_value() self.__set_log_path() self._robot_manager = RobotManager() self._info_manager = InfoManager() self._info_manager.tiny_update() self._robot_context = self._info_manager.get_info("ROBOT CONTEXT")
def __init__(self): self._perf_manager = PerfManager() self._info_manager = InfoManager() self._db_home = os.path.split( sys.executable)[0] + os.sep + "share" + os.sep + "alyvix" self._db_name = "alyvix_data" if self._info_manager.get_info("ROBOT CONTEXT") is True: self._db_home = os.path.dirname( os.path.abspath(self._info_manager.get_info("SUITE SOURCE"))) self._db_name = self._info_manager.get_info("SUITE NAME") """ if self._info_manager.get_info("TEST CASE NAME") is not None: self._db_name = self._db_name + "_" + self._info_manager.get_info("TEST CASE NAME").replace(" ", "_") """ self._db_name = self._db_name + ".db" self._connection = None self._cursor = None self._db_is_new = False
def __init__(self, name=None): """ init the class :type name: string :param name: the object name """ self._main_component = None self._sub_components = [] self._timedout_main_components = [] self._timedout_sub_components = [] self._main_extra_img_log = None self._sub_extra_imgages_log = [] self._rect_extra_timedout_image = None self._robot_manager = RobotManager() self._rf_is_set = self._robot_manager.context_is_set() self._source_image_color = None self._source_image_gray = None self._objects_found = [] self._log_manager = None self._timed_out_images = [] self._find_thread_images = [] self._find_thread_images_disappear = [] #self._find_thread_images_copy = [] self._last_thread_image = None self._last_thread_image_copy = None self._heartbeat_images = [] self._heartbeat_images_copy = [] #variables for the perfdata self._cacheManager = None self._min_different_contours = 15 self._flag_thread_started = False self._flag_check_before_exit = False self._flag_checked_before_exit = False self._flag_thread_have_to_exit = False self._screen_capture = None #end perfdata section self._info_manager = InfoManager() self._scaling_factor = self._info_manager.get_info( "SCALING FACTOR INT") self._time_checked_before_exit_start = 0 self._objects_finders_caller = [] self._name_with_caller = None self._name = name self._log_manager = LogManager() self._log_manager.set_object_name(self._name) self._screen_capture = ScreenManager() self._cacheManager = CacheManager() self._configReader = ConfigReader() self.__enable_debug_calcperf = False #self._timer_for_disappear = 0 self._object_is_found_flag = False self._is_object_finder = False self._objects_found_of_sub_object_finder = []
# Alyvix allows you to automate and monitor all types of applications # Copyright (C) 2015 Alan Pipitone # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # Developer: Alan Pipitone (Violet Atom) - http://www.violetatom.com/ # Supporter: Wuerth Phoenix - http://www.wuerth-phoenix.com/ # Official website: http://www.alyvix.com/ from alyvix.tools.info import InfoManager #update all info info_manager = InfoManager() info_manager.update()