Пример #1
0
 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
Пример #2
0
def display_image(image,
                  title="",
                  block=True,
                  display_label=False,
                  match_position=None):
    if display_label:
        assert match_position
        for key, point in match_position.items():
            label = Label("%s" % key, point)
            draw_on_image.draw_label(image, label)

    cv2.imshow(title, image)
    if block:
        block_display()
Пример #3
0
 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
Пример #4
0
 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