コード例 #1
0
ファイル: lumo.py プロジェクト: theomission/NPR-SFS
def batch_func(data_name):
    A_8U = loadData(data_name)
    N0_32F, N_32F = estimateNormal(A_8U)

    result_dir = resultDir(batch_name)
    N_file = resultFile(result_dir, data_name)
    saveNormal(N_file, N_32F, A_8U)
コード例 #2
0
ファイル: compare.py プロジェクト: tody411/NPR-SFS
def batch_func(data_name):
    method_names = methodNames()
    NO_32F = loadData(data_name, loader_func=loadRGBA)

    fig = plt.figure(figsize=(10, 4))
    fig.subplots_adjust(left=0.05, bottom=0.05, right=0.95, top=0.9, wspace=0.05, hspace=0.1)

    font_size = 15
    fig.suptitle("NPR-SFS", fontsize=font_size)

    num_cols = len(method_names) + 1
    fig.add_subplot(1, num_cols, 1)
    plt.title("Ground truth", fontsize=font_size)
    plt.imshow(NO_32F)
    plt.axis('off')

    col_id = 2

    for method_name in method_names:
        method_file = methodFile(method_name, data_name)
        N_32F = loadRGBA(method_file)

        fig.add_subplot(1, num_cols, col_id)
        plt.title(method_name, fontsize=font_size)
        plt.imshow(N_32F)
        plt.axis('off')
        col_id += 1

    result_dir = resultDir(batch_name)
    result_file = resultFile(result_dir, data_name)
    plt.savefig(result_file)
コード例 #3
0
ファイル: ibme.py プロジェクト: tody411/NPR-SFS
def batch_func(data_name):
    C_8U = loadData(data_name, loader_func=loadRGBA)
    A_8U = alpha(C_8U)
    I_32F = luminance(C_8U)
    N_32F, D_32F = estimateNormal(I_32F)

    result_dir = resultDir(batch_name)
    N_file = resultFile(result_dir, data_name)
    saveNormal(N_file, N_32F, A_8U)
コード例 #4
0
ファイル: ibme.py プロジェクト: theomission/NPR-SFS
def batch_func(data_name):
    C_8U = loadData(data_name, loader_func=loadRGBA)
    A_8U = alpha(C_8U)
    I_32F = luminance(C_8U)
    N_32F, D_32F = estimateNormal(I_32F)

    result_dir = resultDir(batch_name)
    N_file = resultFile(result_dir, data_name)
    saveNormal(N_file, N_32F, A_8U)
コード例 #5
0
ファイル: compare.py プロジェクト: theomission/NPR-SFS
def batch_func(data_name):
    method_names = methodNames()
    NO_32F = loadData(data_name, loader_func=loadRGBA)

    fig = plt.figure(figsize=(10, 4))
    fig.subplots_adjust(left=0.05,
                        bottom=0.05,
                        right=0.95,
                        top=0.9,
                        wspace=0.05,
                        hspace=0.1)

    font_size = 15
    fig.suptitle("NPR-SFS", fontsize=font_size)

    num_cols = len(method_names) + 1
    fig.add_subplot(1, num_cols, 1)
    plt.title("Ground truth", fontsize=font_size)
    plt.imshow(NO_32F)
    plt.axis('off')

    col_id = 2

    for method_name in method_names:
        method_file = methodFile(method_name, data_name)
        N_32F = loadRGBA(method_file)

        fig.add_subplot(1, num_cols, col_id)
        plt.title(method_name, fontsize=font_size)
        plt.imshow(N_32F)
        plt.axis('off')
        col_id += 1

    result_dir = resultDir(batch_name)
    result_file = resultFile(result_dir, data_name)
    plt.savefig(result_file)