Пример #1
0
def get_sift_match(f1, f2):
	fn1, fext1 = os.path.splitext(os.path.basename(f1))
	fn2, fext2 = os.path.splitext(os.path.basename(f2))
	try:
		l1, d1 = sift.read_features_from_file(TMP_DIR + fn1 + '.key')
		l2, d2 = sift.read_features_from_file(TMP_DIR + fn2 + '.key')
		
		return sift.score(d1, d2)
	except:
		return 0.0
Пример #2
0
from numpy import *
import sift
import sys

fn1 = sys.argv[1]
fn2 = sys.argv[2]

l1, d1 = sift.read_features_from_file(fn1)
l2, d2 = sift.read_features_from_file(fn2)

print sift.score(d1, d2)