在opencv3.1.0中,当我给出cv2.flann_索引时,它说cv2没有名为flann_Index的属性。这个功能在opencv3中有改变吗?我正在使用python3并在网上查找文档,但它们都是死胡同。 代码:
class Codebook(object):
def __init__(self, hdffile):
clusterf = tables.open_file(hdffile)
self._clusters = np.array(clusterf.get_node('/clusters'))
clusterf.close()
self._clusterids = np.array(range(0, self._clusters.shape[0]), dtype=np.int)
self.n_clusters = self._clusters.shape[0]
self._flann = cv2.flann_Index(self._clusters,
dict(algorithm=FLANN_INDEX_COMPOSITE,
distance=FLANN_DIST_L2,
iterations=10,
branching=16,
trees=50))
目前没有回答
相关问题 更多 >
编程相关推荐