def __init__(self, lmk_group, alt_of=None): shapes = [lmk.representation.get_geometry() for lmk in lmk_group] super(GroupRectangleRepresentation, self).__init__(rect=BoundingBox.from_shapes(shapes), landmarks_to_get=['middle'], alt_of=alt_of) self.alt_representations = [] self.landmark_group = lmk_group
def get_bounding_box(self): return BoundingBox.from_shapes([lmk.representation.get_geometry() for lmk in self.landmarks.values()])
def get_bounding_box(self): return BoundingBox.from_shapes([ lmk.representation.get_geometry() for lmk in self.landmarks.values() ])
def bounding_box(self) -> BoundingBox: return BoundingBox.from_shapes(segment.region for segment in self.segments)