Ask Your Question

victorp's profile - activity

2015-03-16 07:30:45 -0500 received badge  Self-Learner (source)
2015-03-16 04:07:42 -0500 answered a question OpenCV 3.0.0 beta - Use common interface with SURF

As pointed out in the comments by @berak the correct include and class name are cv::xfeatures2d::SURF, and #include "opencv2/xfeatures2d.hpp". So use for example:

cv::Ptr<cv::xfeatures2d::SURF> surf = cv::xfeatures2d::SURF::create(400);

I believe my installation had problems because I was using opencv-3.0.0-beta with opencv_contrib (master branch). Recompiling and installing opencv-3.0.0-beta with opencv_contrib-3.0.0-beta seems to have resolved the issue.

2015-03-16 03:12:49 -0500 received badge  Editor (source)
2015-03-16 03:09:16 -0500 commented question OpenCV 3.0.0 beta - Use common interface with SURF

That include gives a fatal error: opencv2/xfeatures2d.hpp: No such file or directory. I'll check my installation of OpenCV and report back.

2015-03-13 08:15:27 -0500 asked a question OpenCV 3.0.0 beta - Use common interface with SURF

I am trying to use the common interface to features detectors and extractors for SURF features. The documentation states that cv::SURF implements the Features2D interface, but when I try:

cv::Ptr<cv::SURF> surf = cv::SURF::create(400);

I get the compiler error:

features_analysis.cpp:134:50: error: no matching function for call to ‘cv::SURF::create(int)’

I have installed xfeatures2D from the contrib module but I am also confused about namespaces, is SURF in cv::SURF or cv::xfeatures2d::SURF ? And what is the correct header to include? The documentation is very confusing and contradictory at times.

EDIT: Is there a "beta" release of opencv_contrib? Because now I'm using opencv-3.0.0-beta with the master branch of opencv_contrib, could that be a problem?

EDIT2: Nevermind, I just found it here:

2015-03-13 07:52:10 -0500 received badge  Enthusiast
2015-03-03 07:27:59 -0500 asked a question Build OpenCV 3.0.0 for Python 3.4 on Ubuntu

I'm tring to compile OpenCV 3.0.0 (beta) with Python 3 support. However when runnig CMake I get the following error:

Could NOT find PythonLibs (missing:  PYTHON_INCLUDE_DIRS) (found suitable exact version "3.4.0")

And then further down:

Python 3:
    Interpreter:                 /usr/bin/python3.4 (ver 3.4)
    Libraries:                   NO
    numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.8.2)
    packages path:               lib/python3.4/dist-packages

Therefore the make target opencv_python3 is not available. But I have python3.4 and python3.4-dev installed of course. On Ubuntu 14.02.