sigma_list = [2, 5, 10, 20, 30, 40, 60, 80, 100] for sigma in sigma_list: sigma_str = 'sigma_' + str(sigma) + '_' psnr1st, psnr2nd = get_standard_result(im_name, sigma) standard_list.append(psnr2nd) name = find_filename_in_dir( search_dir, include_str_list=[im_str, sigma_str, 'BM-noisy']) psnr = decode_res(name)['PSNR'] bm_noisy_2nd_list.append(psnr) x_list = sigma_list y_list = standard_list k_ = ['name', 'x', 'y', 'color', 'linestyle'] v_ = ['standard', x_list, y_list, 'green', '--'] line_dict_1 = dict(zip(k_, v_)) x_list = sigma_list y_list = bm_noisy_2nd_list v_ = ['2nd_use_noisy_BM', x_list, y_list, 'red', '--'] line_dict_2 = dict(zip(k_, v_)) plt = plot_dict_res(line_dict_1, line_dict_2, x_lable='sigma', y_label='PSNR', im_label=im_name) plt.savefig(os.path.join(save_dir, im_name[:-4] + '.png')) plt.close()
k_ = ['name', 'x', 'y', 'color', 'linestyle'] x_list = sigma_list y_list = auc_list_noisy v_ = ['auc_noisy', x_list, y_list, 'black', '--'] line_dict = dict(zip(k_, v_)) x_list = sigma_list y_list = auc_list_nlm v_ = ['auc_nlm', x_list, y_list, 'gold', '--'] line_dict_2 = dict(zip(k_, v_)) x_list = sigma_list y_list = auc_list_tv v_ = ['auc_tv', x_list, y_list, 'red', '--'] line_dict_3 = dict(zip(k_, v_)) x_list = sigma_list y_list = auc_list_Wavelet v_ = ['auc_noisy', x_list, y_list, 'blue', '--'] line_dict_4 = dict(zip(k_, v_)) pltt = plot_dict_res(line_dict, line_dict_2, line_dict_3, line_dict_4, im_label='AUC_' + im_name, x_lable='sigma', y_label='AUC') plt.savefig(os.path.join('AUC_result', im_name)) plt.close()