def addtext(text, x_offset=0, y_offset=0, **kwargs): fontsize = 8 util.add_text(self.xy['x'] + x_offset, self.xy['y'] + y_offset, text, size=fontsize, **kwargs)
def add_layer_name(self): """Adds the layers name to plot.""" # txt, x1, y1, x2, y2 = util.add_text(self.xy['x'], self.txt_height, self.name, va='top', ha='left')#, rotation=90 txt, x1, y1, x2, y2 = util.add_text(self.xy['x'], self.txt_height, self.name, va='top', ha='right', rotation=45, size=18) return (txt, x1, y1, x2, y2)
def write_mode(self, frame): txt = Tracker.MODE_NAMES[self._mode] util.add_text(frame, txt, (20, 30), 100) return frame
def label_points(self, viz_frame): for name, point in self._working_set.items(): screen_point = tuple(map(int, point.tolist()[0])) util.add_text(viz_frame, name, screen_point) return viz_frame