fpdir[X_data_idx[i, 0]][X_data_idx[i, 1]] = prediction[i] fpdir_porg[X_data_idx[i, 0]][X_data_idx[i, 1]] = prob_list[i] fpdir_prob[X_data_idx[i, 0]][X_data_idx[i, 1]] = sum( weightTBL[prediction[i]] * prob_arr[i]) #if i < 3: # print(i, prediction[i], prob_list[i], sum(weightTBL[prediction[i]]*prob_arr[i])) # for j in range(180): # print('{:2d} {:.3f} {:.3f}'.format(j, weightTBL[prediction[i],j], prob_arr[i,j])) # print(weightTBL[prediction[i],prediction[i]-10:prediction[i]+10], prob_list[i][prediction[i]-10:prediction[i]+10]) # # 7. write line seg. on fingerprint # print("7. write line seg. on fingerprint...") fmdir = MyL.UT_SetLine2(plt, fpfg, fpdir, fm.shape, False, 'black', 3) plt.title(sys.argv[2][-11:]) plt.imshow(fmdir, cmap=plt.cm.gray) ImgPath = 'D:\\Fingerprint\\paper8_NN\\P8NN_Images\\' + sys.argv[ 1] + '_' + sys.argv[2][-11:-4] + "_2.png" plt.savefig(ImgPath, dpi=600, bbox_inches='tight') if ShowAll: plt.show() # # 8. write line seg. # print("8. write line seg. ...") axs = [[None for _ in range(NoWidth)]] * NoWidth MyL.UT_SetLine(plt, fpfg, fpdir, fm, axs, False, 'white', 3) plt.title(sys.argv[2][-11:])