指静脉代码学习---12.类内类间距离直方图

一、论文

二、代码

1.代码一

#绘制第几组样本的类内类间距离直方图
def cal_scores(method='FLANN', flag=1):
    scores_list_diff = []
    scores_list_same = []
    #类间比较
    for k in range(1,5):
        if k is not flag:
            for i in range(1,11):
                for j in range(1,11):
                    #print('%s', )
                    strs1 = './data/roi_600_2_all_320240/600-{}-{}-1.bmp'.format(flag,i)
                    strs2 = './data/roi_600_2_all_320240/600-{}-{}-1.bmp'.format(k,j)
                    if method == 'FLANN':
                        scores = FLANN_based_Matcher(strs1, strs2)
                        scores_list_diff.append(scores)
                    if method == 'BIN':
                        scores = bin_match(strs1, strs2)
                        scores_list_diff.append(scores)
                    print(strs1,strs2, scores)

   

你可能感兴趣的:(指静脉识别,学习,python,numpy)