예제 #1
0
def show_match_results(rchip1,
                       rchip2,
                       kpts1,
                       kpts2,
                       fm,
                       fs,
                       fm_V,
                       fs_V,
                       fignum=0,
                       big_title=''):
    num_m = len(fm)
    num_mV = len(fm_V)
    score = fs.sum()
    scoreV = fs_V.sum()

    _title1 = 'num_m  = %r' % num_m
    _title2 = 'num_mV = %r' % num_mV
    _title3 = 'len(kpts1) = %r' % len(kpts1)
    _title4 = 'len(kpts2) = %r' % len(kpts2)
    # TODO: MAKE THESE SUBPLOTS
    df2.show_matches2(rchip1, rchip2, kpts1, kpts2, fm, fs, fignum + 0, 111,
                      _title1)
    df2.show_matches2(rchip1, rchip2, kpts1, kpts2, fm_V, fs_V, fignum + 1,
                      111, _title2)
    df2.show_keypoints(rchip1, kpts1, fignum + 2, _title3)
    df2.show_keypoints(rchip2, kpts2, fignum + 3, _title4)
예제 #2
0
def show_match_results(rchip1, rchip2, kpts1, kpts2, fm, fs, fm_V, fs_V, fignum=0, big_title=''):
    num_m = len(fm)
    num_mV = len(fm_V)
    score = fs.sum()
    scoreV = fs_V.sum()

    _title1 = 'num_m  = %r' % num_m
    _title2 = 'num_mV = %r' % num_mV
    _title3 = 'len(kpts1) = %r' % len(kpts1)
    _title4 = 'len(kpts2) = %r' % len(kpts2)
    # TODO: MAKE THESE SUBPLOTS
    df2.show_matches2(rchip1, rchip2, kpts1, kpts2, fm, fs, fignum+0, 111, _title1)
    df2.show_matches2(rchip1, rchip2, kpts1, kpts2, fm_V, fs_V, fignum+1, 111, _title2)
    df2.show_keypoints(rchip1, kpts1, fignum+2, _title3)
    df2.show_keypoints(rchip2, kpts2, fignum+3, _title4)
예제 #3
0
desc2 = cx2_desc[cx]
kpts1 = cx2_kpts[qcx]
kpts2 = cx2_kpts[cx]
rchip1 = cv2.imread(cx2_rchip_path[qcx])
rchip2 = cv2.imread(cx2_rchip_path[cx])
print('---------------------------------------')
print(' * Inspecting match to: cx = %d' % cx)
print('Drawing chips we are inspecting')
print('  * rchip1.shape = %r ' % (rchip1.shape, ))
print('  * rchip2.shape = %r ' % (rchip2.shape, ))
if __SHOW_PLAIN_CHIPS__:
    df2.imshow(rchip1, fignum=9001, title='querychip qcx=%d' % qcx)
    df2.imshow(rchip2, fignum=9002, title='reschip  cx=%d' % cx)
if __SHOW_KPTS_CHIPS__:
    df2.show_keypoints(rchip1,
                       kpts1,
                       fignum=902,
                       title='qcx=%d nkpts=%d' % (qcx, len(kpts1)))
    df2.show_keypoints(rchip2,
                       kpts2,
                       fignum=903,
                       title='cx=%d nkpts=%d' % (cx, len(kpts1)))

# ASSIGNED MATCHES
print('---------------------------------------')
print(' INFO: Assigned feature matches        ')
fm = cx2_fm[cx]
fs = cx2_fs[cx]
print(' * feature matches (assigned) fm.shape = %r' % (fm.shape, ))
print(' * kpts1.shape %r' % (kpts1.shape, ))
print(' * kpts2.shape %r' % (kpts2.shape, ))
print('---------------------------------------')
예제 #4
0
desc1  = cx2_desc[qcx]
desc2  = cx2_desc[cx]
kpts1  = cx2_kpts[qcx]
kpts2  = cx2_kpts[cx]
rchip1 = cv2.imread(cx2_rchip_path[qcx])
rchip2 = cv2.imread(cx2_rchip_path[cx])
print('---------------------------------------')
print(' * Inspecting match to: cx = %d' % cx)
print('Drawing chips we are inspecting')
print('  * rchip1.shape = %r ' % (rchip1.shape,)) 
print('  * rchip2.shape = %r ' % (rchip2.shape,)) 
if __SHOW_PLAIN_CHIPS__:
    df2.imshow(rchip1, fignum=9001, title='querychip qcx=%d' % qcx)
    df2.imshow(rchip2, fignum=9002, title='reschip  cx=%d' %  cx)
if __SHOW_KPTS_CHIPS__:
    df2.show_keypoints(rchip1, kpts1, fignum=902, title='qcx=%d nkpts=%d' % (qcx,len(kpts1)))
    df2.show_keypoints(rchip2, kpts2, fignum=903, title='cx=%d nkpts=%d' % (cx,len(kpts1)))



# ASSIGNED MATCHES
print('---------------------------------------')
print(' INFO: Assigned feature matches        ')
fm      = cx2_fm[cx]
fs      = cx2_fs[cx]
print(' * feature matches (assigned) fm.shape = %r' % (fm.shape,))
print(' * kpts1.shape %r' % (kpts1.shape,))
print(' * kpts2.shape %r' % (kpts2.shape,))
print('---------------------------------------')
if __SHOW_ASSIGNED_FEATURE_MATCHES__:
    print('Drawing the assigned matches')