From ad7a6ec41fdd0dfa355f4f14502a03c56bfc8ef2 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Mon, 16 Jul 2012 12:31:56 +0000 Subject: [PATCH] correct unknown feature report in find_obj.py --- samples/python2/find_obj.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/python2/find_obj.py b/samples/python2/find_obj.py index 34357c233..1bbc93934 100644 --- a/samples/python2/find_obj.py +++ b/samples/python2/find_obj.py @@ -19,7 +19,6 @@ FLANN_INDEX_LSH = 6 def init_feature(name): - detector, matcher = None, None chunks = name.split('-') if chunks[0] == 'sift': detector = cv2.SIFT() @@ -30,6 +29,8 @@ def init_feature(name): elif chunks[0] == 'orb': detector = cv2.ORB(400) norm = cv2.NORM_HAMMING + else: + return None, None if 'flann' in chunks: if norm == cv2.NORM_L2: flann_params = dict(algorithm = FLANN_INDEX_KDTREE, trees = 5)