def match(query_feature, train_feature):
"""
calculate some match result between two images' feature data
parameter :
'query_feature' is one image's feature data
'train_feature' is another image's feature data
both like ( keypoints, descriptros, (height,width) )
keypoints is like [ pt1, pt2, pt3, ... ]
return value :
True of False
steps :
1. create a matcher
2. do match
"""
flann_params = dict(algorithm=1, trees=5)
matcher = cv2.FlannBasedMatcher(flann_params,{})
res=matchFeatures(query_feature, train_feature, matcher)
del flann_params
del matcher
return res
# function used to get current milli timestamp
评论列表
文章目录