Exemplo n.º 1
0
    def __init__(self, img, geo):  # img, c):
        """

        :param img: masked image revealing all the regions that are silhouette candidates
        :param geo: list of the first three Geometry objects [POLY, CONTOUR, HULL] (complex ones)
                Stored in increasing order of areas
                 - POLY: a lower handle_init_input-lines approximation (not tight enough)
                 - CONTOUR: curve joining all the continuous points--along the boundary--
                 having the same color/intensity
                 - HULL: convex hull points
                onion_geometry supplements geo param by adding the tilted and bounding boxes
                ORDER IS ESSENTIAL in the onion_geometry
        """
        AlgoClass.__init__(self)

        self.masked_img = img
        self.onion_geometry = Geometry.append_bounding_boxes(geo)
        self.shape_like = self.geo_area_ratio_similarity()
        Silhouette.log_all_geometries = self.masked_img