OpenCV2-Python-Tutorials icon indicating copy to clipboard operation
OpenCV2-Python-Tutorials copied to clipboard

Wrong value for 'FLANN_INDEX_KDTREE' in 'FLANN based Matcher'

Open Mi-Dora opened this issue 5 years ago • 0 comments

The issue is about this code block:

# FLANN parameters
FLANN_INDEX_KDTREE = 0
index_params = dict(algorithm = FLANN_INDEX_KDTREE, trees = 5)
search_params = dict(checks=50)   # or pass empty dictionary

flann = cv2.FlannBasedMatcher(index_params,search_params)

Picture below is shown in Lawe's FLANN User Manual. The FLANN_INDEX_KDTREE should be set to 1 (kdtree), not 0(linear). flann_manual-1.8.4.pdf

kdtreeIndex

Here is using FLANN_INDEX_KDTREE = 1 kdtree

And, here is using FLANN_INDEX_KDTREE = 0 linear

Mi-Dora avatar Mar 01 '20 06:03 Mi-Dora