def normalToIsophoteFile(normal_file, scene_file, L1=np.array([-0.5, 0.5, 0.2]), L2=np.array([0.5, 0.5, 0.2])):
    N_32F, A_8U = loadNormal(normal_file)

    silhoutte_curve, S_8U = silhoutteCurve(A_8U)
    silhoutte_curve.setNormalImage(N_32F)

    I1_32F, isophotes1 = computeIsophoteCurves(N_32F, L1, S_8U)
    I2_32F, isophotes2 = computeIsophoteCurves(N_32F, L2, S_8U)

    isophote_curves = []
    isophote_curves.extend(isophotes1)
    isophote_curves.extend(isophotes2)
    isophote_mesh = IsophoteMesh(silhoutte_curve, isophote_curves)

    scene = Scene(isophote_mesh, normal_file)
    saveSceneData(scene_file, scene)
Beispiel #2
0
def saveData(data_name, data):
    data_file = dataFile(data_name)
    saveSceneData(data_file, data)