3

I am getting the following error while trying to build opencv with the contrib module

/opencv/opencv_contrib/modules/tracking/include/opencv2/tracking/tracker.hpp:577:11: error: ‘AlgorithmInfo’ does not name a type

The code is latest and pulled just now. After adding a forward declaration class AlgorithmInfo; to the file tracker.hpp that particular error is gone but I am getting other '‘AlgorithmInfo’ does not name a type' errors in other files. Probably AlgorithmInfo is not getting included somehow. Any ideas?

Investigation:

  1. After grepping AlgorithmInfo I found that there is no defination of AlgorithmInfo in the code base.

  2. Comparing to the previous version of code I found AlgorithmInfo is defined at opencv2/core.hpp line 3006. But in the latest code, it is not present there at all!

krips89
  • 1,683
  • 4
  • 17
  • 32
  • If you are using opencv3, you can try using xfeatures2d.hpp and other new additions to contrib. Apparently, they are supposed to be used in a different way. please check [link](http://stackoverflow.com/questions/27533203/how-do-i-use-sift-in-opencv-3-0-with-c) – Utkarsh Bhardwaj Sep 01 '15 at 09:05

1 Answers1

0

This is not a permanent solution but I had the same issue and here is how i was able to continue work on the project until someone finds a better way.

I looked at the link that Utkarsh posted How do I use SIFT in OpenCV 3.0 with c++?

To summarize I had to get the opencv_contrib repo and remake opencv.

After doing so I still got the same error and eventually realized that you must include

#include "opencv2/xfeatures2d.hpp"
#include "opencv2/features2d/features2d.hpp"

but you still get the same unless you also remove/comment out

//#include "opencv2/nonfree/features2d.hpp"
//#include "opencv2/nonfree/nonfree.hpp"

anyway this is how i got around the error for the time being.

Community
  • 1
  • 1
mkrinblk
  • 896
  • 9
  • 21