This commit is contained in:
q
2014-05-22 07:15:06 +03:00
parent cf756063c3
commit b170a709da

View File

@@ -355,7 +355,7 @@ def find_fingerprint_nearest(sqlfile,cmp):
sp=get_sharpness(cmp) sp=get_sharpness(cmp)
dims=get_dims(cmp) dims=get_dims(cmp)
print('"File":"ID":"Sharpness":"Width":"Height"') print('"File":"ID":"Sharpness":"Width":"Height"')
print('"%s":0:%f:%d:%d' % (cmp, sp,dims[0],dims[1])) print('"%s":0:%f:%d:%d' % (cmp, sp,int(dims[0]),int(dims[1])))
db1.execute("SELECT file,fingerprint,sharpness,width,height FROM list ORDER BY file") db1.execute("SELECT file,fingerprint,sharpness,width,height FROM list ORDER BY file")
this=['',sys.maxint,0,0,0] this=['',sys.maxint,0,0,0]
for i,hit1 in enumerate(db1): for i,hit1 in enumerate(db1):
@@ -366,8 +366,8 @@ def find_fingerprint_nearest(sqlfile,cmp):
this[1]=similarity this[1]=similarity
this[0]=hit1[0] this[0]=hit1[0]
this[2]=hit1[2] this[2]=hit1[2]
this[3]=hit1[3] this[3]=int(hit1[3])
this[4]=hit1[4] this[4]=int(hit1[4])
print('"%s":%i:%f:%d:%d' % (this[0], this[1], this[2],this[3], this[4])) print('"%s":%i:%f:%d:%d' % (this[0], this[1], this[2],this[3], this[4]))