Exemplo n.º 1
0
def get_file_descs(fn):
    #print 'computing descriptors for %s' % fn
    f = path.join('descs', path.basename(fn) + '.npy')
    if path.exists(f):
        descs = np.load(f)
    else:
        frames = util.vidread(fn)
        pts = video.get_interest_points(frames)
        descs = video.compute_descriptors(frames, pts)
        np.save(f, descs)

    return descs