Ask Your Question
-1

why I can’t use sift/surf

asked 2017-11-27 19:58:03 -0500

there aren't both sift and surf thereAnd I can't use themHow could I do.I used anaconda configure python environment.

edit retag flag offensive close merge delete

Comments

2

please remove the useless screenshots, and replace them with TEXT

berak gravatar imageberak ( 2017-11-27 20:48:37 -0500 )edit

SIFT/SURF has been removed OpenCV 3.0.0 or later .

supra56 gravatar imagesupra56 ( 2017-12-01 07:08:03 -0500 )edit
1

^^ ... has been moved to opencv_contrib ...

berak gravatar imageberak ( 2017-12-01 07:14:48 -0500 )edit

2 answers

Sort by » oldest newest most voted
2

answered 2017-11-29 07:01:07 -0500

arigarcia gravatar image

Follow the steps (for windows):

1) you need ensure that xfeatures2d is a valid opencv module (on building), see: https://wiki.qt.io/Show_library_depen...;

2) you need ensure that PYTHONPATH is setted for cv2.dll or cv2.so directory;

> echo %PYTHONPATH%

or see https://www.computerhope.com/issues/c....

In my case, cv2.dll is in C:\libs:

> set PYTHONPATH=C:\libs
> python
Python 2.7.10 (default, Jul 30 2016, 19:40:32) 
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.xfeatures2d
<module 'cv2.xfeatures2d' (built-in)>
>>>
edit flag offensive delete link more
0

answered 2017-11-30 21:15:31 -0500

supra56 gravatar image
sift = cv2.xfeatures2d.SIFT_create()
surf = cv2.xfeatures2d.SURF_create()
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-11-27 19:58:03 -0500

Seen: 520 times

Last updated: Nov 30 '17