1 | initial version |
opencv's api is changing rapidly, and that tutorial might need an update.
you already have found c2.xfeatures2d.SURF_create()
, and it's similar with ORB,MSER,AKAZE, or GFTTDetector, there is a _create()
method for all of them, which gives you an instance:
>>> orb = cv2.ORB_create()
>>> help(orb)
...
| Methods inherited from Feature2D:
|
| compute(...)
| compute(image, keypoints[, descriptors]) -> keypoints, descriptors
|
| defaultNorm(...)
| defaultNorm() -> retval
|
| descriptorSize(...)
| descriptorSize() -> retval
|
| descriptorType(...)
| descriptorType() -> retval
|
| detect(...)
| detect(image[, mask]) -> keypoints
|
| detectAndCompute(...)
| detectAndCompute(image, mask[, descriptors[, useProvidedKeypoints]]) -> keypoints, descriptors
|
| empty(...)
| empty() -> retval
...
or SIFT:
>>> img = cv2.imread('simple.jpg',0)
>>> sift = cv2.xfeatures2d.SIFT_create()
>>> sift.detect(img)
2 | No.2 Revision |
opencv's api is changing rapidly, and that tutorial might need an update.
you already have found
, and it's similar with ORB,MSER,AKAZE, or GFTTDetector, there is a c2.xfeatures2d.SURF_create()cv2.xfeatures2d.SURF_create()_create()
method for all of them, which gives you an instance:
>>> orb = cv2.ORB_create()
>>> help(orb)
...
| Methods inherited from Feature2D:
|
| compute(...)
| compute(image, keypoints[, descriptors]) -> keypoints, descriptors
|
| defaultNorm(...)
| defaultNorm() -> retval
|
| descriptorSize(...)
| descriptorSize() -> retval
|
| descriptorType(...)
| descriptorType() -> retval
|
| detect(...)
| detect(image[, mask]) -> keypoints
|
| detectAndCompute(...)
| detectAndCompute(image, mask[, descriptors[, useProvidedKeypoints]]) -> keypoints, descriptors
|
| empty(...)
| empty() -> retval
...
or SIFT:
>>> img = cv2.imread('simple.jpg',0)
>>> sift = cv2.xfeatures2d.SIFT_create()
>>> sift.detect(img)