Ejemplo n.º 1
0
    def _setDataDict(self, data):
        self._silhouette_curve._setDataDict(data["silhoutte"])

        self._isophote_curves = []
        for isophoteCurveDict in data["isophotes"]:
            isophoteCurve = IsophoteCurve()
            isophoteCurve._setDataDict(isophoteCurveDict)
            self._isophote_curves.append(isophoteCurve)
Ejemplo n.º 2
0
def isophoteCurve(I_8U, iso_value, M_8U):
    contour = findContours(I_8U, 255 * iso_value)
    print contour.segments()

    contour.clipByMask(M_8U)
    contour.resample(span=5)
    contour = smoothing_contour(contour)

    isophoteCurve = IsophoteCurve()
    isophoteCurve.setContour(contour)
    isophoteCurve.setIsoValue(iso_value)
    isophoteCurve.setSilhouetteMask(M_8U)
    return isophoteCurve