Exemple #1
0
def cleanNormalBatch():
    target = "original"
    for data_name in dataNames(target="original"):
        N_32F, A_8U = loadData(data_name, target)

        N_32F, A_8U = cleanNormal(N_32F, A_8U)
        saveData(data_name, N_32F, A_8U, target="normal")
def testToon(method_name, estimate_func):
    L_g = normalizeVector(np.array([-0.5, 0.7, 0.5]))

    for data_name in normal.dataNames():
        N_32F, A_8U = normal.loadData(data_name)
        C_32F = toondata.loadData(data_name, L_g)

        I_32F = luminance(C_32F[:, :, :3])
        estimateResultFunc(data_name, "Toon", N_32F, L_g, I_32F, A_8U, method_name, estimate_func)
def testDiffuse(method_name, estimate_func):
    L_g = normalizeVector(np.array([-0.5, 0.7, 0.5]))
    for data_name in normal.dataNames():
        N_32F, A_8U = normal.loadData(data_name)
        I_32F, A_8U = diffuse.loadData(data_name, L_g)
        estimateResultFunc(data_name, "Lambert", N_32F, L_g, I_32F, A_8U, method_name, estimate_func)