def plot_matches(im1, im2, locs1, locs2, matchscores, show_below=True):
 im3 = appendimages(im1, im2)
 if show_below:
  im3 = vstack((im3, im3))
 imshow(im3)
 cols1 = im1.shape[1]
 for (i, m) in enumerate(matchscores):
  if (m > 0):
   plot([locs1[i][0], (locs2[m][0] + cols1)], [locs1[i][1], locs2[m][1]], 'c')
 axis('off')

def plot_matches ( im1 , im2 , locs1 , locs2 , matchscores , show_below = True ) : im3 = appendimages ( im1 , im2 ) if show_below : im3 = vstack ( ( im3 , im3 ) ) imshow ( im3 ) cols1 = im1 . shape [ 1 ] for ( i , m ) in enumerate ( matchscores ) : if ( m > 0 ) : plot ( [ locs1 [ i ] [ 0 ] , ( locs2 [ m ] [ 0 ] + cols1 ) ] , [ locs1 [ i ] [ 1 ] , locs2 [ m ] [ 1 ] ] , 'c' ) axis ( 'off' )
show a figure with lines joining the accepted matches input: im1 .