def _draw_tags(self, bitmap, font):
     bbox = self.geometry.to_bbox()
     texts = [tag.get_compact_str() for tag in self.tags]
     sly_image.draw_text_sequence(bitmap=bitmap,
                                  texts=texts,
                                  anchor_point=(bbox.top, bbox.left),
                                  corner_snap=sly_image.CornerAnchorMode.BOTTOM_LEFT,
                                  font=font)
Esempio n. 2
0
 def _draw_tags(self, bitmap):
     '''
     The function draws text labels on bitmap from left to right.
     :param bitmap: target image
     '''
     texts = [tag.get_compact_str() for tag in self.img_tags]
     sly_image.draw_text_sequence(bitmap,
                                  texts, (0, 0),
                                  sly_image.CornerAnchorMode.TOP_LEFT,
                                  font=self._get_font())
Esempio n. 3
0
 def _draw_tags(self, bitmap, font):
     '''
     The function _draw_tags text of the tags on bitmap from left to right.
     :param bitmap: target image (np.ndarray)
     :param font: size of the font
     '''
     bbox = self.geometry.to_bbox()
     texts = [tag.get_compact_str() for tag in self.tags]
     sly_image.draw_text_sequence(bitmap=bitmap,
                                  texts=texts,
                                  anchor_point=(bbox.top, bbox.left),
                                  corner_snap=sly_image.CornerAnchorMode.BOTTOM_LEFT,
                                  font=font)
Esempio n. 4
0
 def _draw_tags(self, bitmap):
     texts = [tag.get_compact_str() for tag in self.img_tags]
     sly_image.draw_text_sequence(bitmap,
                                  texts, (0, 0),
                                  sly_image.CornerAnchorMode.TOP_LEFT,
                                  font=self._get_font())