def add_target(self, name, image_regions_images):
        # The target count is just supposed to prevent target naming collisions,
        # not keep track of how many active targets there are
        target_name = "_internal_name:target" + str(self._target_count)
        self._target_count += 1

        target_pickler = TargetPickler()
        (region_object, regions) = target_pickler.load(name, self._canvas, self, target_name)

        return target_name
Exemple #2
0
    def add_target(self, name):
        # The target count is just supposed to prevent target naming collisions,
        # not keep track of how many active targets there are
        target_name = "_internal_name:target" + str(self._target_count)
        self._target_count += 1

        target_pickler = TargetPickler()
        (region_object, regions) = target_pickler.load(
            name, self._webcam_canvas, target_name)

        self._targets.append(target_name)
Exemple #3
0
    def __init__(self, parent, webcam_image, target=None, notifynewfunc=None):

        self._cursor_shape = None
        self._selected_region = None
        self._regions = []
        self.build_gui(parent, webcam_image)

        if target is not None:
            target_pickler = TargetPickler()
            (region_object, self._regions) = target_pickler.load(target, self._target_canvas)

        self._notify_new_target = notifynewfunc
Exemple #4
0
    def __init__(self, parent, webcam_image, target=None, notifynewfunc=None):

        self._cursor_shape = None
        self._selected_region = None
        self._regions = []
        self.build_gui(parent, webcam_image)

        if target is not None:
            target_pickler = TargetPickler()
            (region_object,
             self._regions) = target_pickler.load(target, self._target_canvas)

        self._notify_new_target = notifynewfunc
    def __init__(self, parent, webcam_image, target=None,
        notifynewfunc=None):

        self._cursor_shape = None
        self._selected_region = None
        self._regions = []
        self._freeform_vertices_points = []
        self._freeform_vertices_ids = []
        self._freeform_edges_ids = []
        self._freeform_temp_line_id = None
        self._image_regions_images = {}
        self.build_gui(parent, webcam_image)

        if target is not None:
            target_pickler = TargetPickler()
            (region_object, self._regions) = target_pickler.load(
                target, self._target_canvas, self._canvas_manager, 
                self._image_regions_images)

        self._notify_new_target = notifynewfunc