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)
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)
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)