def sift(imageval):
file_bytes = np.asarray(bytearray(imageval), dtype=np.uint8)
img_data_ndarray = cv2.imdecode(file_bytes, cv2.CV_LOAD_IMAGE_UNCHANGED)
gray = cv2.cvtColor(img_data_ndarray, cv2.COLOR_BGR2GRAY)
#surf = cv2.SURF(400)
sift = cv2.SIFT(40)
kp, des = sift.detectAndCompute(gray,None)
#kp, des = surf.detectAndCompute(gray,None)
#print len(kp)
评论列表
文章目录