(sift_keys1, sift_keys2, feature_matches, type='f')
return np.array(image_matches, dtype=np.float32)
Get inlier matches in image coordinates.
    
    Arguments:
        sift_keys1 {list of keys (x, y, color, scale, orientation)} -- first sift keys 
        sift_keys2 {list of keys} -- second sift keys
        feature_matches {(first, second, flag)} -- sift key index pairs and flags
    
    Keyword Arguments:
        type {str} -- inlier type ('f' for fudamental matrix and 'h' for homography) (default: {'f'})
    
    Returns:
        list -- list of (x1, y1, x2, y2)
Get inlier matches in image coordinates.
    
    Arguments:
        sift_keys1 {list of keys (x, y, color, scale, orientation)} -- first sift keys 
        sift_keys2 {list of keys} -- second sift keys
        feature_matches {(first, second, flag)} -- sift key index pairs and flags
    
    Keyword Arguments:
        type {str} -- inlier type ('f' for fudamental matrix and 'h' for homography) (default: {'f'})
    
    Returns:
        list -- list of (x1, y1, x2, y2)
Get inlier matches in image coordinates . Arguments : sift_keys1 { list of keys ( x y color scale orientation ) } -- first sift keys sift_keys2 { list of keys } -- second sift keys feature_matches { ( first second flag ) } -- sift key index pairs and flags Keyword Arguments : type { str } -- inlier type ( f for fudamental matrix and h for homography ) ( default : { f } ) Returns : list -- list of ( x1 y1 x2 y2 )
def get_inlier_image_coords(sift_keys1, sift_keys2, feature_matches, type='f'):
    """Get inlier matches in image coordinates.
    
    Arguments:
        sift_keys1 {list of keys (x, y, color, scale, orientation)} -- first sift keys 
        sift_keys2 {list of keys} -- second sift keys
        feature_matches {(first, second, flag)} -- sift key index pairs and flags
    
    Keyword Arguments:
        type {str} -- inlier type ('f' for fudamental matrix and 'h' for homography) (default: {'f'})
    
    Returns:
        list -- list of (x1, y1, x2, y2)
    """

    image_matches = []
    if type == 'f':
        inlier_type = 2
    elif type == 'h':
        inlier_type = 1
    else:
        print('Unknown inlier type, should be "f" or "h"')
        exit(-1)

    for i in range(feature_matches.shape[0]):
        if (feature_matches[i, 2] == inlier_type or feature_matches[i, 2] == 3):
            index1 = feature_matches[i, 0]
            index2 = feature_matches[i, 1]
            image_matches.append([sift_keys1[index1][0], sift_keys1[index1]
                                  [1], sift_keys2[index2][0], sift_keys2[index2][1]])
    return np.array(image_matches, dtype=np.float32)
def get_inlier_image_coords ( sift_keys1 , sift_keys2 , feature_matches , type = 'f' ) : image_matches = [ ] if type == 'f' : inlier_type = 2 elif type == 'h' : inlier_type = 1 else : print ( 'Unknown inlier type, should be "f" or "h"' ) exit ( - 1 ) for i in range ( feature_matches . shape [ 0 ] ) : if ( feature_matches [ i , 2 ] == inlier_type or feature_matches [ i , 2 ] == 3 ) : index1 = feature_matches [ i , 0 ] index2 = feature_matches [ i , 1 ] image_matches . append ( [ sift_keys1 [ index1 ] [ 0 ] , sift_keys1 [ index1 ] [ 1 ] , sift_keys2 [ index2 ] [ 0 ] , sift_keys2 [ index2 ] [ 1 ] ] ) return np . array ( image_matches , dtype = np . float32 )