more verbose similarity
This commit is contained in:
@@ -349,12 +349,15 @@ def find_fingerprint_nearest(sqlfile,cmp):
|
||||
for hit1 in db1:
|
||||
fp=int(hit1[1])
|
||||
sp=hit1[2]
|
||||
dims=hit1[3,4]
|
||||
else:
|
||||
fp=int(get_fingerprint(cmp))
|
||||
sp=get_sharpness(cmp)
|
||||
print('"%s":0:%f' % (cmp, sp))
|
||||
dims=get_dims(cmp)
|
||||
print('"File":"ID":"Sharpness":"Width":"Height"')
|
||||
print('"%s":0:%f:%d:%d' % (cmp, sp,dims[0],dims[1]))
|
||||
db1.execute("SELECT file,fingerprint,sharpness,width,height FROM list ORDER BY file")
|
||||
this=['',sys.maxint,0]
|
||||
this=['',sys.maxint,0,0,0]
|
||||
for i,hit1 in enumerate(db1):
|
||||
if hit1[0] == cmp:
|
||||
continue
|
||||
@@ -363,8 +366,10 @@ def find_fingerprint_nearest(sqlfile,cmp):
|
||||
this[1]=similarity
|
||||
this[0]=hit1[0]
|
||||
this[2]=hit1[2]
|
||||
this[3]=hit1[3]
|
||||
this[4]=hit1[4]
|
||||
|
||||
print('"%s":%i:%f' % (this[0], this[1], this[2]))
|
||||
print('"%s":%i:%f:%d:%d' % (this[0], this[1], this[2],this[3], this[4]))
|
||||
|
||||
def append_sharpness(sqlfile):
|
||||
conn=sqlite3.connect(sqlfile)
|
||||
|
||||
Reference in New Issue
Block a user