在openCV 3.1.0中,当我给cv2.flann_Index时,它说cv2没有名为flann_index的属性。这个功能在opencv 3中有变化吗?我正在使用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))