def get_image_points(self, **kwargs): image = self.image_segment_parse.get_colored_original_image() offset = self.image_segment_parse.diagram_image_segment.offset for key, point in self.intersection_points.iteritems(): label = Label("%d" % key, point) draw_label(image, label, offset=offset, **kwargs) draw_point(image, point, offset=offset, **kwargs) return image
def display_pixels(self, block=True): image = cv2.cvtColor(self.segmented_image, cv2.COLOR_GRAY2BGR) for pixel in self.pixels: draw_point(image, pixel) display_image(image, block=block)
def get_labeled_image(self, **kwargs): image = cv2.cvtColor(self.image, cv2.COLOR_GRAY2BGR) for label in self.labels.values(): draw_label(image, label, **kwargs) draw_point(image, label.position) return image