In python, OpenCV's FlannBasedMatcher
constructor takes a dictionary of parametres, the first of which is algorithm
. The python tutorial suggests that one can specify different values of algorithm
by passing differently named variables, e.g. FLANN_INDEX_KDTREE
and FLANN_INDEX_LSH
, but the variable name cannot, of course, convey anything to the constructor. One might think that these names should instead be passed as strings, but in the example that follows, FLANN_INDEX_KDTREE
is initialised as 0, and so it is entirely unclear how the algorithm
parametre works.
OpenCV doesn't really have any python documentation. In C++, the constructor doesn't take a generic dictionary, but an object that instantiates IndexClass
, where each subclass of IndexClass
corresponds to a different algorithm.