def dictionary(descriptors, N):
em = cv2.EM(N)
em.train(descriptors)
pdb.set_trace()
return np.float32(em.getMat("means")), \
np.float32(em.getMatVector("covs")), np.float32(em.getMat("weights"))[0]
#def image_descriptors(file):
# img = cv2.imread(file, 0)
# img = cv2.resize(img, (256, 256))
# _ , descriptors = cv2.SIFT().detectAndCompute(img, None)
# return descriptors
compute_fv_ucf.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录