fixes for latest changes in opencv3.0 api

fixes for latest changes in opencv3.0 api

waitKey() normalization

fixed mser bindings
This commit is contained in:
berak
2015-01-01 10:30:44 +01:00
parent fd2d800c06
commit fd60e98c5b
15 changed files with 29 additions and 28 deletions

View File

@@ -3,6 +3,8 @@
'''
Feature-based image matching sample.
Note, that you will need the https://github.com/Itseez/opencv_contrib repo for SIFT and SURF
USAGE
find_obj.py [--feature=<sift|surf|orb|akaze|brisk>[-flann]] [ <image1> <image2> ]
@@ -23,19 +25,19 @@ FLANN_INDEX_LSH = 6
def init_feature(name):
chunks = name.split('-')
if chunks[0] == 'sift':
detector = cv2.xfeatures2d.SIFT()
detector = cv2.xfeatures2d.SIFT_create()
norm = cv2.NORM_L2
elif chunks[0] == 'surf':
detector = cv2.xfeatures2d.SURF(800)
detector = cv2.xfeatures2d.SURF_create(800)
norm = cv2.NORM_L2
elif chunks[0] == 'orb':
detector = cv2.ORB(400)
detector = cv2.ORB_create(400)
norm = cv2.NORM_HAMMING
elif chunks[0] == 'akaze':
detector = cv2.AKAZE()
detector = cv2.AKAZE_create()
norm = cv2.NORM_HAMMING
elif chunks[0] == 'brisk':
detector = cv2.BRISK()
detector = cv2.BRISK_create()
norm = cv2.NORM_HAMMING
else:
return None, None