From 4b19fda1d6d7b1d7a888188d42165c3077b10216 Mon Sep 17 00:00:00 2001 From: John Stowers Date: Tue, 10 Sep 2013 13:36:57 +0200 Subject: [PATCH] Add brisk features to python demos --- samples/python2/asift.py | 6 +++--- samples/python2/find_obj.py | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/samples/python2/asift.py b/samples/python2/asift.py index ae044d527b..e522fa7ab4 100755 --- a/samples/python2/asift.py +++ b/samples/python2/asift.py @@ -11,10 +11,10 @@ is used to reject outliers. Threading is used for faster affine sampling. [1] http://www.ipol.im/pub/algo/my_affine_sift/ USAGE - asift.py [--feature=[-flann]] [ ] + asift.py [--feature=[-flann]] [ ] - --feature - Feature to use. Can be sift, surf of orb. Append '-flann' to feature name - to use Flann-based matcher instead bruteforce. + --feature - Feature to use. Can be sift, surf, orb or brisk. Append '-flann' + to feature name to use Flann-based matcher instead bruteforce. Press left mouse button on a feature point to see its mathcing point. ''' diff --git a/samples/python2/find_obj.py b/samples/python2/find_obj.py index 908da68feb..ca4ee4daff 100755 --- a/samples/python2/find_obj.py +++ b/samples/python2/find_obj.py @@ -4,10 +4,10 @@ Feature-based image matching sample. USAGE - find_obj.py [--feature=[-flann]] [ ] + find_obj.py [--feature=[-flann]] [ ] - --feature - Feature to use. Can be sift, surf of orb. Append '-flann' to feature name - to use Flann-based matcher instead bruteforce. + --feature - Feature to use. Can be sift, surf, orb or brisk. Append '-flann' + to feature name to use Flann-based matcher instead bruteforce. Press left mouse button on a feature point to see its matching point. ''' @@ -31,6 +31,9 @@ def init_feature(name): elif chunks[0] == 'orb': detector = cv2.ORB(400) norm = cv2.NORM_HAMMING + elif chunks[0] == 'brisk': + detector = cv2.BRISK() + norm = cv2.NORM_HAMMING else: return None, None if 'flann' in chunks: