Ask Your Question
0

Can i use sift/ surf features in python for my project, if yes how?

asked 2019-07-12 00:14:14 -0600

updated 2019-07-12 00:57:31 -0600

berak gravatar image

I tried opencv-contrib , but it still not works. What i need to do to get the access of surf and sift features

i am getting error like this when i tried to use surf and sift featues

surf = cv2.SURF(400) AttributeError: module 'cv2.cv2' has no attribute 'SURF'

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2019-07-12 00:54:56 -0600

Before you begin use SURF or other features detect algorithms you must have installed opencv_contrib (https://github.com/opencv/opencv_contrib). And then you may go follow by https://docs.opencv.org/3.4/df/dd2/tu... . Good luck :)

edit flag offensive delete link more
0

answered 2019-07-12 00:57:48 -0600

berak gravatar image

you're probably staring at outdated code, it should be cv2.xfeatures2d.SURF_create() nowadays.

also note, that to use this, you have to build cv2 from src, and enable the non free SIFT & SURF code with cmake -DOPENCV_ENABLE_NNFREE=ON (you won't get this functionality using pip or other ppm's)

please also have a look at non-patented algorithms like ORB or AKAZE.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-07-12 00:14:14 -0600

Seen: 1,575 times

Last updated: Jul 12 '19